Commit graph

1490 commits

Author SHA1 Message Date
Rémi Verschelde
51991e2014
Merge pull request #84674 from m4gr3d/add_flag_to_run_scons_from_gradle
Add parameter to allow generation of the Godot native shared libraries from gradle
2024-01-29 23:24:05 +01:00
Mel Collins
8406e60522 Add InputEventKey.location to tell left from right
This adds a new enum `KeyLocation` and associated property
`InputEventKey.location`, which indicates the left/right location of key
events which may come from one of two physical keys, eg. Shift, Ctrl.

It also adds simulation of missing Shift KEYUP events for Windows.
When multiple Shifts are held down at the same time, Windows natively
only sends a KEYUP for the last one to be released.
2024-01-26 14:42:28 +01:00
Fredia Huya-Kouadio
e04a38775b Update Android dependencies for the project
- Update Android gradle plugin version from 7.2.1 to 8.2.0
- Update gradle version from 7.4.2 to 8.2
- Update target SDK from 33 to 34
- Update build tools version from 33.0.2 to 34.0.0
- Update kotlin version from 1.7.0 to 1.9.20
- Update Android fragment version from 1.3.6 to 1.6.2
- Update AndroidX window version from 1.0.0 to 1.2.0
2024-01-18 10:35:32 -08:00
Yuri Sizov
6fa577cada Merge pull request #86383 from m4gr3d/editor_export_specify_java_sdk_path_main
Specify the path to the Java SDK used for the Android gradle build
2024-01-18 19:27:01 +01:00
Fredia Huya-Kouadio
85e98ef009 Specify the path to the Java SDK used for the Android gradle build
Introduce an editor setting to allow users the ability to specify the path to the Java SDK used for the Android gradle build.
2024-01-18 09:19:37 -08:00
Yuri Sizov
95b27fe8c7 Reorganize code related to editor theming
This change introduces a new EditorThemeManager class
to abstract theme generatio and its subroutines.

Logic related to EditorTheme, EditorColorMap, and editor
icons has been extracted into their respective files with
includes cleaned up.

All related files have been moved to a separate folder to
better scope them in the project. This includes relevant
generated files as well.
2024-01-16 11:57:45 +01:00
Alex Drozd
770c3b509b Add clearer error message for missing project icon during android export 2024-01-15 11:41:31 +01:00
Rémi Verschelde
12ee58d8bc
Merge pull request #87080 from m4gr3d/disable_automatic_permissions_request
Disable automatic permissions request
2024-01-11 17:44:53 +01:00
Rémi Verschelde
087a397477
Merge pull request #86301 from KoBeWi/deferred_cleanup
Update deferred calls to use Callables
2024-01-11 17:36:29 +01:00
Fredia Huya-Kouadio
df4f9e8e64 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.
2024-01-11 08:04:09 -08:00
Rémi Verschelde
9b522ac1a8
Merge pull request #86792 from m4gr3d/fix_android_dyn_library_logic_main
Fix Android dynamic library loading
2024-01-09 18:46:39 +01:00
kobewi
0e8f90f4c8 Update deferred calls to use Callables 2024-01-09 16:11:47 +01:00
Rémi Verschelde
c951ec163e
Merge pull request #86882 from Mickeon/its-a-secret-to-everyone
Hide Keystore Release password on Android's Export window
2024-01-08 11:59:55 +01:00
Micky
ca03367801 Hide Keystore Release password on Android's Export window 2024-01-06 18:40:33 +01:00
Muller-Castro
96a95cb974 Add const lvalue ref to container parameters 2024-01-05 14:49:57 -03:00
Rémi Verschelde
1455159d2c
Merge pull request #86379 from m4gr3d/update_render_thread_paused_timing_main
Android: Update the logic used to start / stop the render thread
2024-01-05 12:05:08 +01:00
Fredia Huya-Kouadio
407855b8f8 Revert https://github.com/godotengine/godot/pull/86682 for the Android platform as it breaks dynamic library loading 2024-01-04 10:06:55 -08:00
Rémi Verschelde
5d44c85d4c
Merge pull request #84107 from BlueCube3310/file-access-optimization
Use platform-specific methods for FileAccess reading and writing
2024-01-04 16:39:47 +01:00
Rémi Verschelde
dbd139c91c
Merge pull request #86761 from Alex2782/fix_get_windows_safe_area
Fix `get_window_safe_area` on Android
2024-01-04 14:26:42 +01:00
Rémi Verschelde
6c390b620d
Merge pull request #84445 from Rubonnek/add-const-references-clang-tidy
Add const references detected by clang-tidy
2024-01-04 14:25:33 +01:00
Rémi Verschelde
763a8e9839
Merge pull request #83702 from Patchcoat/VerifyKeystore
Ensure Android keystore username and password are checked on export
2024-01-04 14:25:09 +01:00
Alexander Hartmann
d7c6ad2020 Fix 'get_window_safe_area' on Android 2024-01-03 20:53:37 +01:00
Rémi Verschelde
37df2ff387
Merge pull request #86682 from Daylily-Zeleen/daylily-zeleen/distinguish_between_dynamic_libaray_not_found_and_can't_open
Distinguish between dynamic library not found and can't be opened.
2024-01-02 18:06:17 +01:00
Daylily-Zeleen
fe6b073811 Distinguishs between dynamic library not found and can't be opened. 2024-01-01 20:01:57 +08:00
jsjtxietian
078bfae6a4 Add RD_ENABLED when VULKAN_ENABLED or D3D12_ENABLED is added 2023-12-25 11:13:01 +08:00
Fredia Huya-Kouadio
f537cdefcf Update the logic used to start / stop the render thread
Currently the render thread is started / stopped when the activity is respectively resumed / paused. However, according to the `GLSurfaceView` documentation, this should be done instead when the activity is started / stopped, so this change updates the start / stop logic for the render thread to match the documentation.
2023-12-20 20:37:16 -08:00
Pedro J. Estébanez
12a519bae2 Split RenderingDevice into API-agnostic and RenderingDeviceDriver parts
Credit and thanks to @bruzvg for multiple build fixes, update of 3rd-party items and MinGW support.

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2023-12-20 19:18:08 +01:00
Wilson E. Alvarez
a3cb1b096f
Add const references detected by clang-tidy 2023-12-16 13:36:44 -05:00
Rémi Verschelde
2966db7d76
Merge pull request #84440 from Calinou/scons-android-add-generate-apk-option
Add `generate_apk=yes` to generate an APK after building
2023-12-13 10:31:32 +01:00
Hugo Locurcio
18152ac3a1
Add generate_apk=yes to generate an APK after building
This is useful to speed up iteration when working on the engine
(or editor).

