summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-03-03 16:20:10 +0100
committerGitHub <noreply@github.com>2018-03-03 16:20:10 +0100
commitcf0bc13588a28401058d744abd6673c6974377eb (patch)
tree390509b98b3da51941eda150c2e534511b86a4d6
parentcbb4fe45d039ad16abe992d2212011c260d6ac17 (diff)
parenta42dfd7882305e80ba7f7cdacc836de1139d6b50 (diff)
Merge pull request #17226 from marcelofg55/osx_export_logic
Modify OSX can_export logic to match the logic from EditorExportPlatformPC::can_export
-rw-r--r--platform/osx/export/export.cpp24
1 files changed, 15 insertions, 9 deletions
diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp
index 7985a241e4..edd093afbb 100644
--- a/platform/osx/export/export.cpp
+++ b/platform/osx/export/export.cpp
@@ -614,21 +614,27 @@ 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 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())