summaryrefslogtreecommitdiff
path: root/platform/android/export/export.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-12-20 09:42:34 +0100
committerGitHub <noreply@github.com>2018-12-20 09:42:34 +0100
commit45f1cdb0b73b355d9c959e9f2a12bb4dc58c6e13 (patch)
tree4c7f1290efe93cfa49d14fc420c533bd3080e963 /platform/android/export/export.cpp
parente8cdbf99e9bd9757f8d2630e66ba12654b05fbda (diff)
parente3e5a1bb6e3ae3d667eb622003d4c7d0cc713cd0 (diff)
Merge pull request #24481 from vnen/android-export-debug-keystore
Add option to add debug keystore in Android export
Diffstat (limited to 'platform/android/export/export.cpp')
-rw-r--r--platform/android/export/export.cpp26
1 files changed, 20 insertions, 6 deletions
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index 7f8d50b8ab..bfe737f138 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -1157,6 +1157,9 @@ public:
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, launcher_icons[i].option_id, PROPERTY_HINT_FILE, "*.png"), ""));
}
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "keystore/debug", PROPERTY_HINT_GLOBAL_FILE, "*.keystore"), ""));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "keystore/debug_user"), ""));
+ r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "keystore/debug_password"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "keystore/release", PROPERTY_HINT_GLOBAL_FILE, "*.keystore"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "keystore/release_user"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "keystore/release_password"), ""));
@@ -1417,12 +1420,15 @@ public:
err += "OpenJDK 8 jarsigner not configured in the Editor Settings.\n";
}
- String dk = EditorSettings::get_singleton()->get("export/android/debug_keystore");
+ String dk = p_preset->get("keystore/debug");
if (!FileAccess::exists(dk)) {
- valid = false;
- err += "Debug keystore not configured in the Editor Settings.\n";
+ dk = EditorSettings::get_singleton()->get("export/android/debug_keystore");
+ if (!FileAccess::exists(dk)) {
+ valid = false;
+ err += "Debug keystore not configured in the Editor Settings nor in the preset.\n";
+ }
}
bool apk_expansion = p_preset->get("apk_expansion/enable");
@@ -1772,9 +1778,17 @@ public:
String password;
String user;
if (p_debug) {
- keystore = EditorSettings::get_singleton()->get("export/android/debug_keystore");
- password = EditorSettings::get_singleton()->get("export/android/debug_keystore_pass");
- user = EditorSettings::get_singleton()->get("export/android/debug_keystore_user");
+
+ keystore = p_preset->get("keystore/debug");
+ password = p_preset->get("keystore/debug_password");
+ user = p_preset->get("keystore/debug_user");
+
+ if (keystore.empty()) {
+
+ keystore = EditorSettings::get_singleton()->get("export/android/debug_keystore");
+ password = EditorSettings::get_singleton()->get("export/android/debug_keystore_pass");
+ user = EditorSettings::get_singleton()->get("export/android/debug_keystore_user");
+ }
ep.step("Signing debug APK...", 103);