This can be combined with a script that calls `adb` to deploy the APK
on a device (coupled with Godot's `--export-*` for projects)
to further speed up iteration.
2023-12-13 00:27:57 +01:00
Rémi Verschelde
41365c6c8b
Merge pull request #70315 from RandomShaper/d3d12_mesa
Direct3D 12 Rendering Driver (Mesa NIR approach)
2023-12-12 21:58:57 +01:00
Pedro J. Estébanez
2f47c57385 Add Direct3D 12 RenderingDevice implementation 2023-12-12 19:10:04 +01:00
Yuri Sizov
07677f0f51 Merge pull request #85885 from YuriSizov/bench-pressing
Improve engine startup/shutdown benchmarks
2023-12-08 17:12:26 +01:00
Yuri Sizov
26ba706831 Merge pull request #85845 from YuriSizov/editor-export-hidden-errors
Ensure more export errors are reported to users
2023-12-08 16:59:04 +01:00
Yuri Sizov
62b264e6ac Merge pull request #84676 from m4gr3d/update_package_name_validation_logic
Update the validation logic for the package name
2023-12-08 15:23:23 +01:00
Yuri Sizov
fc3f40f37d Improve engine startup/shutdown benchmarks
- Add contexts to give a better sense of benchmarked areas.
- Add missing benchmarks and adjust some begin/end points.
- Clean up names.
- Improve Android's internal benchmarks in a similar manner.

Co-authored-by: Fredia Huya-Kouadio <fhuya@meta.com>
2023-12-08 12:53:04 +01:00
Yuri Sizov
773b4d7764 Ensure more export errors are reported to users
Also fixes the timing issue when exporting all
presets at the same time, where the error report
would try to appear while the progress dialog
was still visible.
2023-12-06 15:26:07 +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
Fredia Huya-Kouadio
0325568a9b 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
2023-11-09 10:28:26 -08:00
Fredia Huya-Kouadio
4628d0c7dc Add parameter to allow generation of the Godot native shared libraries from the gradle build command 2023-11-09 09:14:04 -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
Patchcoat
f8e10a2610 android keystore username and password are checked on export 2023-11-03 20:24:35 -05: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