2024-09-13 19:44:16 +02:00
|
|
|
find_program(MACDEPLOYQT_EXECUTABLE NAMES macdeployqt PATHS /usr/bin /usr/local/bin /opt/local/bin /usr/local/opt/qt6/bin REQUIRED)
|
2021-04-23 19:05:02 +02:00
|
|
|
if(MACDEPLOYQT_EXECUTABLE)
|
|
|
|
message(STATUS "Found macdeployqt: ${MACDEPLOYQT_EXECUTABLE}")
|
|
|
|
else()
|
|
|
|
message(WARNING "Missing macdeployqt executable.")
|
|
|
|
endif()
|
2020-08-26 22:35:18 +02:00
|
|
|
|
2024-09-13 19:44:16 +02:00
|
|
|
find_program(MACDEPLOYCHECK_EXECUTABLE NAMES macdeploycheck PATHS /usr/bin /usr/local/bin /opt/local/bin /usr/local/opt/qt6/bin REQUIRED)
|
|
|
|
if(MACDEPLOYCHECK_EXECUTABLE)
|
|
|
|
message(STATUS "Found macdeploycheck: ${MACDEPLOYCHECK_EXECUTABLE}")
|
|
|
|
else()
|
|
|
|
message(WARNING "Missing macdeploycheck executable.")
|
|
|
|
endif()
|
|
|
|
|
2021-03-03 02:03:52 +01:00
|
|
|
find_program(CREATEDMG_EXECUTABLE NAMES create-dmg REQUIRED)
|
2020-12-28 21:28:45 +01:00
|
|
|
if(CREATEDMG_EXECUTABLE)
|
|
|
|
message(STATUS "Found create-dmg: ${CREATEDMG_EXECUTABLE}")
|
|
|
|
else()
|
|
|
|
message(WARNING "Missing create-dmg executable.")
|
|
|
|
endif()
|
|
|
|
|
2021-05-13 01:37:05 +02:00
|
|
|
if(MACDEPLOYQT_EXECUTABLE)
|
2023-09-24 01:50:58 +02:00
|
|
|
|
|
|
|
if(APPLE_DEVELOPER_ID)
|
|
|
|
set(MACDEPLOYQT_CODESIGN -codesign=${APPLE_DEVELOPER_ID})
|
|
|
|
set(CREATEDMG_CODESIGN --codesign ${APPLE_DEVELOPER_ID})
|
|
|
|
endif()
|
|
|
|
if(CREATEDMG_SKIP_JENKINS)
|
|
|
|
set(CREATEDMG_SKIP_JENKINS_ARG "--skip-jenkins")
|
|
|
|
endif()
|
|
|
|
|
2021-05-13 01:37:05 +02:00
|
|
|
add_custom_target(deploy
|
|
|
|
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/strawberry.app/Contents/{Frameworks,Resources}
|
2021-08-19 22:15:30 +02:00
|
|
|
COMMAND cp -v ${CMAKE_SOURCE_DIR}/dist/macos/Info.plist ${CMAKE_BINARY_DIR}/strawberry.app/Contents/
|
|
|
|
COMMAND cp -v ${CMAKE_SOURCE_DIR}/dist/macos/strawberry.icns ${CMAKE_BINARY_DIR}/strawberry.app/Contents/Resources/
|
2023-08-13 12:26:13 +02:00
|
|
|
COMMAND ${CMAKE_SOURCE_DIR}/dist/macos/macgstcopy.sh ${CMAKE_BINARY_DIR}/strawberry.app
|
2024-09-15 23:17:14 +02:00
|
|
|
COMMAND ${MACDEPLOYQT_EXECUTABLE} strawberry.app -verbose=3 -executable=${CMAKE_BINARY_DIR}/strawberry.app/Contents/PlugIns/gst-plugin-scanner ${MACDEPLOYQT_CODESIGN}
|
2020-12-24 15:24:48 +01:00
|
|
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
2024-09-15 23:17:14 +02:00
|
|
|
DEPENDS strawberry
|
2021-08-19 19:17:06 +02:00
|
|
|
)
|
2024-09-13 19:44:16 +02:00
|
|
|
if(MACDEPLOYCHECK_EXECUTABLE)
|
|
|
|
add_custom_target(deploycheck
|
|
|
|
COMMAND ${MACDEPLOYCHECK_EXECUTABLE} strawberry.app
|
|
|
|
)
|
|
|
|
endif()
|
2021-05-13 01:37:05 +02:00
|
|
|
if(CREATEDMG_EXECUTABLE)
|
|
|
|
add_custom_target(dmg
|
2023-09-24 01:50:58 +02:00
|
|
|
COMMAND ${CREATEDMG_EXECUTABLE} --volname strawberry --background "${CMAKE_SOURCE_DIR}/dist/macos/dmg_background.png" --app-drop-link 450 218 --icon strawberry.app 150 218 --window-size 600 450 ${CREATEDMG_CODESIGN} ${CREATEDMG_SKIP_JENKINS_ARG} strawberry-${STRAWBERRY_VERSION_PACKAGE}-${CMAKE_HOST_SYSTEM_PROCESSOR}.dmg strawberry.app
|
2021-05-13 01:37:05 +02:00
|
|
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
|
|
|
)
|
|
|
|
endif()
|
2020-12-24 15:24:48 +01:00
|
|
|
endif()
|