Commit graph

1232 commits

Author SHA1 Message Date
Rémi Verschelde
3e5ad8213f
Merge pull request #63563 from aaronfranke/export-arch 2022-07-30 11:22:25 +02:00
Aaron Franke
17c4cd6412
Update export dialog to handle many architectures 2022-07-29 10:24:58 -05:00
Aaron Franke
a0072ba39f
Make some editor export methods const 2022-07-29 10:24:13 -05:00
Juan Linietsky
d4433ae6d3 Remove Signal connect binds
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind().
Changed all uses of it to Callable.bind()
2022-07-29 16:26:13 +02:00
Rémi Verschelde
f3fbb157ca
Merge pull request #63121 from aaronfranke/editor-export-split 2022-07-27 11:19:40 +02:00
Fredia Huya-Kouadio
9679c67904 Address remaining scoped storage regressions
- Accelerate common path used to check the storage scope for a given path
- Update the logic for the `get_as_text()` method - previous logic loads the content of a text file one byte at a time
2022-07-26 07:44:08 -07:00
Aaron Franke
e53ae13178
Split up editor export code into multiple files 2022-07-26 08:28:19 -05:00
Rémi Verschelde
90019676b0 Code quality: Fix header guards consistency
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
2022-07-25 11:17:40 +02:00
Marcel Admiraal
6661141c21 Fix incorrect Android scancodes 2022-07-13 16:24:01 +01:00
kobewi
d2900429e8 Add static methods for creating Image and ImageTexture 2022-07-08 13:40:47 +02:00
bruvzg
e873778561 Use clang as assembler to ensure preprocessing is done, and add assembler "target" flag. 2022-07-07 14:15:12 +03:00
Fredia Huya-Kouadio
f9c19298ce Add full support for Android scoped storage.
This was done by refactoring directory and file access handling for the Android platform so that any general filesystem access type go through the Android layer.
This allows us to validate whether the access is unrestricted, or whether it falls under scoped storage and thus act appropriately.
2022-07-05 03:00:37 -07:00
Rémi Verschelde
e79cb76146
Merge pull request #62611 from akien-mga/android-preset-refactor-custom-build 2022-07-03 18:38:39 +02:00
Rémi Verschelde
ef4a5cd10b Android: Refactor Custom Build options in export preset
Instead of reusing the custom_template/ prefix which is actually only
used for the prebuilt APK workflow, we add a new custom_build/ prefix.

This is a slight compat breakage (users will have to redo their config)
but enables us to group the Min SDK and Target SDK options where they make
sense, and avoid reusing the previously hardcoded Target SDK 30 from
Godot 3.4.

Those two options are now strings instead of integers so that we can keep
them empty by default, and show their default value using a placeholder.
So some validation has been added to make sure they are proper ints.
The upper bound on Target SDK was also removed as it's a common use case
to use it to try to target newer released SDKs. But we warn the user that
this wasn't validated by us.

The export info dialog is now exclusive so that when it doesn't auto-close,
i.e. when it errors, you don't close it by mistake by clicking outside.

Fixes #62465.
2022-07-03 17:05:28 +02:00
Jan Haller
d38d76d039 Fix exit code of --help and --version, and test them in CI
Corrects prior regression which caused ERROR output and exit code of 1.
2022-07-02 01:17:35 +02:00
Rémi Verschelde
898e09e2e6
Merge pull request #61691 from madmiraal/android-ndk-23
Upgrade Android NDK to r23 LTS
2022-06-26 21:23:23 +02:00
Fredia Huya-Kouadio
6a7471b204
Merge pull request #62289 from madmiraal/fix-61816
Remove broken scroll gesture on Android
2022-06-25 18:48:14 -07:00
Marcel Admiraal
48efd563e4 Upgrade Android NDK to r23 LTS 2022-06-25 14:58:30 +01:00
Gustavo Maciel
ec6d5d6cba Update android:targetSdkVersion from 30 to 31
Starting in August 2022, new apps will need to target API level 31 (Android 12) or higher and adjust for behavioral changes.

