diff options
| author | IllusionMan1212 <hisham.abourgheba@gmail.com> | 2025-04-05 02:21:56 +0200 |
|---|---|---|
| committer | IllusionMan1212 <hisham.abourgheba@gmail.com> | 2025-04-05 02:38:04 +0200 |
| commit | da885fb80789ba07475bd85415f9f0b662e9c282 (patch) | |
| tree | 8f1a4d56f1b97d7df027c7b125dabdfdaa9e1c7c /src/main.cpp | |
| parent | 44950d5f37f1a288182179b9b106f3510f51704e (diff) | |
android bundling improvements
replace `jarsigner` with build tools' `apksigner` which is capable of using newer signature schemes
remove the `android-manifest` flag and assume the file exists in the directory we're bundling
make `android-keystore-alias` and `android-keystore-password` optional.
The former is not needed if there's only one key in the keystore, and the latter will be prompted by `apksigner` if missing
don't change the working directory to the bundled directory to prevent confusion when passing a relative path to
`android-keystore`
add the `res`, `assets`, and `lib` directories to the bundle if they exist in the bundled directory
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/main.cpp b/src/main.cpp index 5a54e9bc3..155e48d9c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -413,7 +413,6 @@ enum BuildFlagKind { BuildFlag_AndroidKeystore, BuildFlag_AndroidKeystoreAlias, BuildFlag_AndroidKeystorePassword, - BuildFlag_AndroidManifest, BuildFlag_COUNT, }; @@ -634,7 +633,6 @@ gb_internal bool parse_build_flags(Array<String> args) { add_flag(&build_flags, BuildFlag_AndroidKeystore, str_lit("android-keystore"), BuildFlagParam_String, Command_bundle_android); add_flag(&build_flags, BuildFlag_AndroidKeystoreAlias, str_lit("android-keystore-alias"), BuildFlagParam_String, Command_bundle_android); add_flag(&build_flags, BuildFlag_AndroidKeystorePassword, str_lit("android-keystore-password"), BuildFlagParam_String, Command_bundle_android); - add_flag(&build_flags, BuildFlag_AndroidManifest, str_lit("android-manifest"), BuildFlagParam_String, Command_bundle_android); Array<String> flag_args = {}; @@ -1671,11 +1669,6 @@ gb_internal bool parse_build_flags(Array<String> args) { GB_ASSERT(value.kind == ExactValue_String); build_context.android_keystore_password = value.value_string; break; - - case BuildFlag_AndroidManifest: - GB_ASSERT(value.kind == ExactValue_String); - build_context.android_manifest = value.value_string; - break; } } @@ -2208,7 +2201,7 @@ gb_internal void remove_temp_files(lbGenerator *gen) { return; } - TIME_SECTION("remove keep temp files"); + TIME_SECTION("remove temp files"); for (String const &path : gen->output_temp_paths) { gb_file_remove(cast(char const *)path.text); @@ -2560,7 +2553,7 @@ gb_internal void print_show_help(String const arg0, String command, String optio if (print_flag("-minimum-os-version:<string>")) { print_usage_line(2, "Sets the minimum OS version targeted by the application."); print_usage_line(2, "Default: -minimum-os-version:11.0.0"); - print_usage_line(2, "Only used when target is Darwin, if given, linking mismatched versions will emit a warning."); + print_usage_line(2, "Only used when target is Darwin or subtarget is Android, if given, linking mismatched versions will emit a warning."); } } |