[Export] Allow using ICU data from export templates instead of editor embedded data.

This commit is contained in:
Pāvels Nadtočajevs
2024-12-05 22:49:06 +02:00
parent 4cf02312f6
commit 3d60ce9389
9 changed files with 65 additions and 50 deletions

View File

@ -477,11 +477,9 @@ if env["builtin_icu4c"]:
]
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
icu_data_name = "icudt76l.dat"
if env.editor_build:
env_icu.Depends("#thirdparty/icu4c/icudata.gen.h", "#thirdparty/icu4c/" + icu_data_name)
env_icu.Command("#thirdparty/icu4c/icudata.gen.h", "#thirdparty/icu4c/" + icu_data_name, make_icu_data)
env_icu.Depends("#thirdparty/icu4c/icudata.gen.h", "#thirdparty/icu4c/icudt_godot.dat")
env_icu.Command("#thirdparty/icu4c/icudata.gen.h", "#thirdparty/icu4c/icudt_godot.dat", make_icu_data)
env_text_server_adv.Prepend(CPPPATH=["#thirdparty/icu4c/"])
else:
thirdparty_sources += ["icu_data/icudata_stub.cpp"]
@ -503,7 +501,6 @@ if env["builtin_icu4c"]:
"-DU_ENABLE_DYLOAD=0",
"-DU_HAVE_LIB_SUFFIX=1",
"-DU_LIB_SUFFIX_C_NAME=_godot",
"-DICU_DATA_NAME=" + icu_data_name,
]
)
env_text_server_adv.Append(
@ -511,7 +508,6 @@ if env["builtin_icu4c"]:
"-DU_STATIC_IMPLEMENTATION",
"-DU_HAVE_LIB_SUFFIX=1",
"-DU_LIB_SUFFIX_C_NAME=_godot",
"-DICU_DATA_NAME=" + icu_data_name,
]
)
if env.editor_build: