diff options
Diffstat (limited to 'platform/osx/export')
-rw-r--r-- | platform/osx/export/export.cpp | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp index 24c80dccf5..b2ef9c0038 100644 --- a/platform/osx/export/export.cpp +++ b/platform/osx/export/export.cpp @@ -451,10 +451,11 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p EditorProgress ep("export", "Exporting for OSX", 3, true); - if (p_debug) + if (p_debug) { src_pkg_name = p_preset->get("custom_template/debug"); - else + } else { src_pkg_name = p_preset->get("custom_template/release"); + } if (src_pkg_name == "") { String err; @@ -487,12 +488,13 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p String binary_to_use = "godot_osx_" + String(p_debug ? "debug" : "release") + ".64"; String pkg_name; - if (p_preset->get("application/name") != "") + if (p_preset->get("application/name") != "") { pkg_name = p_preset->get("application/name"); // app_name - else if (String(ProjectSettings::get_singleton()->get("application/config/name")) != "") + } else if (String(ProjectSettings::get_singleton()->get("application/config/name")) != "") { pkg_name = String(ProjectSettings::get_singleton()->get("application/config/name")); - else + } else { pkg_name = "Unnamed"; + } String pkg_name_safe = OS::get_singleton()->get_safe_dir_name(pkg_name); @@ -580,10 +582,11 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p if (file == "Contents/Resources/icon.icns") { //see if there is an icon String iconpath; - if (p_preset->get("application/icon") != "") + if (p_preset->get("application/icon") != "") { iconpath = p_preset->get("application/icon"); - else + } else { iconpath = ProjectSettings::get_singleton()->get("application/config/icon"); + } if (iconpath != "") { if (iconpath.get_extension() == "icns") { @@ -761,8 +764,9 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p while (true) { int r = pf->get_buffer(buf, BSIZE); - if (r <= 0) + if (r <= 0) { break; + } zipWriteInFileInZip(dst_pkg_zip, buf, r); } @@ -832,8 +836,9 @@ bool EditorExportPlatformOSX::can_export(const Ref<EditorExportPreset> &p_preset valid = dvalid || rvalid; r_missing_templates = !valid; - if (!err.empty()) + if (!err.empty()) { r_error = err; + } return valid; } |