From ffb0215c00ad229ceaa4d4c944cf483e74858b69 Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 4 Jan 2016 13:43:49 +0100 Subject: [PATCH] Changed: Copy tools related to client into client bundle under OS X --- .../tools/misc/crash_report/CMakeLists.txt | 8 ----- code/ryzom/client/src/CMakeLists.txt | 35 ++++++++++++++++++- .../client/client_config_qt/CMakeLists.txt | 8 ----- .../client/client_patcher/CMakeLists.txt | 10 +----- 4 files changed, 35 insertions(+), 26 deletions(-) diff --git a/code/nel/tools/misc/crash_report/CMakeLists.txt b/code/nel/tools/misc/crash_report/CMakeLists.txt index 221f7cabe..1169aab8d 100644 --- a/code/nel/tools/misc/crash_report/CMakeLists.txt +++ b/code/nel/tools/misc/crash_report/CMakeLists.txt @@ -48,11 +48,3 @@ NL_DEFAULT_PROPS(crash_report "NeL, Tools, Misc: Crash Report") NL_ADD_RUNTIME_FLAGS(crash_report) 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() diff --git a/code/ryzom/client/src/CMakeLists.txt b/code/ryzom/client/src/CMakeLists.txt index ad55fd3d7..7c939bbeb 100644 --- a/code/ryzom/client/src/CMakeLists.txt +++ b/code/ryzom/client/src/CMakeLists.txt @@ -78,8 +78,41 @@ IF(WITH_RYZOM_CLIENT) ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND cp ARGS -RpX ${RYZOM_DATA_DIR} ${RYZOM_RESOURCES_DIR}) ENDIF() + IF(TARGET crash_report) + ADD_DEPENDENCIES(ryzom_client crash_report) + + # copy crash_report to bundle + ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND cp -p ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/crash_report ${RYZOM_CONTENTS_DIR}/MacOS/CrashReport) + + IF(CODESIGN_ALLOCATE AND APPLE_CERTIFICATE) + ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign -fs "${APPLE_CERTIFICATE}" "${RYZOM_CONTENTS_DIR}/MacOS/CrashReport" COMMENT "Signing CrashReport executable...") + ENDIF() + ENDIF() + + IF(TARGET ryzom_client_patcher) + ADD_DEPENDENCIES(ryzom_client ryzom_client_patcher) + + # copy ryzom_client_patcher to bundle + ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND cp -p ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ryzom_client_patcher ${RYZOM_CONTENTS_DIR}/MacOS/RyzomClientPatcher) + + IF(CODESIGN_ALLOCATE AND APPLE_CERTIFICATE) + ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign -fs "${APPLE_CERTIFICATE}" "${RYZOM_CONTENTS_DIR}/MacOS/RyzomClientPatcher" COMMENT "Signing RyzomClientPatcher executable...") + ENDIF() + ENDIF() + + IF(TARGET ryzom_configuration_qt) + ADD_DEPENDENCIES(ryzom_client ryzom_configuration_qt) + + # copy ryzom_configuration_qt to bundle + ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND cp -p ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ryzom_configuration_qt ${RYZOM_CONTENTS_DIR}/MacOS/RyzomConfiguration) + + IF(CODESIGN_ALLOCATE AND APPLE_CERTIFICATE) + ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign -fs "${APPLE_CERTIFICATE}" "${RYZOM_CONTENTS_DIR}/MacOS/RyzomConfiguration" COMMENT "Signing RyzomConfiguration executable...") + ENDIF() + ENDIF() + IF(CODESIGN_ALLOCATE AND APPLE_CERTIFICATE) - ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign -fs "${APPLE_CERTIFICATE}" "${RYZOM_OUTPUT_DIR}" COMMENT "Signing bundle...") + ADD_CUSTOM_COMMAND(TARGET ryzom_client POST_BUILD COMMAND CODESIGN_ALLOCATE=${CODESIGN_ALLOCATE} codesign -fs "${APPLE_CERTIFICATE}" "${RYZOM_OUTPUT_DIR}" COMMENT "Signing Ryzom bundle...") ENDIF() ENDIF() diff --git a/code/ryzom/tools/client/client_config_qt/CMakeLists.txt b/code/ryzom/tools/client/client_config_qt/CMakeLists.txt index f27589afa..f0bb295b3 100644 --- a/code/ryzom/tools/client/client_config_qt/CMakeLists.txt +++ b/code/ryzom/tools/client/client_config_qt/CMakeLists.txt @@ -69,11 +69,3 @@ IF(WITH_PCH) ENDIF() 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() diff --git a/code/ryzom/tools/client/client_patcher/CMakeLists.txt b/code/ryzom/tools/client/client_patcher/CMakeLists.txt index f71f21a35..c2f8ff3c6 100644 --- a/code/ryzom/tools/client/client_patcher/CMakeLists.txt +++ b/code/ryzom/tools/client/client_patcher/CMakeLists.txt @@ -42,12 +42,4 @@ IF(WITH_PCH) ADD_NATIVE_PRECOMPILED_HEADER(ryzom_client_patcher ${CMAKE_SOURCE_DIR}/ryzom/client/src/stdpch.h ${CMAKE_SOURCE_DIR}/ryzom/client/src/stdpch.cpp) ENDIF(WITH_PCH) -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() +INSTALL(TARGETS ryzom_client_patcher RUNTIME DESTINATION ${RYZOM_GAMES_PREFIX} COMPONENT client)