Internal
Public Access
macOS: fix launch crash, missing dylibs, and dmg volume icon
The app crashed at launch with "cannot be opened because of a problem" because macdeployqt invalidates the code signature when it rewrites library load paths; re-sign (ad hoc) after macdeployqt runs. Also fixes the underlying cause of a Library-missing crash: orbithub's INSTALL_RPATH used the Linux linker token $ORIGIN, which dyld does not understand, and the bundled FreeRDP/WinPR/KodoTerm dylibs installed to a sibling lib/orbithub/ directory outside OrbitHub.app rather than Contents/Frameworks, so they were never copied into the dmg at all. Both are now APPLE-specific, matching macdeployqt's own layout (Contents/Frameworks, @executable_path/../Frameworks). build-dmg.sh now also sets a custom volume icon (via SetFile or the fileicon brew formula, whichever is available) instead of the generic disk image icon, degrading gracefully if neither is present. Also includes the StartupWMClass desktop-file fix from the prior commit's message, which was never actually staged. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+21
-6
@@ -202,18 +202,33 @@ if(WIN32)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_target_properties(orbithub PROPERTIES
|
||||
BUILD_RPATH_USE_ORIGIN ON
|
||||
INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}/orbithub"
|
||||
INSTALL_RPATH_USE_LINK_PATH ON
|
||||
)
|
||||
if(APPLE)
|
||||
# Mirrors macdeployqt's own layout for Qt frameworks: dylibs live in
|
||||
# Contents/Frameworks inside the bundle, found via @executable_path
|
||||
# (the macOS/dyld equivalent of Linux's $ORIGIN token, which dyld
|
||||
# does not understand).
|
||||
set_target_properties(orbithub PROPERTIES
|
||||
INSTALL_RPATH "@executable_path/../Frameworks"
|
||||
INSTALL_RPATH_USE_LINK_PATH ON
|
||||
)
|
||||
else()
|
||||
set_target_properties(orbithub PROPERTIES
|
||||
BUILD_RPATH_USE_ORIGIN ON
|
||||
INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}/orbithub"
|
||||
INSTALL_RPATH_USE_LINK_PATH ON
|
||||
)
|
||||
endif()
|
||||
|
||||
install(TARGETS orbithub
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
BUNDLE DESTINATION .
|
||||
)
|
||||
|
||||
set(ORBITHUB_PRIVATE_LIB_DESTINATION "${CMAKE_INSTALL_LIBDIR}/orbithub")
|
||||
if(APPLE)
|
||||
set(ORBITHUB_PRIVATE_LIB_DESTINATION "OrbitHub.app/Contents/Frameworks")
|
||||
else()
|
||||
set(ORBITHUB_PRIVATE_LIB_DESTINATION "${CMAKE_INSTALL_LIBDIR}/orbithub")
|
||||
endif()
|
||||
set(ORBITHUB_RUNTIME_TARGETS KodoTerm freerdp winpr)
|
||||
if(TARGET freerdp-client)
|
||||
list(APPEND ORBITHUB_RUNTIME_TARGETS freerdp-client)
|
||||
|
||||
Reference in New Issue
Block a user