diff --git a/Ladybird/cmake/ResourceFiles.cmake b/Ladybird/cmake/ResourceFiles.cmake index cfaf3aa17db..52d6fbc24c3 100644 --- a/Ladybird/cmake/ResourceFiles.cmake +++ b/Ladybird/cmake/ResourceFiles.cmake @@ -1,3 +1,6 @@ +file(STRINGS "${SERENITY_SOURCE_DIR}/Meta/emoji-file-list.txt" EMOJI) +list(TRANSFORM EMOJI PREPEND "${SERENITY_SOURCE_DIR}/Base/res/emoji/") + set(FONTS CsillaBold10.font CsillaBold12.font @@ -124,9 +127,12 @@ function(copy_resource_set subdir) endfunction() function(copy_resources_to_build base_directory bundle_target) - add_custom_target("${bundle_target}_build_resource_files") + copy_resource_set(emoji RESOURCES ${EMOJI} + DESTINATION ${base_directory} TARGET ${bundle_target} + ) + copy_resource_set(fonts RESOURCES ${FONTS} DESTINATION ${base_directory} TARGET ${bundle_target} ) @@ -167,6 +173,7 @@ function(copy_resources_to_build base_directory bundle_target) endfunction() function(install_ladybird_resources destination component) + install(FILES ${EMOJI} DESTINATION "${destination}/emoji" COMPONENT ${component}) install(FILES ${FONTS} DESTINATION "${destination}/fonts" COMPONENT ${component}) install(FILES ${16x16_ICONS} DESTINATION "${destination}/icons/16x16" COMPONENT ${component}) install(FILES ${32x32_ICONS} DESTINATION "${destination}/icons/32x32" COMPONENT ${component}) diff --git a/Meta/gn/secondary/Ladybird/BUILD.gn b/Meta/gn/secondary/Ladybird/BUILD.gn index 1527a707327..c503a2199ca 100644 --- a/Meta/gn/secondary/Ladybird/BUILD.gn +++ b/Meta/gn/secondary/Ladybird/BUILD.gn @@ -144,6 +144,7 @@ executable("ladybird_executable") { if (current_os != "mac") { data_deps += [ ":ladybird_copy_config_resources", + ":ladybird_copy_emoji", ":ladybird_copy_fonts", ":ladybird_copy_icons_16x16", ":ladybird_copy_icons_32x32", @@ -188,6 +189,13 @@ executable("headless-browser") { ] } +_emoji = read_file("//Meta/emoji-file-list.txt", "list lines") +emoji = [] + +foreach(file, _emoji) { + emoji += [ "//Base/res/emoji/" + file ] +} + fonts = [ "//Base/res/fonts/CsillaBold10.font", "//Base/res/fonts/CsillaBold12.font", @@ -271,6 +279,11 @@ config_resources = [ ] if (current_os != "mac") { + copy("ladybird_copy_emoji") { + sources = emoji + outputs = [ "$root_out_dir/share/Lagom/emoji/{{source_file_part}}" ] + } + copy("ladybird_copy_fonts") { sources = fonts outputs = [ "$root_out_dir/share/Lagom/fonts/{{source_file_part}}" ] @@ -427,6 +440,11 @@ if (current_os != "mac") { outputs = [ "{{bundle_contents_dir}}/lib/{{source_file_part}}" ] } + bundle_data("ladybird_emoji") { + sources = emoji + outputs = [ "{{bundle_resources_dir}}/emoji/{{source_file_part}}" ] + } + bundle_data("ladybird_fonts") { sources = fonts outputs = [ "{{bundle_resources_dir}}/fonts/{{source_file_part}}" ] @@ -514,6 +532,7 @@ if (current_os != "mac") { ":ladybird_bundle_info_plist", ":ladybird_bundle_libs", ":ladybird_config_resources", + ":ladybird_emoji", ":ladybird_fonts", ":ladybird_icon", ":ladybird_icons_16x16", diff --git a/Meta/gn/secondary/Userland/Libraries/LibUnicode/BUILD.gn b/Meta/gn/secondary/Userland/Libraries/LibUnicode/BUILD.gn index 72f637ada9d..8859f2468a0 100644 --- a/Meta/gn/secondary/Userland/Libraries/LibUnicode/BUILD.gn +++ b/Meta/gn/secondary/Userland/Libraries/LibUnicode/BUILD.gn @@ -131,13 +131,16 @@ if (enable_unicode_database_download) { "-s", rebase_path("//Base/home/anon/Documents/emoji-serenity.txt", root_build_dir), + "-f", + rebase_path("//Meta/emoji-file-list.txt", root_build_dir), "-r", rebase_path("//Base/res/emoji", root_build_dir), ] - # FIXME: How to add file/directory dependencies on + # FIXME: How to add file/directory dependencies on: # "//Base/home/anon/Documents/emoji-serenity.txt" - # and "//Base/res/emoji"? + # "//Base/res/emoji" + # "//Meta/emoji-file-list.txt" } compiled_action("generate_idna_sources") {