Modify OSX can_export logic to match the logic from EditorExportPlatformPC::can_export
(cherry picked from commit a42dfd7882
)
This commit is contained in:
parent
91bc845152
commit
8289f8628d
|
@ -626,22 +626,28 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
|
||||||
|
|
||||||
bool EditorExportPlatformOSX::can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const {
|
bool EditorExportPlatformOSX::can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const {
|
||||||
|
|
||||||
bool valid = true;
|
bool valid = false;
|
||||||
String err;
|
String err;
|
||||||
|
|
||||||
if (!exists_export_template("osx.zip", &err)) {
|
if (exists_export_template("osx.zip", &err)) {
|
||||||
valid = false;
|
valid = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p_preset->get("custom_package/debug") != "" && !FileAccess::exists(p_preset->get("custom_package/debug"))) {
|
if (p_preset->get("custom_package/debug") != "") {
|
||||||
valid = false;
|
if (FileAccess::exists(p_preset->get("custom_package/debug"))) {
|
||||||
|
valid = true;
|
||||||
|
} else {
|
||||||
err += "Custom debug package not found.\n";
|
err += "Custom debug package not found.\n";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (p_preset->get("custom_package/release") != "" && !FileAccess::exists(p_preset->get("custom_package/release"))) {
|
if (p_preset->get("custom_package/release") != "") {
|
||||||
valid = false;
|
if (FileAccess::exists(p_preset->get("custom_package/release"))) {
|
||||||
|
valid = true;
|
||||||
|
} else {
|
||||||
err += "Custom release package not found.\n";
|
err += "Custom release package not found.\n";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!err.empty())
|
if (!err.empty())
|
||||||
r_error = err;
|
r_error = err;
|
||||||
|
|
Loading…
Reference in New Issue