1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 00:37:35 +00:00

Ladybird/Android: Bind a RequestServerService for networking needs

Add a RequestServerService class that uses the LadybirdServiceBase class
added previously. Bind to it from the WebContentService's service_main()
during startup.
This commit is contained in:
Andrew Kaster 2023-09-15 18:01:23 -06:00 committed by Andrew Kaster
parent da8f450335
commit a243bc465f
15 changed files with 236 additions and 30 deletions

View file

@ -33,7 +33,12 @@ add_custom_target(copy-content-filters
"${SERENITY_SOURCE_DIR}/Base/home/anon/.config/BrowserContentFilters.txt"
"asset-bundle/res/ladybird/BrowserContentFilters.txt"
)
add_dependencies(archive-assets copy-autoplay-allowlist copy-content-filters)
add_custom_target(copy-certs
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${Lagom_BINARY_DIR}/cacert.pem"
"asset-bundle/res/ladybird/cacert.pem"
)
add_dependencies(archive-assets copy-autoplay-allowlist copy-content-filters copy-certs)
add_custom_target(copy-assets COMMAND ${CMAKE_COMMAND} -E copy_if_different ladybird-assets.tar.gz "${CMAKE_SOURCE_DIR}/Android/src/main/assets/")
add_dependencies(copy-assets archive-assets)
add_dependencies(ladybird copy-assets)

View file

@ -36,13 +36,18 @@ list(REMOVE_DUPLICATES all_required_lagom_libraries)
# Remove ladybird shlib if it exists
list(REMOVE_ITEM all_required_lagom_libraries ladybird)
# Install webcontent impl library if it exists
if (TARGET webcontent)
get_target_property(target_type webcontent TYPE)
if ("${target_type}" STREQUAL STATIC_LIBRARY)
list(APPEND all_required_lagom_libraries webcontent)
endif()
endif()
# Install service impl libraries if they exist
macro(install_service_lib service)
if (TARGET ${service})
get_target_property(target_type ${service} TYPE)
if ("${target_type}" STREQUAL STATIC_LIBRARY)
list(APPEND all_required_lagom_libraries ${service})
endif()
endif()
endmacro()
foreach(service IN LISTS webcontent requestserver)
install_service_lib(${service})
endforeach()
install(TARGETS ${all_required_lagom_libraries}
EXPORT ladybirdTargets