Fix order of operations for macos template check
(cherry picked from commit 8f2b701892
)
This commit is contained in:
parent
dc221c50ab
commit
a207e53def
|
@ -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 {
|
bool EditorExportPlatformMacOS::has_valid_export_configuration(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates, bool p_debug) const {
|
||||||
String err;
|
String err;
|
||||||
// Look for export templates (custom templates).
|
// Look for export templates (official templates first, then custom).
|
||||||
bool dvalid = false;
|
bool dvalid = exists_export_template("macos.zip", &err);
|
||||||
bool rvalid = false;
|
bool rvalid = dvalid; // Both in the same ZIP.
|
||||||
|
|
||||||
if (p_preset->get("custom_template/debug") != "") {
|
if (p_preset->get("custom_template/debug") != "") {
|
||||||
dvalid = FileAccess::exists(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;
|
bool valid = dvalid || rvalid;
|
||||||
r_missing_templates = !valid;
|
r_missing_templates = !valid;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue