summaryrefslogtreecommitdiffstats
path: root/platform/macos/export
diff options
context:
space:
mode:
authorAlex Drozd <drozdster@gmail.com>2023-11-16 23:31:42 +0100
committerAlex Drozd <drozdster@gmail.com>2023-11-26 23:26:32 +0100
commit8f2b7018928845a96a61493d53cab4754cc8320d (patch)
treec9737abd69ad6f16448219739caa1a7292225991 /platform/macos/export
parent5df98679672c12d96b4ac4d96ee17f1559207401 (diff)
downloadredot-engine-8f2b7018928845a96a61493d53cab4754cc8320d.tar.gz
Fix order of operations for macos template check
Diffstat (limited to 'platform/macos/export')
-rw-r--r--platform/macos/export/export_plugin.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/platform/macos/export/export_plugin.cpp b/platform/macos/export/export_plugin.cpp
index 24cb76b4ab..8761fe22e3 100644
--- a/platform/macos/export/export_plugin.cpp
+++ b/platform/macos/export/export_plugin.cpp
@@ -2026,9 +2026,9 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p
bool EditorExportPlatformMacOS::has_valid_export_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates, bool p_debug) const {
String err;
- // Look for export templates (custom templates).
- bool dvalid = false;
- bool rvalid = false;
+ // Look for export templates (official templates first, then custom).
+ bool dvalid = exists_export_template("macos.zip", &err);
+ bool rvalid = dvalid; // Both in the same ZIP.
if (p_preset->get("custom_template/debug") != "") {
dvalid = FileAccess::exists(p_preset->get("custom_template/debug"));
@@ -2043,12 +2043,6 @@ bool EditorExportPlatformMacOS::has_valid_export_configuration(const Ref<EditorE
}
}
- // Look for export templates (official templates, check only is custom templates are not set).
- if (!dvalid || !rvalid) {
- dvalid = exists_export_template("macos.zip", &err);
- rvalid = dvalid; // Both in the same ZIP.
- }
-
bool valid = dvalid || rvalid;
r_missing_templates = !valid;