Merge pull request #82103 from bruvzg/icu_export
[Export] Fix TextServer data export.
This commit is contained in:
commit
1376a5a0ce
@ -859,16 +859,20 @@ Vector<String> EditorExportPlatform::get_forced_export_files() {
|
|||||||
bool use_data = GLOBAL_GET("internationalization/locale/include_text_server_data");
|
bool use_data = GLOBAL_GET("internationalization/locale/include_text_server_data");
|
||||||
if (use_data) {
|
if (use_data) {
|
||||||
// Try using user provided data file.
|
// Try using user provided data file.
|
||||||
String ts_data = "res://" + TS->get_support_data_filename();
|
if (!TS->get_support_data_filename().is_empty()) {
|
||||||
if (FileAccess::exists(ts_data)) {
|
String ts_data = "res://" + TS->get_support_data_filename();
|
||||||
files.push_back(ts_data);
|
if (FileAccess::exists(ts_data)) {
|
||||||
} else {
|
files.push_back(ts_data);
|
||||||
// Use default text server data.
|
} else {
|
||||||
String icu_data_file = EditorPaths::get_singleton()->get_cache_dir().path_join("tmp_icu_data");
|
// Use default text server data.
|
||||||
ERR_FAIL_COND_V(!TS->save_support_data(icu_data_file), files);
|
String abs_path = ProjectSettings::get_singleton()->globalize_path(ts_data);
|
||||||
files.push_back(icu_data_file);
|
ERR_FAIL_COND_V(!TS->save_support_data(abs_path), files);
|
||||||
// Remove the file later.
|
if (FileAccess::exists(abs_path)) {
|
||||||
MessageQueue::get_singleton()->push_callable(callable_mp_static(DirAccess::remove_absolute), icu_data_file);
|
files.push_back(ts_data);
|
||||||
|
// Remove the file later.
|
||||||
|
MessageQueue::get_singleton()->push_callable(callable_mp_static(DirAccess::remove_absolute), abs_path);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user