|
@@ -900,6 +900,26 @@ String EditorExportPlatform::_get_script_encryption_key(const Ref<EditorExportPr
|
|
|
return p_preset->get_script_encryption_key().to_lower();
|
|
|
}
|
|
|
|
|
|
+Dictionary EditorExportPlatform::get_internal_export_files() {
|
|
|
+ Dictionary files;
|
|
|
+
|
|
|
+ // Text server support data.
|
|
|
+ if (TS->has_feature(TextServer::FEATURE_USE_SUPPORT_DATA) && (bool)GLOBAL_GET("internationalization/locale/include_text_server_data")) {
|
|
|
+ String ts_name = TS->get_support_data_filename();
|
|
|
+ if (!ts_name.is_empty()) {
|
|
|
+ ts_name = "res://" + ts_name;
|
|
|
+ if (!FileAccess::exists(ts_name)) { // Do not include if user supplied data file exist.
|
|
|
+ const PackedByteArray &ts_data = TS->get_support_data();
|
|
|
+ if (!ts_data.is_empty()) {
|
|
|
+ files[ts_name] = ts_data;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return files;
|
|
|
+}
|
|
|
+
|
|
|
Vector<String> EditorExportPlatform::get_forced_export_files() {
|
|
|
Vector<String> files;
|
|
|
|
|
@@ -923,25 +943,13 @@ Vector<String> EditorExportPlatform::get_forced_export_files() {
|
|
|
files.push_back(extension_list_config_file);
|
|
|
}
|
|
|
|
|
|
- // Store text server data if it is supported.
|
|
|
- if (TS->has_feature(TextServer::FEATURE_USE_SUPPORT_DATA)) {
|
|
|
- bool use_data = GLOBAL_GET("internationalization/locale/include_text_server_data");
|
|
|
- if (use_data) {
|
|
|
- // Try using user provided data file.
|
|
|
- if (!TS->get_support_data_filename().is_empty()) {
|
|
|
- String ts_data = "res://" + TS->get_support_data_filename();
|
|
|
- if (FileAccess::exists(ts_data)) {
|
|
|
- files.push_back(ts_data);
|
|
|
- } else {
|
|
|
- // Use default text server data.
|
|
|
- String abs_path = ProjectSettings::get_singleton()->globalize_path(ts_data);
|
|
|
- ERR_FAIL_COND_V(!TS->save_support_data(abs_path), files);
|
|
|
- if (FileAccess::exists(abs_path)) {
|
|
|
- files.push_back(ts_data);
|
|
|
- // Remove the file later.
|
|
|
- callable_mp_static(DirAccess::remove_absolute).call_deferred(abs_path);
|
|
|
- }
|
|
|
- }
|
|
|
+ // Text server support data.
|
|
|
+ if (TS->has_feature(TextServer::FEATURE_USE_SUPPORT_DATA) && (bool)GLOBAL_GET("internationalization/locale/include_text_server_data")) {
|
|
|
+ String ts_name = TS->get_support_data_filename();
|
|
|
+ if (!ts_name.is_empty()) {
|
|
|
+ ts_name = "res://" + ts_name;
|
|
|
+ if (FileAccess::exists(ts_name)) { // Include user supplied data file.
|
|
|
+ files.push_back(ts_name);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1510,6 +1518,15 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ Dictionary int_export = get_internal_export_files();
|
|
|
+ for (const Variant &int_name : int_export.keys()) {
|
|
|
+ const PackedByteArray &array = int_export[int_name];
|
|
|
+ err = p_save_func(p_udata, int_name, array, idx, total, enc_in_filters, enc_ex_filters, key, seed);
|
|
|
+ if (err != OK) {
|
|
|
+ return err;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
String config_file = "project.binary";
|
|
|
String engine_cfb = EditorPaths::get_singleton()->get_cache_dir().path_join("tmp" + config_file);
|
|
|
ProjectSettings::get_singleton()->save_custom(engine_cfb, custom_map, custom_list);
|
|
@@ -2427,6 +2444,7 @@ void EditorExportPlatform::_bind_methods() {
|
|
|
ClassDB::bind_method(D_METHOD("ssh_push_to_remote", "host", "port", "scp_args", "src_file", "dst_file"), &EditorExportPlatform::ssh_push_to_remote);
|
|
|
|
|
|
ClassDB::bind_static_method("EditorExportPlatform", D_METHOD("get_forced_export_files"), &EditorExportPlatform::get_forced_export_files);
|
|
|
+ ClassDB::bind_static_method("EditorExportPlatform", D_METHOD("get_internal_export_files"), &EditorExportPlatform::get_internal_export_files);
|
|
|
|
|
|
BIND_ENUM_CONSTANT(EXPORT_MESSAGE_NONE);
|
|
|
BIND_ENUM_CONSTANT(EXPORT_MESSAGE_INFO);
|