Read more here: https://developer.android.com/google/play/requirements/target-sdk
2022-06-23 15:17:15 +02:00
Marcel Admiraal
076638f13b Remove broken scroll gesture on Android 2022-06-21 17:14:20 +01:00
Marcel Admiraal
806e7d18d1 Ensure joystick has been added or not already removed when processing input 2022-06-16 18:15:25 +01:00
Fredia Huya-Kouadio
6b9a81900e Migrate the Godot Editor java source file to Kotlin. 2022-06-09 13:26:24 -07:00
bruvzg
e00571b194
Add readable export errors. 2022-06-08 17:55:46 +03:00
Rémi Verschelde
cd7871867f
Merge pull request #61579 from madmiraal/android-kotlin-java-version
Ensure Android Java and Kotlin compile to the same version
2022-06-01 18:31:09 +02:00
Marcel Admiraal
b19bbadcf0 Ensure Android Java and Kotlin compile to the same version 2022-06-01 16:23:44 +01:00
Fredia Huya-Kouadio
6f7ec7f723 Misc editor tweaks and polishes:
- Using a bucketized approach to select the editor scale in order to avoid too high values
- Add default app dimensions: used on Android devices with free floating app windows to set the default app frame
- Add ability to launch the Game window in an adjacent frame when in multi window mode
2022-05-31 23:49:40 -07:00
Rémi Verschelde
b777454097
Merge pull request #61573 from madmiraal/android-cleanup
Cleanup Android C++ code
2022-05-31 23:48:16 +02:00
Marcel Admiraal
2afef001e7 Cleanup Android C++ code 2022-05-31 17:11:05 +01:00
Marcel Admiraal
d0cb299f04 Only use Android fullscreen theme for splash screen 2022-05-27 16:54:44 +02:00
Rémi Verschelde
3bee0689bc
Merge pull request #61333 from m4gr3d/fix_restart_logic_main 2022-05-23 23:11:53 +02:00
Fredia Huya-Kouadio
d38ffda2c3 Fix the logic to restart the Godot application 2022-05-23 13:15:48 -07:00
Marcel Admiraal
cf0f967e6d Remove duplicate Android sensor listener registrations 2022-05-23 20:33:13 +02:00
reduz
45af29da80 Add a new HashSet template
* Intended to replace RBSet in most cases.
* Optimized for iteration speed
2022-05-20 22:40:38 +02:00
Haoyu Qiu
fc3b845c07 Add dedicated macros for property name extraction
* Replace case-by-case extraction with PNAME & GNAME
* Fix group handling when group hint begins with property name
* Exclude properties that are PROPERTY_USAGE_NO_EDITOR
* Extract missing ADD_ARRAY*, ADD_SUBGROUP* macros
2022-05-19 14:08:47 +08:00
reduz
746dddc067 Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
  (order matters) but use is discouraged.

