Commit graph

1029 commits

Author SHA1 Message Date
Rémi Verschelde
b18ef4dc83 SCons: Remove redundant -fomit-frame-pointer and -ftree-vectorize
- `-fomit-frame-pointer` is included automatically by both GCC and
  Clang in `-O1` and above.
- `-ftree-vectorize` is included automatically by GCC in `-O2` and
  beyond, and seems always enabled by Clang.

Closes #66296. See that issue for a detailed investigation.

(cherry picked from commit c5c3d13dc0)
2022-12-04 20:03:06 +08:00
Fredia Huya-Kouadio
d08e057194
Fix parsing of the keep_screen_on display setting
(cherry picked from commit 3c75887d41)
2022-11-30 15:52:10 +01:00
HolonProduction
477d24b6d1
Fix wrong android key mapping.
Fixes the wrong mapping of `Key::HOME`. Androids `KEYCODE_HOME` is in fact the hardware home button the right mapping is `KEYCODE_MOVE_HOME`.

Also adds mappings to keys that were not present before.

(cherry picked from commit a3f0dc5a83)
2022-11-30 15:47:30 +01:00
Dan
d789ad4b20 fix exporting Android APPLICATION_ATTRIBS (3.X) 2022-11-22 12:24:17 -08:00
Fredia Huya-Kouadio
5aab84befb Fix 'save & restart' logic for the Android Editor 2022-11-16 03:29:40 -08:00
Fredia Huya-Kouadio
5149311316 Add support for pointer capture 2022-11-07 08:38:28 -08:00
Fredia Huya-Kouadio
be4b07c3e4 Add double_tap attribute to InputEventScreenTouch
This provides parity with the `InputEventMouseButton` allowing for proper conversion between the two events.
2022-10-20 11:56:11 -07:00
Fredia Huya-Kouadio
71c76a4ff2 Update the clean task configuration
Running `gradlew clean` will now properly delete the generated build artifacts
2022-10-18 20:37:23 -07:00
Fredia Huya-Kouadio
6f153593dc
Merge pull request #66945 from m4gr3d/add_mouse_cursor_shape_support_3x
Add cursor shape support for the Android platform
2022-10-05 13:06:58 -07:00
Fredia Huya-Kouadio
46f091a803 Add cursor shape support for the Android platform 2022-10-05 12:08:54 -07:00
Jason Knight
31fe6848e8 Fix null in android keyboard handling. 2022-10-05 11:18:39 -06:00
Rémi Verschelde
d5c1baa288 SCons: Refactor handling of production flag and per-platform LTO defaults
Fixup to #63288.
See #65583 for the bug report.

Co-authored-by: Cyberrebell <chainsaw75@web.de>
(cherry picked from commit 35a15e6191)
2022-09-20 10:26:17 +02:00
Fredia Huya-Kouadio
1f23bac645 Disable menus and functionality that are not relevant on the Android Editor port 2022-09-13 07:38:07 -07:00
Fredia Huya-Kouadio
da332d69c0 Exclude small screens from the set of supported devices. 2022-09-12 08:00:23 -07:00
Fredia Huya-Kouadio
f37390cbc5 Update the versioning logic for the Godot Android Editor
This is necessary to separate subsequent uploads to the Google Play store as each upload needs to increment the version code.
2022-09-12 07:59:45 -07:00
Rémi Verschelde
953dea1227
Merge pull request #63309 from akien-mga/3.x-scons-refactor-lto 2022-09-08 11:24:54 +02:00
Rémi Verschelde
bfe60393f5
Merge pull request #65503 from m4gr3d/fix_invalid_project_manager_path_3x 2022-09-08 09:48:43 +02:00
Fredia Huya-Kouadio
4be7c91cd9 Fix issue causing the project manager to crash because of missing path argument
In the process, the initialization logic is updated to show an error message and gracefully close the engine when setup errors occur.
2022-09-07 14:25:22 -07:00
Fredia Huya-Kouadio
63df48a59c Enable long press, pan and scale gestures for the Godot Android Editor
Fix the bug causing the editor to crash when running the project.
2022-09-07 13:29:31 -07:00
Fredia Huya-Kouadio
440fa10246 Cleanup the Android input logic implementation 2022-09-07 13:29:31 -07:00
Rémi Verschelde
570e6c1730 SCons: Refactor LTO options with lto=<none|thin|full>
Adds support for LTO on macOS and Android.
Disable LTO by default on iOS even if `production=yes` is set.

Also add `linker` option to `server` platform missed in #63283.

