2024-02-22 01:11:45 +00:00
|
|
|
set(FONTS
|
2024-09-20 22:39:33 +00:00
|
|
|
NotoEmoji.ttf
|
2024-02-22 01:11:45 +00:00
|
|
|
SerenitySans-Regular.ttf
|
|
|
|
)
|
2024-06-03 12:40:19 +00:00
|
|
|
list(TRANSFORM FONTS PREPEND "${LADYBIRD_SOURCE_DIR}/Base/res/fonts/")
|
2024-02-22 01:11:45 +00:00
|
|
|
|
|
|
|
set(16x16_ICONS
|
2024-03-26 17:38:12 +00:00
|
|
|
app-system-monitor.png
|
2024-02-22 01:11:45 +00:00
|
|
|
audio-volume-high.png
|
|
|
|
audio-volume-muted.png
|
|
|
|
close-tab.png
|
2024-08-19 16:11:39 +00:00
|
|
|
download.png
|
2024-02-22 01:11:45 +00:00
|
|
|
edit-copy.png
|
|
|
|
filetype-css.png
|
|
|
|
filetype-folder-open.png
|
|
|
|
filetype-html.png
|
|
|
|
filetype-image.png
|
|
|
|
filetype-sound.png
|
|
|
|
filetype-video.png
|
|
|
|
find.png
|
|
|
|
go-forward.png
|
|
|
|
history.png
|
|
|
|
layers.png
|
|
|
|
layout.png
|
2024-08-03 17:28:07 +00:00
|
|
|
network.png
|
2024-02-22 01:11:45 +00:00
|
|
|
new-tab.png
|
|
|
|
open-parent-directory.png
|
2024-03-22 10:56:49 +00:00
|
|
|
paste.png
|
2024-02-22 01:11:45 +00:00
|
|
|
pause.png
|
|
|
|
play.png
|
|
|
|
select-all.png
|
|
|
|
settings.png
|
|
|
|
spoof.png
|
|
|
|
trash-can.png
|
|
|
|
zoom-in.png
|
|
|
|
zoom-out.png
|
|
|
|
zoom-reset.png
|
|
|
|
)
|
|
|
|
set(32x32_ICONS
|
2024-03-26 17:38:12 +00:00
|
|
|
app-system-monitor.png
|
2024-02-22 01:11:45 +00:00
|
|
|
filetype-folder.png
|
|
|
|
filetype-unknown.png
|
|
|
|
msgbox-warning.png
|
|
|
|
)
|
2024-07-07 15:30:22 +00:00
|
|
|
set(48x48_ICONS
|
|
|
|
app-browser.png
|
|
|
|
)
|
|
|
|
set(128x128_ICONS
|
|
|
|
app-browser.png
|
2024-07-07 15:31:20 +00:00
|
|
|
app-browser-dark.png
|
2024-07-07 15:30:22 +00:00
|
|
|
)
|
2024-02-22 01:11:45 +00:00
|
|
|
set(BROWSER_ICONS
|
|
|
|
clear-cache.png
|
|
|
|
cookie.png
|
|
|
|
dom-tree.png
|
|
|
|
local-storage.png
|
|
|
|
)
|
2024-06-03 12:40:19 +00:00
|
|
|
list(TRANSFORM 16x16_ICONS PREPEND "${LADYBIRD_SOURCE_DIR}/Base/res/icons/16x16/")
|
|
|
|
list(TRANSFORM 32x32_ICONS PREPEND "${LADYBIRD_SOURCE_DIR}/Base/res/icons/32x32/")
|
2024-07-07 15:30:22 +00:00
|
|
|
list(TRANSFORM 48x48_ICONS PREPEND "${LADYBIRD_SOURCE_DIR}/Base/res/icons/48x48/")
|
|
|
|
list(TRANSFORM 128x128_ICONS PREPEND "${LADYBIRD_SOURCE_DIR}/Base/res/icons/128x128/")
|
2024-06-03 12:40:19 +00:00
|
|
|
list(TRANSFORM BROWSER_ICONS PREPEND "${LADYBIRD_SOURCE_DIR}/Base/res/icons/browser/")
|
2024-02-22 01:11:45 +00:00
|
|
|
|
|
|
|
set(WEB_RESOURCES
|
|
|
|
about.html
|
|
|
|
inspector.css
|
2024-09-06 14:33:39 +00:00
|
|
|
inspector.html
|
2024-02-22 01:11:45 +00:00
|
|
|
inspector.js
|
|
|
|
newtab.html
|
|
|
|
)
|
|
|
|
set(WEB_TEMPLATES
|
|
|
|
directory.html
|
|
|
|
error.html
|
|
|
|
version.html
|
|
|
|
)
|
2024-06-03 12:40:19 +00:00
|
|
|
list(TRANSFORM WEB_RESOURCES PREPEND "${LADYBIRD_SOURCE_DIR}/Base/res/ladybird/")
|
|
|
|
list(TRANSFORM WEB_TEMPLATES PREPEND "${LADYBIRD_SOURCE_DIR}/Base/res/ladybird/templates/")
|
2024-02-22 01:11:45 +00:00
|
|
|
|
|
|
|
set(THEMES
|
|
|
|
Default.ini
|
|
|
|
Dark.ini
|
|
|
|
)
|
2024-06-03 12:40:19 +00:00
|
|
|
list(TRANSFORM THEMES PREPEND "${LADYBIRD_SOURCE_DIR}/Base/res/themes/")
|
2024-02-22 01:11:45 +00:00
|
|
|
|
|
|
|
set(CONFIG_RESOURCES
|
2024-07-15 16:00:14 +00:00
|
|
|
bookmarks.json
|
2024-02-22 01:11:45 +00:00
|
|
|
BrowserAutoplayAllowlist.txt
|
|
|
|
BrowserContentFilters.txt
|
|
|
|
)
|
2024-07-15 16:00:14 +00:00
|
|
|
list(TRANSFORM CONFIG_RESOURCES PREPEND "${LADYBIRD_SOURCE_DIR}/Base/res/ladybird/default-config/")
|
2024-02-22 01:11:45 +00:00
|
|
|
|
|
|
|
set(DOWNLOADED_RESOURCES
|
|
|
|
cacert.pem
|
|
|
|
)
|
|
|
|
list(TRANSFORM DOWNLOADED_RESOURCES PREPEND "${Lagom_BINARY_DIR}/")
|
|
|
|
|
|
|
|
function(copy_resource_set subdir)
|
|
|
|
cmake_parse_arguments(PARSE_ARGV 1 "COPY" "" "TARGET;DESTINATION" "RESOURCES")
|
|
|
|
set(inputs ${COPY_RESOURCES})
|
|
|
|
|
|
|
|
if (APPLE)
|
|
|
|
target_sources(${COPY_TARGET} PRIVATE ${inputs})
|
|
|
|
set_source_files_properties(${inputs} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources/${subdir}")
|
|
|
|
else()
|
|
|
|
set(outputs "")
|
|
|
|
foreach (input IN LISTS inputs)
|
|
|
|
get_filename_component(input_name "${input}" NAME)
|
|
|
|
list(APPEND outputs "${COPY_DESTINATION}/${subdir}/${input_name}")
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${outputs}
|
2024-03-18 16:38:58 +00:00
|
|
|
DEPENDS ${inputs}
|
2024-02-22 01:11:45 +00:00
|
|
|
COMMAND "${CMAKE_COMMAND}" -E make_directory "${COPY_DESTINATION}/${subdir}"
|
|
|
|
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${inputs}" "${COPY_DESTINATION}/${subdir}"
|
|
|
|
COMMAND_EXPAND_LISTS
|
|
|
|
VERBATIM
|
|
|
|
)
|
|
|
|
string(REPLACE "/" "_" subdir_underscores "${subdir}")
|
|
|
|
set(target_name "copy_${subdir_underscores}_resources_to_build")
|
|
|
|
while (TARGET ${target_name})
|
|
|
|
set(target_name "${target_name}_")
|
|
|
|
endwhile()
|
|
|
|
add_custom_target(${target_name} DEPENDS ${outputs})
|
|
|
|
add_dependencies(all_generated ${target_name})
|
|
|
|
add_dependencies("${COPY_TARGET}_build_resource_files" ${target_name})
|
|
|
|
endif()
|
|
|
|
endfunction()
|
|
|
|
|
|
|
|
function(copy_resources_to_build base_directory bundle_target)
|
|
|
|
add_custom_target("${bundle_target}_build_resource_files")
|
|
|
|
|
|
|
|
copy_resource_set(fonts RESOURCES ${FONTS}
|
|
|
|
DESTINATION ${base_directory} TARGET ${bundle_target}
|
|
|
|
)
|
|
|
|
|
|
|
|
copy_resource_set(icons/16x16 RESOURCES ${16x16_ICONS}
|
|
|
|
DESTINATION ${base_directory} TARGET ${bundle_target}
|
|
|
|
)
|
|
|
|
|
|
|
|
copy_resource_set(icons/32x32 RESOURCES ${32x32_ICONS}
|
|
|
|
DESTINATION ${base_directory} TARGET ${bundle_target}
|
|
|
|
)
|
|
|
|
|
2024-07-07 15:30:22 +00:00
|
|
|
copy_resource_set(icons/48x48 RESOURCES ${48x48_ICONS}
|
|
|
|
DESTINATION ${base_directory} TARGET ${bundle_target}
|
|
|
|
)
|
|
|
|
|
|
|
|
copy_resource_set(icons/128x128 RESOURCES ${128x128_ICONS}
|
|
|
|
DESTINATION ${base_directory} TARGET ${bundle_target}
|
|
|
|
)
|
|
|
|
|
2024-02-22 01:11:45 +00:00
|
|
|
copy_resource_set(icons/browser RESOURCES ${BROWSER_ICONS}
|
|
|
|
DESTINATION ${base_directory} TARGET ${bundle_target}
|
|
|
|
)
|
|
|
|
|
|
|
|
copy_resource_set(themes RESOURCES ${THEMES}
|
|
|
|
DESTINATION ${base_directory} TARGET ${bundle_target}
|
|
|
|
)
|
|
|
|
|
|
|
|
copy_resource_set(ladybird RESOURCES ${WEB_RESOURCES}
|
|
|
|
DESTINATION ${base_directory} TARGET ${bundle_target}
|
|
|
|
)
|
|
|
|
|
|
|
|
copy_resource_set(ladybird/templates RESOURCES ${WEB_TEMPLATES}
|
|
|
|
DESTINATION ${base_directory} TARGET ${bundle_target}
|
|
|
|
)
|
|
|
|
|
2024-07-15 16:00:14 +00:00
|
|
|
copy_resource_set(ladybird/default-config RESOURCES ${CONFIG_RESOURCES}
|
2024-02-22 01:11:45 +00:00
|
|
|
DESTINATION ${base_directory} TARGET ${bundle_target}
|
|
|
|
)
|
|
|
|
|
|
|
|
copy_resource_set(ladybird RESOURCES ${DOWNLOADED_RESOURCES}
|
|
|
|
DESTINATION ${base_directory} TARGET ${bundle_target}
|
|
|
|
)
|
|
|
|
|
|
|
|
add_dependencies(${bundle_target} "${bundle_target}_build_resource_files")
|
|
|
|
endfunction()
|
2024-02-23 20:40:16 +00:00
|
|
|
|
|
|
|
function(install_ladybird_resources destination component)
|
|
|
|
install(FILES ${16x16_ICONS} DESTINATION "${destination}/icons/16x16" COMPONENT ${component})
|
|
|
|
install(FILES ${32x32_ICONS} DESTINATION "${destination}/icons/32x32" COMPONENT ${component})
|
2024-07-07 15:30:22 +00:00
|
|
|
install(FILES ${48x48_ICONS} DESTINATION "${destination}/icons/48x48" COMPONENT ${component})
|
|
|
|
install(FILES ${128x128_ICONS} DESTINATION "${destination}/icons/128x128" COMPONENT ${component})
|
2024-02-23 20:40:16 +00:00
|
|
|
install(FILES ${BROWSER_ICONS} DESTINATION "${destination}/icons/browser" COMPONENT ${component})
|
|
|
|
install(FILES ${THEMES} DESTINATION "${destination}/themes" COMPONENT ${component})
|
|
|
|
install(FILES ${WEB_RESOURCES} DESTINATION "${destination}/ladybird" COMPONENT ${component})
|
|
|
|
install(FILES ${WEB_TEMPLATES} DESTINATION "${destination}/ladybird/templates" COMPONENT ${component})
|
2024-07-15 16:00:14 +00:00
|
|
|
install(FILES ${CONFIG_RESOURCES} DESTINATION "${destination}/ladybird/default-config" COMPONENT ${component})
|
2024-02-23 20:40:16 +00:00
|
|
|
install(FILES ${DOWNLOADED_RESOURCES} DESTINATION "${destination}/ladybird" COMPONENT ${component})
|
|
|
|
endfunction()
|