There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
2022-05-16 10:37:48 +02:00
Hugo Locurcio
78b4ec2d4d
Increase compiler optimization when using target=release on iOS/Android 2022-05-13 01:12:20 +02:00
bruvzg
d36c5514d3
Fix ZipIO crash when reused (and possible leaks). 2022-05-11 16:08:17 +03:00
Rémi Verschelde
3894b08d0d
Merge pull request #60553 from madmiraal/separate-display_safe_area 2022-05-03 11:20:46 +02:00
Rémi Verschelde
c9ce4069a3
Merge pull request #60601 from touilleMan/gdextension_get_library_path
Add GDNativeInterface::get_library_path to GDExtension
2022-05-03 08:13:34 +02:00
Rémi Verschelde
d56462d82a
Merge pull request #60638 from m4gr3d/support_hand_tracking_v2_main 2022-05-02 09:51:21 +02:00
Marcel Admiraal
97e87a2daf Fix screen_get_usable_rect returning display safe area 2022-05-02 09:31:32 +02:00
Rémi Verschelde
bc7ccc909b
Merge pull request #60551 from madmiraal/implement-3466
Add a method for obtaining display cutouts on Android
2022-05-02 07:56:41 +02:00
Emmanuel Leblond
80f61352fb
Add GDNativeInterface::get_library_path to GDExtension 2022-04-29 00:51:04 +02:00
Rémi Verschelde
cbdc33bcf7
Merge pull request #60563 from madmiraal/fix-60562 2022-04-29 00:30:30 +02:00
bruvzg
6ab672d1ef Implement text-to-speech support on Android, iOS, HTML5, Linux, macOS and Windows.
Implement TextServer word break method.
2022-04-28 14:35:41 +03:00
Fredy Huya-Kouadio
c63ca6c72b Update Meta hand tracking version
https://developer.oculus.com/blog/presence-platforms-hand-tracking-api-gets-an-upgrade/
2022-04-27 20:56:24 -07:00
Marcel Admiraal
5924e2b90e Check for null when retrieving clip data item text on Android 2022-04-27 16:12:33 +02:00
Rémi Verschelde
8dfa12cae7
Merge pull request #59979 from bruvzg/cpp_check2 2022-04-27 10:08:26 +02:00
Marcel Admiraal
71ce5857ec Add a method for obtaining display cutouts on Android 2022-04-26 13:51:21 +02:00
Rémi Verschelde
d9f7da2230
Merge pull request #60433 from madmiraal/remove-superfluous-null-check
Remove superfluous null check
2022-04-25 16:02:40 +02:00
Rémi Verschelde
b4a1a76bce
Merge pull request #60457 from madmiraal/replace-index-iterators
Replace index iterators with for each loops.
2022-04-25 16:02:28 +02:00
Rémi Verschelde
5e599d7c22
Merge pull request #60441 from madmiraal/remove-superfluous-inputmanager
Remove superfluous Android InputManager interface and implementation
2022-04-25 15:41:55 +02:00
Rémi Verschelde
d167583517
Merge pull request #60434 from madmiraal/remove-superfluous-version-check
Remove superfluous check for minimum Android SDK.
2022-04-25 15:40:33 +02:00
Fredy Huya-Kouadio
3b1e62bc7c Fix the issue causing the screen to be black after resuming when in low processor mode.
This is done by forcing a redraw and buffers swap when resuming the app.
2022-04-25 00:25:17 -07:00
Marcel Admiraal
334ebd7eb7 Replace index iterators with for each loops. 2022-04-23 09:45:44 +02:00
Marcel Admiraal
2f225bf2c5 Remove superfluous check for minimum Android SDK. 2022-04-22 18:55:45 +02:00
Marcel Admiraal
22ca5b2eba Remove superfluous Android InputManager interface and implementation 2022-04-22 18:52:06 +02:00
Marcel Admiraal
988432b8bb Remove superfluous null check 2022-04-22 17:33:27 +02:00
bruvzg
de4c97758a
Fix more issues found by cppcheck. 2022-04-20 10:34:00 +03:00
bruvzg
d2ebac3a30
Remove or make private FileAccess close() methods. 2022-04-12 14:50:14 +03:00
bruvzg
9381acb6a4
Make FileAccess and DirAccess classes reference counted. 2022-04-11 13:28:51 +03:00
bruvzg
f851c4aa33
Fix some issues found by cppcheck. 2022-04-06 14:34:37 +03:00
Rémi Verschelde
f8ab79e68a Zero initialize all pointer class and struct members
This prevents the pitfall of UB when checking if they have been
assigned something valid by comparing to nullptr.
2022-04-04 19:49:50 +02:00
Rémi Verschelde
53317bbe14
Merge pull request #59866 from m4gr3d/update_default_display_scale_main 2022-04-04 19:31:37 +02:00
Fredia Huya-Kouadio
8eabf77f54 Update the editor display scale based on the device's scaled density 2022-04-04 09:23:43 -07:00
Fredia Huya-Kouadio
f1a7caf9bb Remove duplicate resizable settings 2022-04-04 09:18:07 -07:00
Fredia Huya-Kouadio
3f299e9255 Update resize settings:
- Unlock resizing for the Godot Editor
- Add an option to specify whether a game is resizeable for the Godot template
2022-04-04 01:02:10 -07:00
Fredia Huya-Kouadio
b176b31f5d Fix flickering issues with low processor mode on Android 2022-03-29 12:17:09 -07:00
Fredy Huya-Kouadio
5711037bf6 Android port of the Godot Editor
These set of changes focus primarily on getting the core logic and overall Godot Editor UI and functionality up and running natively on Android devices.
UI tweaks / cleanup / polish, as well configuration for Android specific functionality / restrictions will be addressed in follow-up PRs iteratively based on feedback.

