summaryrefslogtreecommitdiff
path: root/platform/osx/export
diff options
context:
space:
mode:
authorMarcelo Fernandez <marcelofg55@gmail.com>2018-03-06 12:13:18 -0300
committerMarcelo Fernandez <marcelofg55@gmail.com>2018-03-06 14:23:17 -0300
commit0876502f7288a6d4e4bfb58f8692db3516bebb7c (patch)
tree346026f671310dbcedf6209414c3bfa88537e84a /platform/osx/export
parent4f1b87265e1e74b1fdd0aa0aa59a9daf03fd3f40 (diff)
Improved error checking at EditorExportPlatformPC::export_project
Diffstat (limited to 'platform/osx/export')
-rw-r--r--platform/osx/export/export.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp
index edd093afbb..db265812fa 100644
--- a/platform/osx/export/export.cpp
+++ b/platform/osx/export/export.cpp
@@ -496,7 +496,7 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
if (use_dmg()) {
String pack_path = tmp_app_path_name + "/Contents/Resources/" + pkg_name + ".pck";
Vector<SharedObject> shared_objects;
- Error err = save_pack(p_preset, pack_path, &shared_objects);
+ err = save_pack(p_preset, pack_path, &shared_objects);
// see if we can code sign our new package
String identity = p_preset->get("codesign/identity");
@@ -504,7 +504,7 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
if (err == OK) {
DirAccess *da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
for (int i = 0; i < shared_objects.size(); i++) {
- da->copy(shared_objects[i].path, tmp_app_path_name + "/Contents/Frameworks/" + shared_objects[i].path.get_file());
+ err = da->copy(shared_objects[i].path, tmp_app_path_name + "/Contents/Frameworks/" + shared_objects[i].path.get_file());
if (err == OK && identity != "") {
err = _code_sign(p_preset, tmp_app_path_name + "/Contents/Frameworks/" + shared_objects[i].path.get_file());
}
@@ -549,7 +549,7 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
String pack_path = EditorSettings::get_singleton()->get_cache_dir().plus_file(pkg_name + ".pck");
Vector<SharedObject> shared_objects;
- Error err = save_pack(p_preset, pack_path, &shared_objects);
+ err = save_pack(p_preset, pack_path, &shared_objects);
if (err == OK) {
zipOpenNewFileInZip(dst_pkg_zip,
@@ -581,7 +581,9 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
} else {
err = ERR_CANT_OPEN;
}
+ }
+ if (err == OK) {
//add shared objects
for (int i = 0; i < shared_objects.size(); i++) {
Vector<uint8_t> file = FileAccess::get_file_as_array(shared_objects[i].path);
@@ -609,7 +611,7 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
zipClose(dst_pkg_zip, NULL);
}
- return OK;
+ return err;
}
bool EditorExportPlatformOSX::can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const {