summaryrefslogtreecommitdiffstats
path: root/platform/android/export/export_plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/export/export_plugin.cpp')
-rw-r--r--platform/android/export/export_plugin.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp
index 479158c91f..689360aef6 100644
--- a/platform/android/export/export_plugin.cpp
+++ b/platform/android/export/export_plugin.cpp
@@ -441,6 +441,7 @@ void EditorExportPlatformAndroid::_update_preset_status() {
} else {
has_runnable_preset.clear();
}
+ devices_changed.set();
}
#endif
@@ -2322,7 +2323,8 @@ static bool has_valid_keystore_credentials(String &r_error_str, const String &p_
args.push_back(p_password);
args.push_back("-alias");
args.push_back(p_username);
- Error error = OS::get_singleton()->execute("keytool", args, &output, nullptr, true);
+ String keytool_path = EditorExportPlatformAndroid::get_keytool_path();
+ Error error = OS::get_singleton()->execute(keytool_path, args, &output, nullptr, true);
String keytool_error = "keytool error:";
bool valid = output.substr(0, keytool_error.length()) != keytool_error;
@@ -3268,18 +3270,17 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP
}
List<String> copy_args;
- String copy_command;
- if (export_format == EXPORT_FORMAT_AAB) {
- copy_command = vformat("copyAndRename%sAab", build_type);
- } else if (export_format == EXPORT_FORMAT_APK) {
- copy_command = vformat("copyAndRename%sApk", build_type);
- }
-
+ String copy_command = "copyAndRenameBinary";
copy_args.push_back(copy_command);
copy_args.push_back("-p"); // argument to specify the start directory.
copy_args.push_back(build_path); // start directory.
+ copy_args.push_back("-Pexport_build_type=" + build_type.to_lower());
+
+ String export_format_arg = export_format == EXPORT_FORMAT_AAB ? "aab" : "apk";
+ copy_args.push_back("-Pexport_format=" + export_format_arg);
+
String export_filename = p_path.get_file();
String export_path = p_path.get_base_dir();
if (export_path.is_relative_path()) {