Commit graph

650 commits

Author SHA1 Message Date
bruvzg f37981b83f [macOS, Mono] Automatically enable JIT entitlements for the Mono exports. 2021-07-09 22:47:43 +03:00
bruvzg f7797bf1b3 [macOS] Fix custom mouse cursor not set after mouse mode change. 2021-06-23 10:51:01 +03:00
Aaron Franke 0ce49800ac
Use mouse and joypad enums instead of plain integers
Also MIDIMessage
2021-06-20 11:54:24 -04:00
Aaron Franke e919d894f8
Move many input enums to their own file 2021-06-20 11:53:01 -04:00
Lightning_A e28fd07b2b Rename instance()->instantiate() when it's a verb 2021-06-19 20:49:18 -06:00
bruvzg cb480376d8 Add LSApplicationCategoryType to the template and export dialog. 2021-06-14 14:28:34 +03:00
Rémi Verschelde ac73059b56
Merge pull request #49123 from aaronfranke/it-is-time
Add a Time singleton
2021-06-12 22:55:25 +02:00
Rémi Verschelde 8d4046929c
Merge pull request #49511 from akien-mga/core-diraccess-fileaccess-io
Core: Move DirAccess and FileAccess to `core/io`
2021-06-11 16:51:10 +02:00
Rémi Verschelde 6b0183ec89
Merge pull request #49279 from Calinou/rename-string-is-abs-path-method
Rename `String.is_abs_path()` to `String.is_absolute_path()`
2021-06-11 15:58:16 +02:00
Aaron Franke f64fea1b23
Add Time singleton 2021-06-11 09:32:39 -04:00
Rémi Verschelde 9e328bb5b7
Core: Move DirAccess and FileAccess to core/io
File handling APIs are typically considered part of I/O, and we did have most
`FileAccess` implementations in `core/io` already.
2021-06-11 14:52:39 +02:00
Aaron Franke 98aa3b669e
Add MOUSE_MODE_CONFINED_HIDDEN
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2021-06-03 11:44:28 -04:00
Hugo Locurcio 5ea1c75d63
Rename String.is_abs_path() to String.is_absolute_path()
This is more consistent with `NodePath.is_absolute()`.
2021-06-03 16:00:06 +02:00
reduz 0d2e02945b Implement shader caching
* Shader compilation is now cached. Subsequent loads take less than a millisecond.
* Improved game, editor and project manager startup time.
* Editor uses .godot/shader_cache to store shaders.
* Game uses user://shader_cache
* Project manager uses $config_dir/shader_cache
* Options to tweak shader caching in project settings.
* Editor path configuration moved from EditorSettings to new class, EditorPaths, so it can be available early on (before shaders are compiled).
* Reworked ShaderCompilerRD to ensure deterministic shader code creation (else shader may change and cache will be invalidated).
* Added shader compression with SMOLV: https://github.com/aras-p/smol-v
2021-05-31 10:13:09 +02:00
Marcel Admiraal da5d7db610 Rename File::get_len() get_length() 2021-05-25 11:54:28 +01:00
Rémi Verschelde 65eff1cfdd
Merge pull request #46866 from bruvzg/symlinks_and_macos_gdn_framework_export_4 2021-05-24 15:14:02 +02:00
bruvzg a1cb6f07a1
Add GDNative Framework loading and export support. 2021-05-24 12:49:05 +03:00
bruvzg d14eae141e
[macOS] Allow "on top" windows to enter full-screen mode. 2021-05-24 10:53:01 +03:00
Rémi Verschelde 0e1d45b210
OS: Remove code duplicate in XDG paths handling
Follow-up to #48542.
2021-05-21 12:49:09 +02:00
Hugo Locurcio 011a99316a
Only allow absolute paths in XDG environment variables
The XDG Base Directory specification does not allow using relative paths
(which broke things in Godot anyway). If a relative path is detected,
it should be ignored.
2021-05-20 18:37:28 +02:00
Rémi Verschelde 6c367f8e0d
Merge pull request #48168 from LightningAA/control-to-ctrl-4.0 2021-05-17 17:38:02 +02:00
Pedro J. Estébanez 469fa47e06
Make all file access 64-bit (uint64_t)
This changes the types of a big number of variables.

General rules:
- Using `uint64_t` in general. We also considered `int64_t` but eventually
  settled on keeping it unsigned, which is also closer to what one would expect
  with `size_t`/`off_t`.
- We only keep `int64_t` for `seek_end` (takes a negative offset from the end)
  and for the `Variant` bindings, since `Variant::INT` is `int64_t`. This means
  we only need to guard against passing negative values in `core_bind.cpp`.
- Using `uint32_t` integers for concepts not needing such a huge range, like
  pages, blocks, etc.

In addition:
- Improve usage of integer types in some related places; namely, `DirAccess`,
  core binds.

Note:
- On Windows, `_ftelli64` reports invalid values when using 32-bit MinGW with
  version < 8.0. This was an upstream bug fixed in 8.0. It breaks support for
  big files on 32-bit Windows builds made with that toolchain. We might add a
  workaround.

