mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:47:35 +00:00
Ladybird: Remove $SERENITY_SOURCE_DIR from resource root candidates
Now we will only load resources from $build/share/Lagom. On macOS, we load from the bundle directory Contents/Resources instead. This simplifies the commands and environment variables needed to execute Ladybird from the build directory, and makes our install setup less awkward for distributions and packagers.
This commit is contained in:
parent
21ac431fac
commit
68402bec12
8 changed files with 38 additions and 80 deletions
|
@ -2,7 +2,7 @@
|
|||
include(CMakePackageConfigHelpers)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
set(package ladybird)
|
||||
set(package Ladybird)
|
||||
|
||||
set(ladybird_applications ladybird ${ladybird_helper_processes})
|
||||
|
||||
|
@ -94,42 +94,21 @@ install(
|
|||
COMPONENT ladybird_Development
|
||||
)
|
||||
|
||||
install(DIRECTORY
|
||||
"${SERENITY_SOURCE_DIR}/Base/res/fonts"
|
||||
"${SERENITY_SOURCE_DIR}/Base/res/icons"
|
||||
"${SERENITY_SOURCE_DIR}/Base/res/ladybird"
|
||||
"${SERENITY_SOURCE_DIR}/Base/res/themes"
|
||||
"${SERENITY_SOURCE_DIR}/Base/res/color-palettes"
|
||||
"${SERENITY_SOURCE_DIR}/Base/res/cursor-themes"
|
||||
DESTINATION "${CMAKE_INSTALL_DATADIR}/res"
|
||||
USE_SOURCE_PERMISSIONS MESSAGE_NEVER
|
||||
COMPONENT ladybird_Runtime
|
||||
)
|
||||
|
||||
install(FILES
|
||||
"${SERENITY_SOURCE_DIR}/Base/home/anon/.config/BrowserAutoplayAllowlist.txt"
|
||||
"${SERENITY_SOURCE_DIR}/Base/home/anon/.config/BrowserContentFilters.txt"
|
||||
"${Lagom_BINARY_DIR}/cacert.pem"
|
||||
DESTINATION "${CMAKE_INSTALL_DATADIR}/res/ladybird"
|
||||
COMPONENT ladybird_Runtime
|
||||
)
|
||||
if (NOT APPLE)
|
||||
# On macOS the resources are handled via the MACOSX_PACKAGE_LOCATION property on each resource file
|
||||
install_ladybird_resources("${CMAKE_INSTALL_DATADIR}/Lagom" ladybird_Runtime)
|
||||
endif()
|
||||
|
||||
if (APPLE)
|
||||
# Fixup the app bundle and copy:
|
||||
# - Libraries from lib/ to Ladybird.app/Contents/lib
|
||||
# - Resources from share/res/ to Ladybird.app/Contents/Resources/res
|
||||
install(CODE "
|
||||
set(res_dir \${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/res)
|
||||
if (IS_ABSOLUTE ${CMAKE_INSTALL_DATADIR})
|
||||
set(res_dir ${CMAKE_INSTALL_DATADIR}/res)
|
||||
endif()
|
||||
set(lib_dir \${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
|
||||
if (IS_ABSOLUTE ${CMAKE_INSTALL_LIBDIR})
|
||||
set(lib_dir ${CMAKE_INSTALL_LIBDIR})
|
||||
endif()
|
||||
|
||||
set(contents_dir \${CMAKE_INSTALL_PREFIX}/bundle/Ladybird.app/Contents)
|
||||
file(COPY \${res_dir} DESTINATION \${contents_dir}/Resources)
|
||||
file(COPY \${lib_dir} DESTINATION \${contents_dir})
|
||||
"
|
||||
COMPONENT ladybird_Runtime)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue