summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-06-02 10:07:35 +0200
committerGitHub <noreply@github.com>2020-06-02 10:07:35 +0200
commit07025e607dda2ab3b35bee65614347dc39f6f236 (patch)
treed7521e4a8732145aaeecd3949668800190ab4d6b
parent34ef9a51200978f9c552999969279fc4d6dba31b (diff)
parentbe22a1f9bcf70f74ab7005bf1e58ff1c877d0cbc (diff)
Merge pull request #39227 from nekomatata/android-export-template-errors
Fix inconsistent error messages with Android custom export templates
-rw-r--r--platform/android/export/export.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index b678bbb886..3579b5a112 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -1729,23 +1729,32 @@ public:
// Look for export templates (first official, and if defined custom templates).
if (!bool(p_preset->get("custom_template/use_custom_build"))) {
- bool dvalid = exists_export_template("android_debug.apk", &err);
- bool rvalid = exists_export_template("android_release.apk", &err);
+ String template_err;
+ bool dvalid = false;
+ bool rvalid = false;
if (p_preset->get("custom_template/debug") != "") {
dvalid = FileAccess::exists(p_preset->get("custom_template/debug"));
if (!dvalid) {
- err += TTR("Custom debug template not found.") + "\n";
+ template_err += TTR("Custom debug template not found.") + "\n";
}
+ } else {
+ dvalid = exists_export_template("android_debug.apk", &template_err);
}
+
if (p_preset->get("custom_template/release") != "") {
rvalid = FileAccess::exists(p_preset->get("custom_template/release"));
if (!rvalid) {
- err += TTR("Custom release template not found.") + "\n";
+ template_err += TTR("Custom release template not found.") + "\n";
}
+ } else {
+ rvalid = exists_export_template("android_release.apk", &template_err);
}
valid = dvalid || rvalid;
+ if (!valid) {
+ err += template_err;
+ }
} else {
valid = exists_export_template("android_source.zip", &err);
}