Refactor code handling old arguments to make it simpler (breaks compat,
but is explicit enough about it and scripts are easy to fix).
2022-09-05 14:45:12 +02:00
Fredia Huya-Kouadio
9910d4681d Additional fixes to the Android get_current_dir() implementation. 2022-08-30 10:08:30 -07:00
bruvzg
c4885c8be8 Use clang as assembler to ensure preprocessing is done, and add assembler "target" flag.
(cherry picked from commit e873778561)
2022-08-24 18:26:29 +02:00
Fredia Huya-Kouadio
b5e1096c61 Fix issue with get_current_dir() returning the wrong path on Android 2022-08-19 20:32:55 -07:00
Fredia Huya-Kouadio
989d5990ad
Merge pull request #64420 from m4gr3d/investigate_read_write_access_loss_3x
[3.x] Fix issue preventing the Android Editor from displaying the project content
2022-08-15 13:19:01 -07:00
Fredia Huya-Kouadio
3ac6b6a596 Disable threads used to check on plugins to load
The functionality is unavailable on Android (requires export capability) and unnecessarily consumes resources
2022-08-15 02:30:08 -07:00
Fredia Huya-Kouadio
30479543b0 Fix issue preventing the Android Editor from displaying the project content
The issue was causing by a bug within the logic for `FileAccessFilesystemJAndroid#eof_reached()` causing that value to remain false after the eof was reached.
This in turn caused an infinite loop in the file scanner preventing the project's content from showing up.
2022-08-15 02:21:34 -07:00
Fredia Huya-Kouadio
ef44e63f22 Fix GodotTTS native initialization 2022-08-14 22:01:31 -07:00
Fredia Huya-Kouadio
d2213f76a9 Refactor the export checking logic to improve separation of concerns 2022-08-14 08:47:09 -07:00
Rémi Verschelde
8cc8127bb1
Merge pull request #62886 from madmiraal/fix-59931-3.x 2022-08-08 15:54:39 +02:00
Rémi Verschelde
0bed7ea63f
Merge pull request #61316 from bruvzg/tts_3x
[3.x] Backport text-to-speech support.
2022-08-05 23:45:51 +02:00
Rémi Verschelde
26762a71b6
Merge pull request #58537 from winterpixelgames/feature/virtual-keyboard-types-3.x 2022-08-05 19:37:13 +02:00
Rémi Verschelde
751b16a285 File: Re-add support to skip CR (\r) in File::get_as_text
This was removed in #63481, and we confirmed that it's better like this,
but we add back the possibility to strip CR as an option, to optionally
restore the previous behavior.

For performance this is done directly in `String::parse_utf8`.

Also fixes Android `FileAccess::get_line()` as this one _should_ strip CR.

Supersedes #63717.

(cherry picked from commit 1418f97c70)
2022-08-01 00:40:55 +02:00
Rémi Verschelde
6c8d9b8401
Merge pull request #63480 from m4gr3d/fix_remaining_scoped_storage_regressions_3x
[3.x] Address remaining scoped storage regressions
2022-07-26 18:15:14 +02:00
Fredia Huya-Kouadio
fc2c202312 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:42:49 -07:00
Rémi Verschelde
818f1eed31 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 14:53:37 +02:00
Marcel Admiraal
2f7de4c8ed Fix incorrect Android scancodes 2022-07-13 16:24:37 +01:00
Jan Haller
861e155543 Fix exit code of --help and --version, and test them in CI
Corrects prior regression which caused ERROR output and exit code of 1.

(cherry picked from commit d38d76d039)
2022-07-08 14:54:16 +02:00
Brian Semrau
ce24b48e50 Add support for multiple virtual keyboard types 2022-07-07 14:22:28 -04:00
Fredia Huya-Kouadio
27b63247fd Fix issue causing the Android Editor port to crash when saving a scene
In addition:
- Disable 'adb devices' query (not supported when running the editor on Android devices
- Add `move_to_trash` implementation for Android devices
2022-07-05 02:59:52 -07:00
Fredia Huya-Kouadio
0abc4ad129 Fix the directory copy bug issue
The issue was caused by a logic bug causing end of file to be reported for empty files.
2022-07-04 12:56:53 -07:00
Rémi Verschelde
f089f77c2a 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:09:41 +02:00
bruvzg
6489fe890e
Backport text-to-speech support. 2022-07-01 11:04:50 +03:00
ne0fhyk
24e3b3b88d 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-06-26 16:53:02 -07:00
Rémi Verschelde
98b4a7c2da
Merge pull request #61692 from madmiraal/android-ndk-23-3.x
[3.x] Upgrade Android NDK to r23 LTS
2022-06-26 21:24:14 +02:00
Rémi Verschelde
af4e3cb931
Merge pull request #62290 from madmiraal/fix-61816-3.x
[3.x] Remove broken scroll gesture on Android
2022-06-26 08:38:08 +02:00
Marcel Admiraal
061c280873 Upgrade Android NDK to r23 LTS 2022-06-25 16:02:19 +01:00
Gustavo Maciel
a38119a746 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

(cherry picked from commit ec6d5d6cba)
2022-06-23 15:59:15 +02:00
Marcel Admiraal
9091309ab7 Remove broken scroll gesture on Android 2022-06-21 17:04:42 +01:00
Marcel Admiraal
50bf882fcc Ensure joystick has been added or not already removed when processing input
(cherry picked from commit 806e7d18d1)
2022-06-16 20:47:49 +02:00