summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2017-12-05 21:13:58 -0200
committerGeorge Marques <george@gmarqu.es>2017-12-05 21:13:58 -0200
commit85baa41c7a6d33f5960754bd8b4dc5e8234b25f6 (patch)
treef2627c8d57329c57be1ab56595b1a3bb63011c74
parent1587f45c2551a43db2808f2c5938095e19f060d2 (diff)
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.
-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);