From 8289f8628d797c0c503ad050829b3d44eef502c7 Mon Sep 17 00:00:00 2001 From: Marcelo Fernandez Date: Sat, 3 Mar 2018 10:23:00 -0300 Subject: [PATCH] Modify OSX can_export logic to match the logic from EditorExportPlatformPC::can_export (cherry picked from commit a42dfd7882305e80ba7f7cdacc836de1139d6b50) --- platform/osx/export/export.cpp | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp index c4efa1f0ffd..3d6455b492c 100644 --- a/platform/osx/export/export.cpp +++ b/platform/osx/export/export.cpp @@ -626,21 +626,27 @@ Error EditorExportPlatformOSX::export_project(const Ref &p_p bool EditorExportPlatformOSX::can_export(const Ref &p_preset, String &r_error, bool &r_missing_templates) const { - bool valid = true; + bool valid = false; String err; - if (!exists_export_template("osx.zip", &err)) { - valid = false; + if (exists_export_template("osx.zip", &err)) { + valid = true; } - if (p_preset->get("custom_package/debug") != "" && !FileAccess::exists(p_preset->get("custom_package/debug"))) { - valid = false; - err += "Custom debug package not found.\n"; + if (p_preset->get("custom_package/debug") != "") { + if (FileAccess::exists(p_preset->get("custom_package/debug"))) { + valid = true; + } else { + err += "Custom debug package not found.\n"; + } } - if (p_preset->get("custom_package/release") != "" && !FileAccess::exists(p_preset->get("custom_package/release"))) { - valid = false; - err += "Custom release package not found.\n"; + if (p_preset->get("custom_package/release") != "") { + if (FileAccess::exists(p_preset->get("custom_package/release"))) { + valid = true; + } else { + err += "Custom release package not found.\n"; + } } if (!err.empty())