From 85baa41c7a6d33f5960754bd8b4dc5e8234b25f6 Mon Sep 17 00:00:00 2001 From: George Marques Date: Tue, 5 Dec 2017 21:13:58 -0200 Subject: [PATCH] Export icon and splash images directly to final package They need to bypass the path remapping to be loaded as images during the start routine. --- editor/editor_export.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp index 8c8d9c4c791..fc739647640 100644 --- a/editor/editor_export.cpp +++ b/editor/editor_export.cpp @@ -743,6 +743,18 @@ Error EditorExportPlatform::export_project_files(const Ref & custom_map["path_remap/remapped_paths"] = path_remaps; } + // Store icon and splash images directly, they need to bypass the import system and be loaded as images + String icon = ProjectSettings::get_singleton()->get("application/config/icon"); + String splash = ProjectSettings::get_singleton()->get("application/boot_splash/image"); + if (icon != String() && FileAccess::exists(icon)) { + Vector array = FileAccess::get_file_as_array(icon); + p_func(p_udata, icon, array, idx, total); + } + if (splash != String() && FileAccess::exists(splash)) { + Vector array = FileAccess::get_file_as_array(splash); + p_func(p_udata, splash, array, idx, total); + } + String config_file = "project.binary"; String engine_cfb = EditorSettings::get_singleton()->get_cache_dir().plus_file("tmp" + config_file); ProjectSettings::get_singleton()->save_custom(engine_cfb, custom_map, custom_list);