Fixes #44363.
Fixes godotengine/godot-proposals#400.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2021-05-17 15:06:19 +02:00
Lightning_A 97fecd1b69 Rename "Control" key to "Ctrl" and add "_pressed" suffix to all InputEventWithModifiers properties/methods 2021-05-07 14:00:50 -06:00
Aaron Franke 0de9a7d803
Rename doubleclick to double_click 2021-05-04 04:38:08 -04:00
Rémi Verschelde 5b16020846
Replace remaining uses of NULL with nullptr
Follow-up to #38736 (these uses were likely added after this PR was merged).
2021-04-29 11:53:27 +02:00
Rémi Verschelde 8247667a3e
Core: Drop custom copymem/zeromem defines
We've been using standard C library functions `memcpy`/`memset` for these since
2016 with 67f65f6639.

There was still the possibility for third-party platform ports to override the
definitions with a custom header, but this doesn't seem useful anymore.
2021-04-27 16:26:27 +02:00
bruvzg a79cc0d772
Fix macOS build with all sanitizers enabled. 2021-04-16 08:27:00 +03:00
Rafał Mikrut f827bcd2f3 Add more sanitizer flags to shows more bugs 2021-04-15 20:16:28 +02:00
Rémi Verschelde bc29f4bca1
Merge pull request #47435 from madmiraal/rename-texture-get_data
Rename Texture.get_data() to get_image()
2021-03-29 10:41:22 +02:00
bruvzg 09c8e69232
[macOS] Enable code signing by default, use ad-hoc signature if no identity specified. 2021-03-29 00:04:48 +03:00
Marcel Admiraal fd30c36985 Rename Texture.get_data() to get_image() 2021-03-28 13:00:46 +01:00
Aaron Franke a5324787c8
Rename some more global enums (Key, Joy, MIDI) 2021-03-23 07:13:23 -04:00
Aaron Franke 10d7fccb54
Rename ButtonList enum and members to MouseButton 2021-03-23 07:13:23 -04:00
Rémi Verschelde fcddd8c53a
Merge pull request #46966 from qarmin/faster_release
Allow to not optimize release build
2021-03-20 22:44:47 +01:00
bruvzg 9e18fce943
Add "Replace existing signature" to the macOS export (enabled by default). 2021-03-18 23:00:05 +02:00
Rafał Mikrut 0b298d201e Allow to not optimize release build 2021-03-14 15:51:05 +01:00
Rémi Verschelde 338fa05acc
Merge pull request #43768 from sjml/mac-mono-export-fix
Mono/macOS: Separate data dir into frameworks and resources for codesigning
2021-03-03 22:42:44 +01:00
Rémi Verschelde 0599e5f07a
Merge pull request #46621 from bruvzg/macos_export_entitlemenst_4
[macOS] Add entitlements config and export template `dylib` signing to the export.
2021-03-03 22:41:01 +01:00
Shane Liesegang 42eb09ddcc Mono/macOS: Separate data dir into frameworks and resources for codesigning
Co-authored-by: Ignacio Etcheverry <ignalfonsore@gmail.com>
2021-03-03 13:54:34 +01:00
bruvzg df267f90cc
[macOS] Add entitlements config and export template dylib signing to the export. 2021-03-03 14:13:55 +02:00
Jordan Schidlowsky da35cd2f00 add msan sanitizer option for linus/bsd, lsan option for osx 2021-03-02 11:10:16 -06:00
bruvzg d756f6a294
[macOS] Ignore mouse move event caused by mouse mode switch. 2021-02-15 00:20:50 +02:00
Rémi Verschelde 849c090343
SCons: Fix debug_symbols tests after switch to BoolVariable
Bug introduced in #45679.

Fixes part of #45816.
2021-02-08 08:53:16 +01:00
Rémi Verschelde db26871210 SCons: Add production=yes option to use production defaults
This is meant for users making custom builds to match the options used on
optimized, official builds.

This enables, on the platforms which support them:
- `use_static_cpp=yes` (portable binaries for Linux and Windows)
- `use_lto=yes` (link time optimizations - note: requires a lot of RAM!)
- `debug_symbols=no` (no debug symbols, smaller binaries)

Also abort when using MSVC with `production=yes`, as:
- It cannot optimize the GDScript VM like GCC or Clang do, leading to
  significant performance drops.
- Its LTO support is unreliable, at least used to trigger crashes last
  we tried it extensively.

All options can still be overridden if specified, and the `dev=yes` option
was changed to also support overrides.
2021-02-03 11:48:17 +01:00
Marcel Admiraal 2a74b388d0 Split OS::execute into two methods
1. execute(): Executes a command and returns the results.
2. create_process(): Creates a new process and returns the new process' id.
2021-01-09 10:03:23 +00:00
Rémi Verschelde b5334d14f7
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆
2021-01-01 20:19:21 +01:00
Rémi Verschelde e4c0572385
Merge pull request #44593 from madmiraal/rename-mainloop-methods
Rename MainLoop methods to match Node methods
2020-12-28 14:44:28 +01:00
Marcel Admiraal 5b937d493f Rename empty() to is_empty() 2020-12-28 10:39:56 +00:00
bruvzg 39bcc77d6a
[4.0] Fix file drag-drop on M1 Macs. 2020-12-23 18:00:50 +02:00
Marcel Admiraal d9e9eb8d04 Rename MainLoop methods to match Node methods 2020-12-22 12:34:57 +00:00