Co-authored-by: thebestnom <shoval.arad@gmail.com>
2022-03-28 14:04:51 -07:00
Rémi Verschelde
5c7971d856
Merge pull request #59146 from m4gr3d/setup_mavencentral_publishing 2022-03-16 17:24:22 +01:00
bruvzg
98d0af7d5c
Implement GDExtension export plugin. 2022-03-16 11:16:19 +02:00
Fredia Huya-Kouadio
a2bf47de2b Setup logic to publish the Godot Android library to MavenCentral 2022-03-14 14:53:39 -07:00
Rémi Verschelde
015fdfc28d
Merge pull request #58986 from akien-mga/diraccessref 2022-03-11 12:51:22 +01:00
Rémi Verschelde
952b71a425
Merge pull request #58751 from bruvzg/loc_str_props 2022-03-11 10:45:02 +01:00
Rémi Verschelde
768f9422bc Convert uses of DirAccess * to DirAccessRef to prevent memleaks
`DirAccess *` needs to be deleted manually, and this is often forgotten
especially when doing early returns with `ERR_FAIL_COND`.
`DirAccessRef` is deleted automatically when it goes out of scope.

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2022-03-11 09:13:11 +01:00
reduz
21637dfc25 Remove VARIANT_ARG* macros
* Very old macros from the time Godot was created.
* Limited arguments to 5 (then later changed to 8) in many places.
* They were replaced by C++11 Variadic Templates.
* Renamed methods that take argument pointers to have a "p" suffix. This was used in some places and not in others, so made it standard.
* Also added a dereference check for Variant*. Helped catch a couple of bugs.
2022-03-09 18:39:13 +01:00
Rémi Verschelde
9b05f29894 Remove unused GDNative code
This has been superseded by GDExtension so this code is no longer useful
nor usable.

There's still some GDNative-related stuff in platform export code which
needs to be adapted for GDExtension (e.g. to include GDExtension libraries
in exports).
2022-03-09 13:59:03 +01:00
reduz
ccd4cdfd8b Rename StreamTexture* to CompressedTexture*
* Its not and will not be used for streaming.
* Streaming will be implemented in 4.1 and it will work different.
* It makes more sense to be called CompressedTexture since it imports and compresses texture files.
2022-03-05 16:43:38 +01:00
bruvzg
12cb6386f6
Improve app name and system permission message localization.
Add localizable string (Dictionary<Lang Code, String>) property editor and property hint.
Add localized "app name" property to the project settings.
Add localized permission and copyright properties to the macOS and iOS export settings.
Remove some duplicated ("app name") and deprecated ("info") macOS and iOS export properties.
2022-03-04 18:11:31 +02:00
Rémi Verschelde
b8b4580448
Style: Cleanup single-line blocks, semicolons, dead code
Remove currently unused implementation of TextureBasisU, could be re-added
later on if needed and ported.
2022-02-16 14:06:29 +01:00
Rémi Verschelde
11572c6e30
Editor: Cleanup some includes dependencies
Removes some unnecessary includes from `editor_node.h`, and instead add
those where they're used.

