Commit Graph

288 Commits

Author SHA1 Message Date
ace6df6947 Fix custom build export 2021-07-27 09:15:45 -07:00
6639cc9853 Addes ability to load build sources from file.
* If not present, the dialog asks to load build sources from a file.
* The export templates check now also verifies that build sources are installed and skips the template check.

This makes Android development easier.
2021-07-15 10:14:08 -03:00
40a594c6ea Android: Add isGame application attribute, default to true
It can be turned off in the export preset with `package/classify_as_game`.

Upstream definition: https://developer.android.com/guide/topics/manifest/application-element#isGame

> `android:isGame`
>
> Whether or not the application is a game. The system may group together
> applications classifed as games or display them separately from other
> applications.

Also fixes replacing `android:allowBackup` in custom builds.
2021-07-01 11:00:23 +02:00
7b63f0a22d Add GDNative libraries to Android custom Gradle builds 2021-06-29 09:26:28 +01:00
532b0e3462 Add support for custom debug keystore. 2021-06-22 10:05:55 -07:00
e28fd07b2b Rename instance()->instantiate() when it's a verb 2021-06-19 20:49:18 -06:00
de2acbd495 Add adb output to error message when install fails 2021-06-19 17:46:57 +01:00
ac73059b56 Merge pull request #49123 from aaronfranke/it-is-time
Add a Time singleton
2021-06-12 22:55:25 +02:00
f64fea1b23 Add Time singleton 2021-06-11 09:32:39 -04:00
9e328bb5b7 Core: Move DirAccess and FileAccess to core/io
File handling APIs are typically considered part of I/O, and we did have most
`FileAccess` implementations in `core/io` already.
2021-06-11 14:52:39 +02:00
af3ee1c860 Merge pull request #48963 from HaywardMorihara/export-android-keystore-debug-warnings
Exporting -> Android: Keystore Warnings
2021-06-01 15:22:05 +02:00
0d2e02945b Implement shader caching
* Shader compilation is now cached. Subsequent loads take less than a millisecond.
* Improved game, editor and project manager startup time.
* Editor uses .godot/shader_cache to store shaders.
* Game uses user://shader_cache
* Project manager uses $config_dir/shader_cache
* Options to tweak shader caching in project settings.
* Editor path configuration moved from EditorSettings to new class, EditorPaths, so it can be available early on (before shaders are compiled).
* Reworked ShaderCompilerRD to ensure deterministic shader code creation (else shader may change and cache will be invalidated).
* Added shader compression with SMOLV: https://github.com/aras-p/smol-v
2021-05-31 10:13:09 +02:00
1179421068 Allow basic user data backup on Android 2021-05-25 17:47:32 +02:00
2cf19293ba Exporting: Android Debug Keystore Warnings 2021-05-24 19:48:29 -04:00
660952a857 Use an enum to represent screen orientation in the Project Settings
- Tweak the setting property hint to be more informative.
- Make the setting a "basic" setting so it appears when Advanced Settings
  is disabled.
- Remove redundant orientation setting in the iOS export preset.
  The project setting is now used (like on Android).

Projects upgrading from a previous version will have to set the
screen orientation again in the Project Settings if it wasn't set
to the default value ("landscape").
2021-05-24 18:53:10 +02:00
8247667a3e Core: Drop custom copymem/zeromem defines
We've been using standard C library functions `memcpy`/`memset` for these since
2016 with 67f65f6639.

There was still the possibility for third-party platform ports to override the
definitions with a custom header, but this doesn't seem useful anymore.
2021-04-27 16:26:27 +02:00
abb21844d8 Remove deprecated xr features properties. These properties are now provided directly by the plugin. 2021-04-26 13:20:12 -07:00
3a033c44b6 Fix issue causing export to fail with "Could not unzip temporary unaligned APK" error and improve command output logging. 2021-04-15 13:33:37 -07:00
b51dc2dc44 Fix custom boot splash image scaling. 2021-04-12 16:38:41 -07:00
d83761ba80 Style: Apply clang-tidy's readability-braces-around-statements 2021-04-05 14:09:59 +02:00
9bbe51dc27 Style: Apply clang-tidy's modernize-use-nullptr 2021-04-05 14:05:07 +02:00
0e8fae1038 Merge pull request #46457 from m4gr3d/fix_invalid_missing_templates_error_master
Fix invalid missing template error when the Android build template is not installed
2021-02-27 16:52:25 +01:00
6f0ca6c9f7 Fix invalid missing template error when the Android build template is not installed. 2021-02-26 12:31:12 -08:00
6fd881e43c Update the logic to load Godot Android plugins packaged into the binary.
The previous logic had the side effect of imposing a limit of one plugin per `aar` binary. The update lifts that restriction.
2021-02-26 08:38:39 -08:00
eda18fcc1f Update the filtering logic to properly handle directories with .gdignore files. 2021-02-24 18:40:36 -08:00
bc5120eb97 Add logic to record the version of the Godot engine for the Android platform. 2021-02-24 04:23:46 -08:00
310496a89f Merge pull request #45617 from RandomShaper/modernize_atomics
Modernize atomics (and fix `volatile`)
2021-02-18 19:40:31 +01:00
8e128726f0 Modernize atomics
- Based on C++11's `atomic`
- Reworked `SafeRefCount` (based on the rewrite by @hpvb)
- Replaced free atomic functions by the new `SafeNumeric<T>`
- Replaced wrong cases of `volatile bool` by the new `SafeFlag`
- Platform-specific implementations no longer needed

