summaryrefslogtreecommitdiff
path: root/platform/osx/export/export.cpp
diff options
context:
space:
mode:
authorMax Hilbrunner <mhilbrunner@users.noreply.github.com>2019-05-18 23:19:14 +0200
committerGitHub <noreply@github.com>2019-05-18 23:19:14 +0200
commit6bfb9ed05475e081bf7059c94f9299cd8d7e5dd7 (patch)
tree35a05459a06060befdc8d9db7fd1c2b1fea2cad8 /platform/osx/export/export.cpp
parentf54becfee28fef5be69217660c2b05856ab16819 (diff)
parentc121d8871d339f740a11943f5c4da9cc9b6936db (diff)
Merge pull request #24483 from vnen/cancel-export
Allow project export to be canceled
Diffstat (limited to 'platform/osx/export/export.cpp')
-rw-r--r--platform/osx/export/export.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp
index d0e39d1638..9dabbb12fc 100644
--- a/platform/osx/export/export.cpp
+++ b/platform/osx/export/export.cpp
@@ -409,7 +409,7 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
String src_pkg_name;
- EditorProgress ep("export", "Exporting for OSX", 3);
+ EditorProgress ep("export", "Exporting for OSX", 3, true);
if (p_debug)
src_pkg_name = p_preset->get("custom_package/debug");
@@ -432,7 +432,9 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
FileAccess *src_f = NULL;
zlib_filefunc_def io = zipio_create_io_from_file(&src_f);
- ep.step("Creating app", 0);
+ if (ep.step("Creating app", 0)) {
+ return ERR_SKIP;
+ }
unzFile src_pkg_zip = unzOpen2(src_pkg_name.utf8().get_data(), &io);
if (!src_pkg_zip) {
@@ -626,7 +628,9 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
}
if (err == OK) {
- ep.step("Making PKG", 1);
+ if (ep.step("Making PKG", 1)) {
+ return ERR_SKIP;
+ }
if (export_format == "dmg") {
String pack_path = tmp_app_path_name + "/Contents/Resources/" + pkg_name + ".pck";
@@ -648,7 +652,9 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
}
if (err == OK && identity != "") {
- ep.step("Code signing bundle", 2);
+ if (ep.step("Code signing bundle", 2)) {
+ return ERR_SKIP;
+ }
// the order in which we code sign is important, this is a bit of a shame or we could do this in our loop that extracts the files from our ZIP
@@ -673,7 +679,9 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
// and finally create a DMG
if (err == OK) {
- ep.step("Making DMG", 3);
+ if (ep.step("Making DMG", 3)) {
+ return ERR_SKIP;
+ }
err = _create_dmg(p_path, pkg_name, tmp_app_path_name);
}