Removes unnecessary `editor_node.h` includes in various editor classes.

Renames `dynamicfont` to `dynamic_font` in a couple files.

Misc cleanup while jumping through that rabbit hole.
2022-02-15 14:54:15 +01:00
Hendrik Brucker
b396fd4eef Improve compilation speed (forward declarations/includes cleanup) 2022-02-12 02:46:22 +01:00
Rémi Verschelde
1bdb82c64e
Fix typos with codespell
Using codespell 2.2-dev from current git.

Added `misc/scripts/codespell.sh` to make it easier to run it once in a
while and update the skip and ignore lists.
2022-02-10 12:30:19 +01:00
Rémi Verschelde
2e320dcf87
Merge pull request #57617 from bruvzg/char_cleanup 2022-02-04 13:06:38 +01:00
Rémi Verschelde
d235c1bb19
Merge pull request #57335 from jordigcs/display-refresh-rate 2022-02-04 11:51:07 +01:00
bruvzg
244db37508
Cleanup and move char functions to the char_utils.h header. 2022-02-04 11:35:01 +02:00
jordi
54dec44dba Add screen_get_refresh_rate to DisplayServer 2022-02-03 21:50:32 -06:00
Rémi Verschelde
4b36b6e92a
Merge pull request #56785 from bruvzg/nat_handles_4 2022-01-27 12:12:34 +01:00
Fredia Huya-Kouadio
6a4614ef48 Include the godot_plugin_jni.cpp file into the platform/android/SCsub file
This should resolve https://github.com/godotengine/godot/issues/57209
2022-01-26 14:50:56 -08:00
Fredia Huya-Kouadio
b284dd92d3 Fix XR Android manifest metadata
- Adds the parameters for supported Meta devices, which is required to access some device specific capabilities
- Remove the 'com.samsung.android.vr.application.mode' metadata
2022-01-26 09:05:47 -08:00
Haoyu Qiu
314f309035 Add DisplayServer.clipboard_has() to check clipboard content 2022-01-19 23:44:20 +08:00
Rémi Verschelde
7c771ea310
Merge pull request #47522 from madmiraal/rename-test_width-test_height 2022-01-18 13:39:57 +01:00
Rémi Verschelde
8bdef23f7f
Merge pull request #56012 from bruvzg/wt🤎4 2022-01-17 13:26:15 +01:00
Marcel Admiraal
f41c72c538 Fix Actions mapped to triggers not using the full range 2022-01-14 15:36:20 +00:00
bruvzg
89f37d4105
Add support for getting native display, window, and view handles. 2022-01-14 13:36:32 +02:00
Rémi Verschelde
cd93bb9130
Merge pull request #56673 from winterpixelgames/bugfix-android-keystore-paths 2022-01-12 16:45:44 +01:00
Rémi Verschelde
585231a172
Merge pull request #56492 from akien-mga/remove-author-docstrings 2022-01-12 15:24:17 +01:00
Jason Knight
3e288f65bb Android export plugin passes absolute file paths to gradle for keystores. 2022-01-10 14:34:00 -06:00
bruvzg
d2573c1636
Fix decoding UTF-8 filenames on unzipping. 2022-01-05 14:31:20 +02:00
Rémi Verschelde
ba2bdc478b
Style: Remove inconsistently used @author docstrings
Each file in Godot has had multiple contributors who co-authored it over the
years, and the information of who was the original person to create that file
is not very relevant, especially when used so inconsistently.

`git blame` is a much better way to know who initially authored or later
modified a given chunk of code, and most IDEs now have good integration to
show this information.
2022-01-04 20:42:50 +01:00