diff options
author | Yuri Sizov <yuris@humnom.net> | 2023-12-06 15:18:35 +0100 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2023-12-06 15:26:07 +0100 |
commit | 773b4d77644a5a75bbe326cb57e13dff3447996b (patch) | |
tree | a01ec19f8806213a2f253a8eea421cbb232436f7 /platform/linuxbsd | |
parent | 2f73a059cefadcd944b6874f2557ec82e46a562d (diff) | |
download | redot-engine-773b4d77644a5a75bbe326cb57e13dff3447996b.tar.gz |
Ensure more export errors are reported to users
Also fixes the timing issue when exporting all
presets at the same time, where the error report
would try to appear while the progress dialog
was still visible.
Diffstat (limited to 'platform/linuxbsd')
-rw-r--r-- | platform/linuxbsd/export/export_plugin.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/platform/linuxbsd/export/export_plugin.cpp b/platform/linuxbsd/export/export_plugin.cpp index 9d1e058b76..64efcffae3 100644 --- a/platform/linuxbsd/export/export_plugin.cpp +++ b/platform/linuxbsd/export/export_plugin.cpp @@ -79,6 +79,7 @@ Error EditorExportPlatformLinuxBSD::export_project(const Ref<EditorExportPreset> Ref<DirAccess> tmp_app_dir = DirAccess::create_for_path(tmp_dir_path); if (export_as_zip) { if (tmp_app_dir.is_null()) { + add_message(EXPORT_MESSAGE_ERROR, TTR("Prepare Templates"), vformat(TTR("Could not create and open the directory: \"%s\""), tmp_dir_path)); return ERR_CANT_CREATE; } if (DirAccess::exists(tmp_dir_path)) { @@ -93,19 +94,18 @@ Error EditorExportPlatformLinuxBSD::export_project(const Ref<EditorExportPreset> // Export project. Error err = EditorExportPlatformPC::export_project(p_preset, p_debug, path, p_flags); if (err != OK) { + // Message is supplied by the subroutine method. return err; } // Save console wrapper. - if (err == OK) { - int con_scr = p_preset->get("debug/export_console_wrapper"); - if ((con_scr == 1 && p_debug) || (con_scr == 2)) { - String scr_path = path.get_basename() + ".sh"; - err = _export_debug_script(p_preset, pkg_name, path.get_file(), scr_path); - FileAccess::set_unix_permissions(scr_path, 0755); - if (err != OK) { - add_message(EXPORT_MESSAGE_ERROR, TTR("Debug Console Export"), TTR("Could not create console wrapper.")); - } + int con_scr = p_preset->get("debug/export_console_wrapper"); + if ((con_scr == 1 && p_debug) || (con_scr == 2)) { + String scr_path = path.get_basename() + ".sh"; + err = _export_debug_script(p_preset, pkg_name, path.get_file(), scr_path); + FileAccess::set_unix_permissions(scr_path, 0755); + if (err != OK) { + add_message(EXPORT_MESSAGE_ERROR, TTR("Debug Console Export"), TTR("Could not create console wrapper.")); } } |