summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-12-06 07:47:00 +0100
committerGitHub <noreply@github.com>2017-12-06 07:47:00 +0100
commitc11ea8a2d001134df405c27362220d2065c3e753 (patch)
treece44a7f43a68e7b4aeae467e9a92b1185ff7ec36
parent7b02f5591d2a4c4d2d7da723b1303a99b6c4f168 (diff)
parent85baa41c7a6d33f5960754bd8b4dc5e8234b25f6 (diff)
Merge pull request #14008 from vnen/export-icon-splash
Export icon and splash images directly to final package
-rw-r--r--editor/editor_export.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index 8c8d9c4c79..fc73964764 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -743,6 +743,18 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
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<uint8_t> array = FileAccess::get_file_as_array(icon);
+ p_func(p_udata, icon, array, idx, total);
+ }
+ if (splash != String() && FileAccess::exists(splash)) {
+ Vector<uint8_t> 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);