2022-07-11 01:14:53 -06:00
|
|
|
# Copyright (c) 2022, Andrew Kaster <akaster@serenityos.org>
|
|
|
|
|
#
|
|
|
|
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# Copy resources into tarball for inclusion in /assets of APK
|
|
|
|
|
#
|
|
|
|
|
set(LADYBIRD_RESOURCE_ROOT "${SERENITY_SOURCE_DIR}/Base/res")
|
|
|
|
|
macro(copy_res_folder folder)
|
|
|
|
|
add_custom_target(copy-${folder}
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
|
|
|
|
"${LADYBIRD_RESOURCE_ROOT}/${folder}"
|
|
|
|
|
"asset-bundle/res/${folder}"
|
|
|
|
|
)
|
|
|
|
|
add_dependencies(archive-assets copy-${folder})
|
|
|
|
|
endmacro()
|
|
|
|
|
add_custom_target(archive-assets COMMAND ${CMAKE_COMMAND} -E chdir asset-bundle tar czf ../ladybird-assets.tar.gz ./ )
|
|
|
|
|
copy_res_folder(html)
|
|
|
|
|
copy_res_folder(fonts)
|
|
|
|
|
copy_res_folder(icons)
|
|
|
|
|
copy_res_folder(emoji)
|
|
|
|
|
copy_res_folder(themes)
|
|
|
|
|
copy_res_folder(color-palettes)
|
|
|
|
|
copy_res_folder(cursor-themes)
|
2023-04-17 13:55:42 -04:00
|
|
|
add_custom_target(copy-autoplay-allowlist
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
|
"${SERENITY_SOURCE_DIR}/Base/home/anon/.config/BrowserAutoplayAllowlist.txt"
|
|
|
|
|
"asset-bundle/res/ladybird/BrowserAutoplayAllowlist.txt"
|
|
|
|
|
)
|
2022-10-03 18:28:31 -06:00
|
|
|
add_custom_target(copy-content-filters
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
|
"${SERENITY_SOURCE_DIR}/Base/home/anon/.config/BrowserContentFilters.txt"
|
|
|
|
|
"asset-bundle/res/ladybird/BrowserContentFilters.txt"
|
|
|
|
|
)
|
2023-04-17 13:55:42 -04:00
|
|
|
add_dependencies(archive-assets copy-autoplay-allowlist copy-content-filters)
|
2023-09-02 17:30:21 +02:00
|
|
|
add_custom_target(copy-assets COMMAND ${CMAKE_COMMAND} -E copy_if_different ladybird-assets.tar.gz "${CMAKE_SOURCE_DIR}/Android/src/main/assets/")
|
2022-07-11 01:14:53 -06:00
|
|
|
add_dependencies(copy-assets archive-assets)
|
|
|
|
|
add_dependencies(ladybird copy-assets)
|