mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:17:35 +00:00
Meta: Port recent changes to gn build
299d35aadc
7d9fe44039
58f08107b0
2cb0039a13
bc70144df1
48a9d0ede8
149e382735
This commit is contained in:
parent
e0f990f1cb
commit
6e4d5b310f
5 changed files with 75 additions and 4 deletions
|
@ -6,22 +6,33 @@ import("//Userland/Libraries/LibUnicode/enable_unicode_download.gni")
|
|||
|
||||
unicode_cache = cache_path + "UCD/"
|
||||
emoji_cache = cache_path + "EMOJI/"
|
||||
idna_cache = cache_path + "IDNA/"
|
||||
|
||||
unicode_version = "15.1.0"
|
||||
emoji_version = "15.1"
|
||||
|
||||
if (enable_unicode_database_download) {
|
||||
download_file("unicode_database_download") {
|
||||
version = "15.1.0"
|
||||
url = "https://www.unicode.org/Public/" + version + "/ucd/UCD.zip"
|
||||
version = unicode_version
|
||||
url = "https://www.unicode.org/Public/$version/ucd/UCD.zip"
|
||||
cache = unicode_cache
|
||||
output = "UCD.zip"
|
||||
version_file = "version.txt"
|
||||
}
|
||||
download_file("emoji_test_download") {
|
||||
version = "15.1"
|
||||
url = "https://www.unicode.org/Public/emoji/" + version + "/emoji-test.txt"
|
||||
version = emoji_version
|
||||
url = "https://www.unicode.org/Public/emoji/$version/emoji-test.txt"
|
||||
cache = emoji_cache
|
||||
output = "emoji-test.txt"
|
||||
version_file = "emoji-test-version.txt"
|
||||
}
|
||||
download_file("idna_mapping_table_download") {
|
||||
version = unicode_version
|
||||
url = "https://www.unicode.org/Public/idna/$version/IdnaMappingTable.txt"
|
||||
cache = idna_cache
|
||||
output = "IdnaMappingTable.txt"
|
||||
version_file = "version.txt"
|
||||
}
|
||||
|
||||
extract_archive_contents("unicode_database_files") {
|
||||
deps = [ ":unicode_database_download" ]
|
||||
|
@ -128,6 +139,24 @@ if (enable_unicode_database_download) {
|
|||
# "//Base/home/anon/Documents/emoji-serenity.txt"
|
||||
# and "//Base/res/emoji"?
|
||||
}
|
||||
|
||||
compiled_action("generate_idna_sources") {
|
||||
tool = "//Meta/Lagom/Tools/CodeGenerators/LibUnicode:GenerateIDNAData"
|
||||
deps = [ ":idna_mapping_table_download" ]
|
||||
inputs = get_target_outputs(":idna_mapping_table_download")
|
||||
outputs = [
|
||||
"$target_gen_dir/IDNAData.h",
|
||||
"$target_gen_dir/IDNAData.cpp",
|
||||
]
|
||||
args = [
|
||||
"-h",
|
||||
rebase_path(outputs[0], root_build_dir),
|
||||
"-c",
|
||||
rebase_path(outputs[1], root_build_dir),
|
||||
"-m",
|
||||
rebase_path(inputs[0], root_build_dir),
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
source_set("LibUnicode") {
|
||||
|
@ -140,9 +169,12 @@ source_set("LibUnicode") {
|
|||
"CharacterTypes.cpp",
|
||||
"CurrencyCode.cpp",
|
||||
"Emoji.cpp",
|
||||
"IDNA.cpp",
|
||||
"Normalize.cpp",
|
||||
"Punycode.cpp",
|
||||
"Segmentation.cpp",
|
||||
"String.cpp",
|
||||
"URL.cpp",
|
||||
"UnicodeUtils.cpp",
|
||||
]
|
||||
deps = [
|
||||
|
@ -152,10 +184,12 @@ source_set("LibUnicode") {
|
|||
if (enable_unicode_database_download) {
|
||||
deps += [
|
||||
":generate_emoji_sources",
|
||||
":generate_idna_sources",
|
||||
":generate_unicode_sources",
|
||||
]
|
||||
sources += get_target_outputs(":generate_unicode_sources")
|
||||
sources += get_target_outputs(":generate_emoji_sources")
|
||||
sources += get_target_outputs(":generate_idna_sources")
|
||||
defines = [ "ENABLE_UNICODE_DATA=1" ]
|
||||
} else {
|
||||
defines = [ "ENABLE_UNICODE_DATA=0" ]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue