Commit Graph

1665 Commits

Author SHA1 Message Date
Raul Santos 0aa46e19c5
C#: Fallback to CoreCLR/MonoVM hosting APIs when hostfxr/NativeAOT fails
Some platforms don't support hostfxr but we can use the coreclr/monosgen library directly to initialize the runtime.

Android exports now use the `android` runtime identifier instead of `linux-bionic`, this removes the restrictions we previously had:
- Adds support for all Android architectures (arm32, arm64, x32, and x64), previously only the 64-bit architectures were supported.
- Loads `System.Security.Cryptography.Native.Android` (the .NET library that binds to the Android OS crypto functions).
2024-09-16 17:07:03 +02:00
Rémi Verschelde 6daa6a8513
Merge pull request #97063 from rcadena/d97062-unexpected-debugger-line
Remove debug print from Android `DisplayServer.screen_get_scale` implementation
2024-09-16 13:36:09 +02:00
Rémi Verschelde f91c1a7b88
Merge pull request #97000 from Hilderin/fix-editor-doc-cache-locked-on-editor-startup
Fix `editor_doc_cache` locked by `adb` process on editor startup
2024-09-16 13:35:46 +02:00
Robert Cadena 42b0e91ee4
Remove debug print from Android `DisplayServer.screen_get_scale` implementation 2024-09-16 11:17:26 +02:00
Hilderin e064efccbc Fix editor_doc_cache locked on editor startup 2024-09-14 09:37:04 -04:00
Fredia Huya-Kouadio 741efa632a Update the Android editor flavors to avoid vendor-specific references 2024-09-13 08:53:29 -07:00
A Thousand Ships dd6443193c
[Editor] Expose more editor settings to documentation
Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
2024-09-12 15:34:49 +02:00
Rémi Verschelde f33a81977b
Merge pull request #96742 from m4gr3d/check_openxr_automatic_permissions_request
[Android editor] Limit when OpenXR runtime permissions are requested
2024-09-12 09:17:51 +02:00
Fredia Huya-Kouadio 3ff95ef12a Only request OpenXR permissions for a XR game running off the Android editor when the `xr/openxr/extensions/automatically_request_runtime_permissions` project setting is enabled 2024-09-11 14:47:08 -07:00
bruvzg 2c991a727b [Windows] Only use long executable path when necessary, fix broken apksigner detection. 2024-09-10 10:34:44 +03:00
devloglogan 16e1d8a81b Disable some editor settings by default in the XR Editor 2024-09-09 07:15:15 -05:00
Fredia Huya-Kouadio 9dc0543da7 Improve support for XR projects 2024-09-06 00:35:50 -07:00
Rémi Verschelde 4ab358481b
Merge pull request #96340 from m4gr3d/update_pip_mode_options
[Android Editor] Update the options for launching the Play window in PiP mode
2024-09-04 18:55:35 +02:00
Rémi Verschelde 13a90e938f
Merge pull request #70096 from rune-scape/stringname-dict
StringName Dictionary keys
2024-09-03 17:38:06 +02:00
Rémi Verschelde 657dc363ef
Merge pull request #96182 from dsnopek/java-class-wrapper
Fix `JavaClassWrapper` so it actually works
2024-09-03 11:43:35 +02:00
David Snopek 78883a52c6 Fix `JavaClassWrapper` so it actually works 2024-09-02 08:54:23 -05:00
Rémi Verschelde 0b19125b18
Merge pull request #96365 from m4gr3d/fix_android_build_with_openxr_disabled
Fix Android builds when OpenXR is disabled
2024-09-02 12:13:26 +02:00
BlueCube3310 205a10e0ae Reduce code duplication in FileAccess 2024-09-01 12:39:32 +02:00
Fredia Huya-Kouadio 92ffa93c58 Fix Android builds when OpenXR is disabled 2024-08-30 23:11:50 -07:00
Fredia Huya-Kouadio 11d4df4bc3 Update the options for launching the Play window in PiP mode 2024-08-30 10:31:33 -07:00
Rémi Verschelde b128e71383
Merge pull request #96208 from m4gr3d/cleanup_immersive_logic
Restore fullscreen toggle menu for the Android editor and clean up the immersive mode logic
2024-08-30 09:59:27 +02:00
Rémi Verschelde 66dd06837c
Merge pull request #90782 from bruvzg/export_platform_extension
Allow adding custom export platforms using scripts / GDExtension.
2024-08-30 09:58:52 +02:00
rune-scape 154049ce17 StringName Dictionary keys
also added 'is_string()' method to Variant
and refactored many String type comparisons to use it instead
2024-08-29 13:39:27 -07:00
Rémi Verschelde 526b35c929
Merge pull request #96254 from raulsntos/android/keyStore.isEmpty()
[Android] Check if `keyStore` path is empty
2024-08-29 10:36:49 +02:00
Fredia Huya-Kouadio 923b0f2e56 Restore 'Toggle fullscreen' menu for the Android editor and clean up the immersive mode logic 2024-08-28 09:50:34 -07:00
Raul Santos efe5f988e0
[Android] Check if keyStore path is empty
In `godot-build-scripts`, the default `config.sh` sets `GODOT_ANDROID_SIGN_KEYSTORE` to an empty string but we were only checking if it's null.
2024-08-28 17:24:54 +02:00
Fredia Huya-Kouadio 961394a988 Add support for launching the Play window in PiP mode 2024-08-28 03:18:51 -07:00
bruvzg 07e986f728
Allow adding custom export platforms using scripts / GDExtension. 2024-08-28 10:29:01 +03:00
Fredia Huya-Kouadio 6a9c060883 Add support to the Android editor for signing and verifying Android apks
- Apk signing and verification is enabled using the apksig library from ac5cbb07d8
2024-08-26 11:38:49 -07:00
Fredia Huya-Kouadio a5897d579b Update the `GodotHost` interface to support signing and verifying Android apks
Update the export logic to enable apk generation and signing for Android editor builds

Note: Only legacy builds are supported. Gradle builds are not supported at this point in time.
2024-08-26 11:16:38 -07:00
Fredia Huya-Kouadio 794ea99240 Update the storage access handler logic to support accessing / retrieving contents with the `assets:/` prefix 2024-08-26 11:16:37 -07:00
Matias N. Goldberg 364f916f3f
Add debug utilities for Vulkan
Features:
- Debug-only tracking of objects by type. See
get_driver_allocs_by_object_type et al.
 - Debug-only Breadcrumb info for debugging GPU crashes and device lost
 - Performance report per frame from get_perf_report
- Some VMA calls had to be modified in order to insert the necessary
memory callbacks

Functionality marked as "debug-only" is only available in debug or dev
builds.

Misc fixes:
 - Early break optimization in RenderingDevice::uniform_set_create

============================

The work was performed by collaboration of TheForge and Google. I am
merely splitting it up into smaller PRs and cleaning it up.
2024-08-21 23:48:08 +02:00
Rémi Verschelde 82adfebcf8
Merge pull request #94799 from m4gr3d/memory_allocation_cleanup_and_optimizations
Android memory cleanup and optimizations
2024-08-16 23:45:39 +02:00
Fredia Huya-Kouadio a57a99f5bc Memory cleanup and optimizations
- Returns an empty list when there's not registered plugins, thus preventing the creation of spurious iterator objects

- Inline `Godot#getRotatedValues(...)` given it only had a single caller. This allows to remove the allocation of a float array on each call and replace it with float variables

- Disable sensor events by default. Sensor events can fired at 10-100s Hz taking cpu and memory resources. Now the use of sensor data is behind a project setting allowing projects that have use of it to enable it, while other projects don't pay the cost for a feature they don't use

- Create a pool of specialized input `Runnable` objects to prevent spurious, unbounded `Runnable` allocations

- Disable showing the boot logo for Android XR projects

