mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-25 13:18:37 -05:00
Fix OSX code-signing order-of-operations
This commit is contained in:
parent
dd9cd03649
commit
b3b933c8dd
@ -629,9 +629,9 @@ IF (APPLE AND BUNDLE_APP)
|
|||||||
MACOSX_BUNDLE TRUE
|
MACOSX_BUNDLE TRUE
|
||||||
MACOSX_BUNDLE_INFO_STRING "CubicSDR Open-Source Software-Defined Radio Application"
|
MACOSX_BUNDLE_INFO_STRING "CubicSDR Open-Source Software-Defined Radio Application"
|
||||||
MACOSX_BUNDLE_BUNDLE_NAME "CubicSDR"
|
MACOSX_BUNDLE_BUNDLE_NAME "CubicSDR"
|
||||||
MACOSX_BUNDLE_BUNDLE_VERSION "${CUBICSDR_VERSION_MAJOR}.${CUBICSDR_VERSION_MINOR}.${CUBICSDR_VERSION_PATCH}"
|
MACOSX_BUNDLE_BUNDLE_VERSION "${CUBICSDR_VERSION}"
|
||||||
MACOSX_BUNDLE_LONG_VERSION_STRING "${CUBICSDR_VERSION}.${CUBICSDR_VERSION_MINOR}"
|
MACOSX_BUNDLE_LONG_VERSION_STRING "${CUBICSDR_VERSION_MAJOR}.${CUBICSDR_VERSION_MINOR}.${CUBICSDR_VERSION_PATCH}.${CUBICSDR_VERSION_REL}"
|
||||||
MACOSX_BUNDLE_SHORT_VERSION_STRING "${CUBICSDR_VERSION_MAJOR}.${CUBICSDR_VERSION_MINOR}.${CUBICSDR_VERSION_REL}"
|
MACOSX_BUNDLE_SHORT_VERSION_STRING "${CUBICSDR_VERSION_MAJOR}.${CUBICSDR_VERSION_MINOR}.${CUBICSDR_VERSION_PATCH}"
|
||||||
MACOSX_BUNDLE_GUI_IDENTIFIER "com.cubicproductions.cubicsdr"
|
MACOSX_BUNDLE_GUI_IDENTIFIER "com.cubicproductions.cubicsdr"
|
||||||
MACOSX_BUNDLE_ICON_FILE "CubicSDR.icns"
|
MACOSX_BUNDLE_ICON_FILE "CubicSDR.icns"
|
||||||
MACOSX_BUNDLE_COPYRIGHT "Copyright 2015 Charles J. Cliffe. All Rights Reserved."
|
MACOSX_BUNDLE_COPYRIGHT "Copyright 2015 Charles J. Cliffe. All Rights Reserved."
|
||||||
@ -651,15 +651,8 @@ IF (APPLE AND BUNDLE_APP)
|
|||||||
DESTINATION "${APPS}/Contents/MacOS/modules"
|
DESTINATION "${APPS}/Contents/MacOS/modules"
|
||||||
COMPONENT Runtime
|
COMPONENT Runtime
|
||||||
)
|
)
|
||||||
# IF (CUBICSDR_CODE_SIGN)
|
|
||||||
# LIST(APPEND CPACK_BUNDLE_APPLE_CODESIGN_FILES "${APPS}/Contents/MacOS/modules/${SOAPY_MOD_FILE}")
|
|
||||||
# ENDIF()
|
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
|
|
||||||
# IF (CUBICSDR_CODE_SIGN)
|
|
||||||
# message(STATUS "Will sign modules: ${CPACK_BUNDLE_APPLE_CODESIGN_FILES}")
|
|
||||||
# ENDIF()
|
|
||||||
|
|
||||||
ENDIF(BUNDLE_SOAPY_MODS)
|
ENDIF(BUNDLE_SOAPY_MODS)
|
||||||
|
|
||||||
SET_TARGET_PROPERTIES(CubicSDR PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${PROJECT_SOURCE_DIR}/cmake/CubicSDRInfo.plist.in")
|
SET_TARGET_PROPERTIES(CubicSDR PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${PROJECT_SOURCE_DIR}/cmake/CubicSDRInfo.plist.in")
|
||||||
@ -724,16 +717,21 @@ IF (APPLE AND BUNDLE_APP)
|
|||||||
TARGET CubicSDR
|
TARGET CubicSDR
|
||||||
COMMAND chmod ARGS +x ${CMAKE_CURRENT_BINARY_DIR}/code_sign.sh ${CMAKE_CURRENT_BINARY_DIR}/dmg_sign.sh
|
COMMAND chmod ARGS +x ${CMAKE_CURRENT_BINARY_DIR}/code_sign.sh ${CMAKE_CURRENT_BINARY_DIR}/dmg_sign.sh
|
||||||
)
|
)
|
||||||
|
|
||||||
|
INSTALL(CODE "
|
||||||
|
execute_process(
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E echo \"Signing code..\"
|
||||||
|
COMMAND \"${CMAKE_CURRENT_BINARY_DIR}/code_sign.sh\"
|
||||||
|
)"
|
||||||
|
COMPONENT Runtime)
|
||||||
|
|
||||||
ADD_CUSTOM_COMMAND(
|
ADD_CUSTOM_COMMAND(
|
||||||
TARGET CubicSDR
|
TARGET CubicSDR
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
COMMAND "${CMAKE_CURRENT_BINARY_DIR}/code_sign.sh"
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E echo "Running CPack.."
|
|
||||||
COMMAND ${CMAKE_CPACK_COMMAND}
|
COMMAND ${CMAKE_CPACK_COMMAND}
|
||||||
COMMAND ${CMAKE_COMMAND} -E echo "Signing package.."
|
COMMAND ${CMAKE_COMMAND} -E echo "Signing package.."
|
||||||
COMMAND "${CMAKE_CURRENT_BINARY_DIR}/dmg_sign.sh" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
COMMAND "${CMAKE_CURRENT_BINARY_DIR}/dmg_sign.sh" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
ENDIF(CUBICSDR_CODE_SIGN)
|
ENDIF(CUBICSDR_CODE_SIGN)
|
||||||
|
|
||||||
|
|
||||||
|
11
cmake/code_sign.sh.in
Normal file → Executable file
11
cmake/code_sign.sh.in
Normal file → Executable file
@ -1,2 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
/usr/bin/codesign -s "${CUBICSDR_CERT}" ${APPS}
|
for f in ${APPS}/Contents/MacOS/*.dylib
|
||||||
|
do
|
||||||
|
/usr/bin/codesign --force --verify --verbose --sign "${CUBICSDR_CERT}" $f
|
||||||
|
done
|
||||||
|
for f in ${APPS}/Contents/MacOS/modules/*.so
|
||||||
|
do
|
||||||
|
/usr/bin/codesign --force --verify --verbose --sign "${CUBICSDR_CERT}" $f
|
||||||
|
done
|
||||||
|
|
||||||
|
/usr/bin/codesign --force --verify --verbose --sign "${CUBICSDR_CERT}" ${APPS}
|
||||||
|
2
cmake/dmg_sign.sh.in
Normal file → Executable file
2
cmake/dmg_sign.sh.in
Normal file → Executable file
@ -1,2 +1,2 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
/usr/bin/codesign -s "${CUBICSDR_CERT}" CubicSDR-${CPACK_PACKAGE_VERSION}-Darwin.dmg
|
/usr/bin/codesign --force --verify --verbose --sign "${CUBICSDR_CERT}" CubicSDR-${CPACK_PACKAGE_VERSION}-Darwin.dmg
|
||||||
|
Loading…
Reference in New Issue
Block a user