aboutsummaryrefslogtreecommitdiff
path: root/src/build_settings.cpp
diff options
context:
space:
mode:
authorIllusionMan1212 <hisham.abourgheba@gmail.com>2025-04-05 02:21:56 +0200
committerIllusionMan1212 <hisham.abourgheba@gmail.com>2025-04-05 02:38:04 +0200
commitda885fb80789ba07475bd85415f9f0b662e9c282 (patch)
tree8f1a4d56f1b97d7df027c7b125dabdfdaa9e1c7c /src/build_settings.cpp
parent44950d5f37f1a288182179b9b106f3510f51704e (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/build_settings.cpp')
-rw-r--r--src/build_settings.cpp17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/build_settings.cpp b/src/build_settings.cpp
index 2152f7566..954cb018c 100644
--- a/src/build_settings.cpp
+++ b/src/build_settings.cpp
@@ -551,11 +551,9 @@ struct BuildContext {
String ODIN_ANDROID_NDK_TOOLCHAIN_LIB_LEVEL;
String ODIN_ANDROID_NDK_TOOLCHAIN_SYSROOT;
- String ODIN_ANDROID_JAR_SIGNER;
String android_keystore;
String android_keystore_alias;
String android_keystore_password;
- String android_manifest;
};
gb_global BuildContext build_context = {0};
@@ -1574,30 +1572,15 @@ gb_internal void init_android_values(bool with_sdk) {
bc->ODIN_ANDROID_NDK_TOOLCHAIN_SYSROOT = concatenate_strings(permanent_allocator(), bc->ODIN_ANDROID_NDK_TOOLCHAIN, str_lit("sysroot/"));
- bc->ODIN_ANDROID_JAR_SIGNER = normalize_path(permanent_allocator(), make_string_c(gb_get_env("ODIN_ANDROID_JAR_SIGNER", permanent_allocator())), NIX_SEPARATOR_STRING);
- // Strip trailing slash so system() call doesn't fail.
- bc->ODIN_ANDROID_JAR_SIGNER = substring(bc->ODIN_ANDROID_JAR_SIGNER, 0, bc->ODIN_ANDROID_JAR_SIGNER.len - 1);
if (with_sdk) {
if (bc->ODIN_ANDROID_SDK.len == 0) {
gb_printf_err("Error: ODIN_ANDROID_SDK not set, which is required for -build-mode:executable for -subtarget:android");
gb_exit(1);
}
- if (bc->ODIN_ANDROID_JAR_SIGNER.len == 0) {
- gb_printf_err("Error: ODIN_ANDROID_JAR_SIGNER not set, which is required for -build-mode:executable for -subtarget:android");
- gb_exit(1);
- }
if (bc->android_keystore.len == 0) {
gb_printf_err("Error: -android-keystore:<string> has not been set\n");
gb_exit(1);
}
- if (bc->android_keystore_alias.len == 0) {
- gb_printf_err("Error: -android-keystore_alias:<string> has not been set\n");
- gb_exit(1);
- }
- if (bc->android_keystore_password.len == 0) {
- gb_printf_err("Error: -android-keystore-password:<string> has not been set\n");
- gb_exit(1);
- }
}
}