Co-authored-by: Hein-Pieter van Braam-Stewart <hp@tmm.cx>
2021-02-18 17:12:46 +01:00
64140eaf42 Reorganize Project Settings
-Advanced Settings toggle also hides advanced properties when disabled
-Simplified Advanced Bar (errors were just plain redundant)
-Reorganized rendering quality settings.
-Reorganized miscelaneous settings for clean up.
2021-02-18 11:23:34 -03:00
526b99ee36 Disable engine splash logic on Android; this is now handled by the Android theme api.
In addition, add support for scaling and applying filter to the splash screen on Android.
One limitation of the api being used is that the splash screen aspect ratio is not maintained when it's scaled up.
2021-02-18 03:20:49 -08:00
9714abf8cb Add verbose logging to help with troubleshooting the Android build/export process. 2021-02-17 13:18:41 -08:00
99fe462452 Modernize Thread
- Based on C++11's `thread` and `thread_local`
- No more need to allocate-deallocate or check for null
- No pointer anymore, just a member variable
- Platform-specific implementations no longer needed (except for the few cases of non-portable functions)
- Simpler for `NO_THREADS`
- Thread ids are now the same across platforms (main is 1; others follow)
2021-01-29 12:02:13 +01:00
7990c2c5e8 [Plugins] Rename 'PluginConfig' struct to platform specific name 2021-01-15 17:54:35 +03:00
2a74b388d0 Split OS::execute into two methods
1. execute(): Executes a command and returns the results.
2. create_process(): Creates a new process and returns the new process' id.
2021-01-09 10:03:23 +00:00
3433780c49 Merge pull request #44645 from m4gr3d/update_apk_signing_logic
Update the logic to sign prebuilt Godot Android apks
2021-01-01 22:58:11 +01:00
49969de221 Update the logic to sign prebuilt Godot Android apks.
The previously used tool, `jarsigner` has been deprecated in favor of `apksigner` which is bundled with the Android SDK.
The logic is refactored accordingly and a few editor settings have been deprecated in the process as they're no longer necessary.

Note: As a side effect, specifying the Android SDK path is now required. The docs will be updated to reflect that change.
2021-01-01 13:36:27 -08:00
b5334d14f7 Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆
2021-01-01 20:19:21 +01:00
72c13c2631 Merge pull request #44638 from m4gr3d/export_format_util_method
Hardcode the export format for the editor 'run' feature
2020-12-30 09:11:31 +01:00
de64b783b4 Add utility method to export the project using a preset format and sign parameter. 2020-12-29 09:04:01 -08:00
5b937d493f Rename empty() to is_empty() 2020-12-28 10:39:56 +00:00
e1811b689b Initialize class/struct variables with default values in platform/ and editor/ 2020-12-02 16:09:11 +01:00
918b218b55 Update gradle build files to automatically perform signing and zipalign tasks for custom builds. 2020-11-22 18:11:54 -08:00
504efc5f9b Export: Reorder options for consistency across platforms 2020-11-20 11:17:50 +01:00
c4f2d87747 Fix zipalign command name on Windows machines. 2020-11-18 23:30:45 -08:00
9e7348f788 Merge pull request #43526 from m4gr3d/address_new_custom_build_logic_issues
Address new custom build logic issues
2020-11-14 22:58:16 +01:00
5f6a44f0bb Add missing zip alignment step for generated apks. 2020-11-14 13:10:38 -08:00
3de720c11d Fix issue causing Export all to fail. 2020-11-14 13:10:38 -08:00
3c1a1a760e Clear unneeded assets when generating an apk expansion.
Clean up export wording to account for the different export formats.
2020-11-14 13:07:32 -08:00
e1b9be4a6b Added the .jks file extension as valid preset for Android keystore files 2020-11-14 00:29:23 +01:00
597d9409f3 Remove duplicate Android orientation settings. 2020-11-13 12:20:06 -08:00