Commit Graph

1453 Commits

Author SHA1 Message Date
Fredia Huya-Kouadio 2dd55ce69f
Fix gradle build errors when the build path contains non-ASCII characters
(cherry picked from commit f1887a30f3)
2024-03-11 15:00:41 +01:00
Alexander Hartmann 822b2b43a6 Fix 'get_window_safe_area' on Android
(cherry picked from commit d7c6ad2020)
2024-01-25 18:45:02 +01:00
Fredia Huya-Kouadio 894d629185 Disable automatic permissions request
The feature was added in Godot 4.2, but it goes against recommended best practices for permissions request, as such it's being reverted.
In its place, developers now have to explicitly request the permissions they need to access.

(cherry picked from commit df4f9e8e64)
2024-01-25 17:19:41 +01:00
Fredia Huya-Kouadio 9822c13909 Update the validation logic for the package name:
- When using the project name, allow underscore (`_`) characters
- Send a warning instead of an error when the project name is modified to fit the package name format

(cherry picked from commit 0325568a9b)
2024-01-24 15:56:50 +01:00
Fredia Huya-Kouadio 7cd604132b Fix an issue causing the running project window to loop-restart when closed with the back button 2023-11-27 23:43:19 -08:00
Fredia Huya-Kouadio 1e4af5269f Fix issue causing Godot Android apps / games to freeze on close
The issue occurred because during the 'close' event, the logic was trying to terminate the native engine on the UI thread instead of doing on the render thread.
2023-11-27 18:24:36 -08:00
Rémi Verschelde fa259a77cd
Codestyle: Fix some comment issues 2023-11-21 15:26:53 +01:00
Fredia Huya-Kouadio 136b7f9c52
Preserve the output from the gradle build command
Updates `EditorNode#execute_and_show_output(...)` to return the output of the executed command.
2023-11-12 12:07:04 +01:00
Fredia Huya-Kouadio dce2686e52 Remove Android specific abis from the export preset feature list
The presence of those abis cause them to be included in the set of `p_features` passed to the `gdextension_export_plugin#_export_file(...)` method, which caused them to be lumped in the `features_wo_arch` set.
When trying to find the gdextension library path, we use a predicate with the following logic:

```
[features_wo_arch, arch_tag](String p_feature) { return features_wo_arch.has(p_feature) || (p_feature == arch_tag); }
```

For a `gdextension` config file like the one below, this causes the first android entry (`android.armeabi-v7a = ...`) to always be returned regardless of archs since it always satisfies the predicate.

```
[configuration]

entry_symbol = "example_library_init"
compatibility_minimum = 4.1

[libraries]
linux.x86_64 = "res://libgdexample.so"

android.armeabi-v7a = "res://libgdexample.android.template_release.armeabi-v7a.so"
android.arm32 = "res://libgdexample.android.template_release.armeabi-v7a.so"
android.x86 = "res://x86/libgdexample.android.template_release.x86.so"
android.x86_32 = "res://x86/libgdexample.android.template_release.x86.so"
android.x86_64 = "res://libgdexample.android.template_release.x86_64.so"
android.arm64-v8a = "res://libgdexample.android.template_release.arm64-v8a.so"
android.arm64 = "res://libgdexample.android.template_release.arm64-v8a.so"
```
2023-11-10 07:32:59 -08:00
Yuri Sizov 4c5c0414c8 Merge pull request #84491 from scgm0/andorid-no-show-splash-image
Fix Android disabling splash screen Show Image
2023-11-07 12:54:24 +01:00
scgm0 7771936df5 Fix Andorid disabling splash screen Show Image 2023-11-07 00:22:22 +08:00
Fredia Huya-Kouadio fcb07ff8dc Fix Android editor crash issue
Fix issue causing the Android editor to crash when pressing back from a running project
2023-11-03 07:37:46 -07:00
Fredia Huya-Kouadio a1ca4bab47 Replace the use of the `ANDROID_SDK_ROOT` env variable with `ANDROID_HOME` as the former is deprecated.
See https://developer.android.com/tools/variables#android_home for more details
2023-11-01 15:50:10 -07:00
Fredia Huya-Kouadio f86e6115d9 Automatically pick the Android sdk path using environment variables 2023-11-01 07:36:16 -07:00
Rémi Verschelde befc5a9120
Merge pull request #83954 from m4gr3d/update_godot_app_launch_mode
Update the `launchMode` for the `GodotApp` activity
2023-10-30 23:18:34 +01:00
Tareq Anuar ee31f2457f
Fix retrieving command line flags in Android. 2023-10-28 19:43:00 +08:00
Fredia Huya-Kouadio 14428c8d5b Update the `launchMode` for the `GodotApp` activity to allow other activities to be part of the same task
For details, see https://developer.android.com/guide/topics/manifest/activity-element#lmode
2023-10-25 08:27:35 -07:00
Alexander Hartmann 5137497c18
Fix Android logic for deferred window input events being inverted
Notably fixes issues with `is_action_just_*` queries in `_physics_process`
for TouchScreenButton.

Fixes #66318.
Fixes #82396.
2023-10-24 10:43:05 +02:00
Fredia Huya-Kouadio 56ce2d94c5 Bump the java version to version 17 2023-10-17 15:08:03 -07:00
Rémi Verschelde 1ab77f410e
Merge pull request #83433 from mhilbrunner/fix-android-gradle-docs
Docs: Fix link to Android Gradle build tutorial
2023-10-16 13:01:47 +02:00
Max Hilbrunner 68a1e0c7d4 Docs: Fix link to Android Gradle build tutorial 2023-10-16 12:27:24 +02:00
Fredia Huya-Kouadio c1a7222c97 Fix the timeframe when the Android gestures properties are retrieved.
Previous logic was retrieving them prior to them being defined in `main.cpp`
2023-10-11 15:41:19 -07:00
Rémi Verschelde 1fe7f8a96c
Merge pull request #82893 from m4gr3d/godot_android_lib_improvements
Cleanups and improvements to the Godot Android library api
2023-10-10 09:11:53 +02:00
Raul Santos cea77d0b48
C#: Add checks to Android export
- Add .NET 7.0 TFM when the platform is Anroid to the created csproj.
- Prevent exporting to Android when the architecture is not supported.
2023-10-10 00:35:08 +02:00
Fredia Huya-Kouadio 2951c162ed Cleanups and improvements to the Godot Android library api:
- Provide api to retrieve the running Godot instance from a GodotHost
- Provide api for the GodotHost to register runtime GodotPlugin instances
- Hide the GodotService class until it's completed
- Include project setting to enable long press for Android devices
- Include project setting to enable pan and scale gestures on Android devices
2023-10-08 05:30:38 -07:00
kobewi 09b30be86d Add vararg call() method to C++ Callable 2023-10-05 11:35:29 +02:00
emacser0 4c65ff52e4 Fix some typos in source. 2023-10-04 19:55:11 +09:00
Bastiaan Olij 9e56e7a3ce Add support for the OpenXR Eye gaze interaction extension
Co-authored-by: Bastiaan Olij <mux213@gmail.com>
2023-10-02 14:02:23 -07:00
Danil Alexeev aff767ef07
Fix expected argument count for `Callable` call errors 2023-09-29 20:00:10 +03:00
Rémi Verschelde da91cf9367
Merge pull request #82347 from SaracenOne/dir_access_checks
Add error checks for DirAccess creation
2023-09-26 16:36:47 +02:00
Zae 428eb1309a Support dark mode on Android and iOS. 2023-09-26 11:00:04 +08:00
Saracen 3f4513d4de Add error checks for DirAccess creation. 2023-09-26 03:07:43 +01:00
bruvzg 1887a9df19
[macOS/Windows] Add optional ANGLE backed OpenGL renderer support. Add EGL_ANDROID_blob_cache caching.
Co-authored-by: Riteo <riteo@posteo.net>
2023-09-21 14:21:00 +03:00
Rémi Verschelde 4b2fb36a04
Merge pull request #80644 from Distantz/master
Android Stylus pressure and tilt support.
2023-09-17 14:46:39 +02:00
Yuri Sizov 48e1c19dea Merge pull request #81583 from AThousandShips/null_check_drivers_platform
[Drivers,Platform] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable
2023-09-15 19:48:18 +02:00
Yuri Sizov 55840c5d24 Merge pull request #80932 from m4gr3d/fix_hardware_keyboard_input_routing_main
Fix Android input routing logic when using a hardware keyboard
2023-09-14 15:21:28 +02:00
A Thousand Ships 3565d1bf7e [Drivers,Platform] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable 2023-09-12 20:13:32 +02:00
Rémi Verschelde df5376c4c0
Merge pull request #80761 from adamscott/change-default-android-package-unique-name
[Android] Change the default "org.godotengine" package name to "com.example"
2023-09-11 15:35:56 +02:00
Adam Scott 00e9bafb73
Change the default org.godotengine to com.example 2023-09-11 09:01:36 -04:00
Yuri Sizov d8ff69d53c Extract ScriptInstance to simplify includes
This allows to include script_instance.h directly in the
generated gdvirtual.gen.inc, and remove excessive includes
from the codebase.

This should also allow Resource to use GDVIRTUAL macros,
which wasn't possible previously due to a circular dependency.
2023-09-06 22:54:38 +02:00
Fredia Huya-Kouadio 12d96eeaef Relax restriction on loading v1 Android plugins on Godot 4.2+ 2023-09-06 02:59:44 -07:00
Fredia Huya-Kouadio 8cc7739197 Godot Android plugin re-architecture 2023-09-03 17:04:10 -07:00
Rémi Verschelde 5b5471e30a
Merge pull request #78908 from zorbathut/pr_gitignore
Add static check for overzealous .gitignores and fix an example of such.
2023-08-29 12:41:53 +02:00
Brennen Shaughnessy 40b08cb4b6
Android: Add option to always use WiFi to connect to remote debug 2023-08-28 13:13:36 +02:00
Fredia Huya-Kouadio 87102e358d Fix Android input routing logic when using a hardware keyboard
When a hardware keyboard is connected, all key events come through so we can route them directly to the engine.
This is not the case for soft keyboards, for which the current logic was designed as it requires extra processing.
2023-08-23 09:57:00 -07:00
Hugo Locurcio 469c462b76
Add missing tutorials to documentation classes 2023-08-19 20:29:24 +02:00
Aaron Franke ada360affe
Add a button in the export dialog to fix missing texture formats 2023-08-17 02:56:42 -05:00
Rémi Verschelde 3907e53ff6
SCons: Disable C++ exception handling
Upon investigating the extremely slow MSVC build times in #80513, I noticed
that while Godot policy is to never use exceptions, we weren't enforcing it
with compiler flags, and thus still included exception handling code and
stack unwinding.

This is wasteful on multiple aspects:

- Binary size: Around 20% binary size reduction with exceptions disabled
  for both MSVC and GCC binaries.
- Compile time:
  * More than 50% build time reduction with MSVC.
  * 10% to 25% build time reduction with GCC + LTO.
- Performance: Possibly, needs to be benchmarked.

Since users may want to re-enable exceptions in their own thirdparty code
or the libraries they compile with Godot, this behavior can be toggled with
the `disable_exceptions` SCons option, which defaults to true.
2023-08-16 10:23:34 +02:00
Rémi Verschelde 6c3735cb7c
Merge pull request #80569 from m4gr3d/show_in_app_library_settings_main
Add export setting to control whether to show the Godot app in the app library
2023-08-16 09:13:30 +02:00
pikethom 7494ad6b54 Android stylus pressure and tilt support 2023-08-15 19:55:17 +12:00