diff options
Diffstat (limited to 'platform/macos/export/export_plugin.cpp')
-rw-r--r-- | platform/macos/export/export_plugin.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/platform/macos/export/export_plugin.cpp b/platform/macos/export/export_plugin.cpp index be677f4da2..628927e5f8 100644 --- a/platform/macos/export/export_plugin.cpp +++ b/platform/macos/export/export_plugin.cpp @@ -30,6 +30,8 @@ #include "export_plugin.h" +#include "../logo_svg.gen.h" +#include "../run_icon_svg.gen.h" #include "codesign.h" #include "lipo.h" #include "macho.h" @@ -39,8 +41,6 @@ #include "editor/editor_node.h" #include "editor/editor_paths.h" #include "editor/editor_scale.h" -#include "platform/macos/logo_svg.gen.h" -#include "platform/macos/run_icon_svg.gen.h" #include "modules/modules_enabled.gen.h" // For svg and regex. #ifdef MODULE_SVG_ENABLED @@ -1674,16 +1674,18 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p if (file == "Contents/Resources/icon.icns") { // See if there is an icon. - String iconpath; + String icon_path; if (p_preset->get("application/icon") != "") { - iconpath = p_preset->get("application/icon"); + icon_path = p_preset->get("application/icon"); + } else if (GLOBAL_GET("application/config/macos_native_icon") != "") { + icon_path = GLOBAL_GET("application/config/macos_native_icon"); } else { - iconpath = GLOBAL_GET("application/config/icon"); + icon_path = GLOBAL_GET("application/config/icon"); } - if (!iconpath.is_empty()) { - if (iconpath.get_extension() == "icns") { - Ref<FileAccess> icon = FileAccess::open(iconpath, FileAccess::READ); + if (!icon_path.is_empty()) { + if (icon_path.get_extension() == "icns") { + Ref<FileAccess> icon = FileAccess::open(icon_path, FileAccess::READ); if (icon.is_valid()) { data.resize(icon->get_length()); icon->get_buffer(&data.write[0], icon->get_length()); @@ -1691,7 +1693,7 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p } else { Ref<Image> icon; icon.instantiate(); - err = ImageLoader::load_image(iconpath, icon); + err = ImageLoader::load_image(icon_path, icon); if (err == OK && !icon->is_empty()) { _make_icon(p_preset, icon, data); } |