Fixed: Sign OS X binaries needed by client and copy them in Ryzom bundle
This commit is contained in:
parent
2ebe33cd43
commit
df89274053
5 changed files with 48 additions and 21 deletions
|
@ -140,6 +140,28 @@ IF(WITH_SSE2)
|
||||||
ENDIF(WITH_SSE3)
|
ENDIF(WITH_SSE3)
|
||||||
ENDIF(WITH_SSE2)
|
ENDIF(WITH_SSE2)
|
||||||
|
|
||||||
|
IF(APPLE_CERTIFICATE)
|
||||||
|
# Find codesign_allocate
|
||||||
|
|
||||||
|
# Xcode 7.0 and later versions
|
||||||
|
SET(CODESIGN_ALLOCATE ${OSX_DEVELOPER_ROOT}/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate)
|
||||||
|
|
||||||
|
IF(NOT EXISTS "${CODESIGN_ALLOCATE}")
|
||||||
|
# Xcode 6.4 and previous versions
|
||||||
|
SET(CODESIGN_ALLOCATE ${CMAKE_OSX_SYSROOT}/usr/bin/codesign_allocate)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF(NOT EXISTS "${CODESIGN_ALLOCATE}")
|
||||||
|
# System path
|
||||||
|
SET(CODESIGN_ALLOCATE /usr/bin/codesign_allocate)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF(NOT EXISTS "${CODESIGN_ALLOCATE}")
|
||||||
|
MESSAGE(WARNING "Unable to find codesign_allocate in standard directories")
|
||||||
|
SET(CODESIGN_ALLOCATE)
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
MACRO(ADD_QT_LIBRARY _NAME)
|
MACRO(ADD_QT_LIBRARY _NAME)
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
SET(_PREFIX "Qt5")
|
SET(_PREFIX "Qt5")
|
||||||
|
|
|
@ -48,3 +48,11 @@ NL_DEFAULT_PROPS(crash_report "NeL, Tools, Misc: Crash Report")
|
||||||
NL_ADD_RUNTIME_FLAGS(crash_report)
|
NL_ADD_RUNTIME_FLAGS(crash_report)
|
||||||
|
|
||||||
INSTALL(TARGETS crash_report RUNTIME DESTINATION ${NL_BIN_PREFIX})
|
INSTALL(TARGETS crash_report RUNTIME DESTINATION ${NL_BIN_PREFIX})
|
||||||
|
|
||||||
|
IF(WITH_RYZOM_CLIENT AND APPLE)
|
||||||
|
IF(CODESIGN_ALLOCATE AND APPLE_CERTIFICATE)
|
||||||
|
ADD_CUSTOM_COMMAND(TARGET crash_report POST_BUILD COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign -fs "${APPLE_CERTIFICATE}" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/crash_report" COMMENT "Signing crash_report executable...")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
ADD_CUSTOM_COMMAND(TARGET crash_report POST_BUILD COMMAND cp -p ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/crash_report ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${MACOSX_BUNDLE_BUNDLE_NAME}.app/Contents/MacOS/CrashReport)
|
||||||
|
ENDIF()
|
||||||
|
|
|
@ -78,27 +78,8 @@ IF(WITH_RYZOM_CLIENT)
|
||||||
ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND cp ARGS -RpX ${RYZOM_DATA_DIR} ${RYZOM_RESOURCES_DIR})
|
ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND cp ARGS -RpX ${RYZOM_DATA_DIR} ${RYZOM_RESOURCES_DIR})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF(APPLE_CERTIFICATE)
|
IF(CODESIGN_ALLOCATE AND APPLE_CERTIFICATE)
|
||||||
# Find codesign_allocate
|
ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign -fs "${APPLE_CERTIFICATE}" "${RYZOM_OUTPUT_DIR}" COMMENT "Signing bundle...")
|
||||||
|
|
||||||
# Xcode 7.0 and later versions
|
|
||||||
SET(CODESIGN_ALLOCATE ${OSX_DEVELOPER_ROOT}/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate)
|
|
||||||
|
|
||||||
IF(NOT EXISTS "${CODESIGN_ALLOCATE}")
|
|
||||||
# Xcode 6.4 and previous versions
|
|
||||||
SET(CODESIGN_ALLOCATE ${CMAKE_OSX_SYSROOT}/usr/bin/codesign_allocate)
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
IF(NOT EXISTS "${CODESIGN_ALLOCATE}")
|
|
||||||
# System path
|
|
||||||
SET(CODESIGN_ALLOCATE /usr/bin/codesign_allocate)
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
IF(NOT EXISTS "${CODESIGN_ALLOCATE}")
|
|
||||||
MESSAGE(WARNING "Unable to find codesign_allocate in standard directories")
|
|
||||||
ELSE()
|
|
||||||
ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign -fs "${APPLE_CERTIFICATE}" "${RYZOM_OUTPUT_DIR}" COMMENT "Signing bundle...")
|
|
||||||
ENDIF()
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
|
|
@ -69,3 +69,11 @@ IF(WITH_PCH)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
INSTALL(TARGETS ryzom_configuration_qt RUNTIME DESTINATION ${RYZOM_GAMES_PREFIX} COMPONENT client)
|
INSTALL(TARGETS ryzom_configuration_qt RUNTIME DESTINATION ${RYZOM_GAMES_PREFIX} COMPONENT client)
|
||||||
|
|
||||||
|
IF(WITH_RYZOM_CLIENT AND APPLE)
|
||||||
|
IF(CODESIGN_ALLOCATE AND APPLE_CERTIFICATE)
|
||||||
|
ADD_CUSTOM_COMMAND(TARGET ryzom_configuration_qt POST_BUILD COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign -fs "${APPLE_CERTIFICATE}" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ryzom_configuration_qt" COMMENT "Signing ryzom_configuration_qt executable...")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
ADD_CUSTOM_COMMAND(TARGET ryzom_configuration_qt POST_BUILD COMMAND cp -p ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ryzom_configuration_qt ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${MACOSX_BUNDLE_BUNDLE_NAME}.app/Contents/MacOS/RyzomConfiguration)
|
||||||
|
ENDIF()
|
||||||
|
|
|
@ -43,3 +43,11 @@ IF(WITH_PCH)
|
||||||
ENDIF(WITH_PCH)
|
ENDIF(WITH_PCH)
|
||||||
|
|
||||||
INSTALL(TARGETS ryzom_client_patcher RUNTIME DESTINATION ${RYZOM_GAMES_PREFIX} COMPONENT client BUNDLE DESTINATION /Applications)
|
INSTALL(TARGETS ryzom_client_patcher RUNTIME DESTINATION ${RYZOM_GAMES_PREFIX} COMPONENT client BUNDLE DESTINATION /Applications)
|
||||||
|
|
||||||
|
IF(WITH_RYZOM_CLIENT AND APPLE)
|
||||||
|
IF(CODESIGN_ALLOCATE AND APPLE_CERTIFICATE)
|
||||||
|
ADD_CUSTOM_COMMAND(TARGET ryzom_client_patcher POST_BUILD COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign -fs "${APPLE_CERTIFICATE}" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ryzom_client_patcher" COMMENT "Signing ryzom_client_patcher executable...")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
ADD_CUSTOM_COMMAND(TARGET ryzom_client_patcher POST_BUILD COMMAND cp -p ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ryzom_client_patcher ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${MACOSX_BUNDLE_BUNDLE_NAME}.app/Contents/MacOS/RyzomClientPatcher)
|
||||||
|
ENDIF()
|
||||||
|
|
Loading…
Reference in a new issue