- Delete locale references of jni strings
2024-08-16 09:27:41 -07:00
Rémi Verschelde a7598679cf
Merge pull request #95586 from m4gr3d/fix_last_modified_time_unit
Update the Android `fileLastModified` method to return values in seconds instead of milliseconds
2024-08-16 10:36:56 +02:00
Rémi Verschelde 690c5669e2
Merge pull request #91271 from m4gr3d/clean_gradle_build_setup
Clean up the gradle build logic used to generate the Godot Android binaries
2024-08-16 10:33:19 +02:00
Fredia Huya-Kouadio cde873b406 Update the Android `fileLastModified` method to return values in seconds instead of milliseconds 2024-08-15 12:24:58 -07:00
Pierce Brooks e3482a9336
Android: Ensure cleanup of all subobjects in the OpenSL audio driver 2024-07-30 17:20:46 +02:00
Rémi Verschelde 862d881843
Merge pull request #94923 from m4gr3d/fix_crash_on_android_terminate
Fix crash that occurs on termination of the Godot engine on Android
2024-07-30 12:29:10 +02:00
Fredia Huya-Kouadio 30d63e8ab9 Fix the crash that occurs on termination of the Godot engine on Android 2024-07-29 09:20:50 -07:00
Fredia Huya-Kouadio c1acddfeb4 Fix the `generate_apk` logic when `dev_build` or `debug_symbols` are enabled
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2024-07-29 06:48:49 -07:00
Rémi Verschelde 8239eac5d9
Merge pull request #94809 from ChrisBase/fix_keytool_for_android_export_not_found
Fix Android export failing with custom keystores and no JDK setup in the OS environment
2024-07-28 17:46:42 +02:00
Rémi Verschelde 1d8373a300
Merge pull request #92859 from Summersay415/do-not-strip
Android: Change the way `doNotStrip` is set
2024-07-28 17:46:31 +02:00
Chris 7afefe6469 Fixed Android export failing when no JDK is setup in the OS environment and custom keystores have been set in the export dialog. 2024-07-27 01:33:59 +02:00
Fredia Huya-Kouadio 4d0da74014 Fix the cleanup logic for the Android render thread
On Android the exit logic goes through `Godot#onDestroy()` who attempts to cleanup the engine using the following code:

```
runOnRenderThread {
	GodotLib.ondestroy()
	forceQuit()
}
```

The issue however is that by the time we ran this code, the render thread has already been paused (but not yet destroyed), and thus `GodotLib.ondestroy()` and `forceQuit()` which are scheduled on the render thread are not executed.

To address this, we instead explicitly request the render thread to exit and block until it does. As part of it exit logic, the render thread has been updated to properly destroy and clean the native instance of the Godot engine, resolving the issue.
2024-07-24 10:17:46 -07:00
bruvzg 52a2836861 Disable FP contraction. 2024-07-23 14:33:51 +03:00
Rémi Verschelde a4312eebaa
Merge pull request #94468 from m4gr3d/restart_editor_when_updating_touchscreen_settings
[Android Editor] Resolve issues with the editor touchscreen settings
2024-07-17 12:24:14 +02:00
Rémi Verschelde 7b12dbd74d
Merge pull request #94425 from m4gr3d/fix_remote_android_button_not_enabling
Fix issue preventing enabling the remote button for Android/iOS
2024-07-17 11:44:34 +02:00
Fredia Huya-Kouadio 53a752f2d6 Disable long press for mouse events
Long press is used to simulate right-click events for finger touch and stylus. The previous logic also caused it to trigger for mouse input, which is not needed since the user can instead use the mouse right click button.

This update disables long press as right click events for mouse input.
2024-07-17 02:44:17 -07:00
Fredia Huya-Kouadio 5b327aee96 Fix issue preventing enabling the remote button for Android
https://github.com/godotengine/godot/pull/92032 updated the logic to enable / disable the remote debug button, and in doing so added a `can_export` check.

However, no events / notifications are dispatched when the value of the `can_export` check changes, which in turn prevents the logic used to enable / disable the remote debug button from running again.

The fix consists then in removing the `can_export` check, so that the remote debug button shows as `enabled` when a preset is present and is runnable.
2024-07-16 00:25:16 -07:00