mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
Ladybird: Improve Xcode generator experience and copy helpers to bundle
We had a mismatch in the GUI Identifier property, causing warnings in Xcode. It was also missing the Product Identifier Xcode property on ladybird itself, causing another warning. Copy all our helper processes to the ladybird.app bundle directory so that they can be found by ``open ladybird.app`` and the Xcode debugger. For the future, we should look in ../Resources for resources on macOS. Copying resources to that directory requires more CMake-fu.
This commit is contained in:
parent
afb3a4a030
commit
4608e4143e
Notes:
sideshowbarker
2024-07-16 22:14:50 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/4608e4143e Pull-request: https://github.com/SerenityOS/serenity/pull/18052 Reviewed-by: https://github.com/linusg
3 changed files with 20 additions and 3 deletions
|
@ -113,12 +113,13 @@ target_include_directories(headless-browser PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
|||
target_link_libraries(headless-browser PRIVATE Qt::Core LibWeb LibWebView LibWebSocket LibCrypto LibFileSystem LibGemini LibHTTP LibJS LibGfx LibMain LibTLS LibIPC LibJS)
|
||||
|
||||
set_target_properties(ladybird PROPERTIES
|
||||
MACOSX_BUNDLE_GUI_IDENTIFIER org.serenityos.ladybird
|
||||
MACOSX_BUNDLE_GUI_IDENTIFIER org.SerenityOS.Ladybird
|
||||
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
|
||||
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
|
||||
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist"
|
||||
MACOSX_BUNDLE TRUE
|
||||
WIN32_EXECUTABLE TRUE
|
||||
XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER org.SerenityOS.Ladybird
|
||||
)
|
||||
|
||||
if (ANDROID)
|
||||
|
@ -141,7 +142,19 @@ qt_finalize_executable(ladybird)
|
|||
add_subdirectory(SQLServer)
|
||||
add_subdirectory(WebContent)
|
||||
add_subdirectory(WebDriver)
|
||||
add_dependencies(ladybird SQLServer WebContent WebDriver)
|
||||
add_dependencies(ladybird SQLServer WebContent WebDriver headless-browser)
|
||||
|
||||
if (APPLE)
|
||||
# FIXME: Create a proper app bundle for each helper process
|
||||
set(app_dir "$<TARGET_FILE_DIR:ladybird>")
|
||||
set(bundle_dir "$<TARGET_BUNDLE_DIR:ladybird>")
|
||||
add_custom_command(TARGET ladybird POST_BUILD
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "$<TARGET_FILE:SQLServer>" "${app_dir}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "$<TARGET_FILE:WebContent>" "${app_dir}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "$<TARGET_FILE:WebDriver>" "${app_dir}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "$<TARGET_FILE:headless-browser>" "${app_dir}"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_SKIP_INSTALL_RULES)
|
||||
include(cmake/InstallRules.cmake)
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<key>CFBundleSignature</key>
|
||||
<string></string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>Ladybird</string>
|
||||
<string>ladybird</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.SerenityOS.Ladybird</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
|
|
|
@ -52,7 +52,11 @@ void platform_init()
|
|||
if (FileSystem::is_directory(home_lagom))
|
||||
return home_lagom;
|
||||
auto app_dir = ak_deprecated_string_from_qstring(QCoreApplication::applicationDirPath());
|
||||
# ifdef AK_OS_MACOS
|
||||
return LexicalPath(app_dir).parent().append("Resources"sv).string();
|
||||
# else
|
||||
return LexicalPath(app_dir).parent().append("share"sv).string();
|
||||
# endif
|
||||
}();
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue