Skip to content

Commit

Permalink
Try to fix tiff file
Browse files Browse the repository at this point in the history
  • Loading branch information
tresf committed May 12, 2024
1 parent deb916d commit 655365e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmake/apple/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${VERSION}" PARENT_SCOPE)
set(CPACK_PRE_BUILD_SCRIPTS "${CMAKE_CURRENT_SOURCE_DIR}/CPackApple.cmake" PARENT_SCOPE)
set(CPACK_DMG_VOLUME_NAME "${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${VERSION}-mac${APPLE_OS_VER}.dmg" PARENT_SCOPE)
# tiff file is multi-resource (1x & 2x) created programatically using convert
execute_process(COMMAND convert "${CMAKE_SOURCE_DIR}/cmake/apple/*.png" "${CMAKE_BINARY_DIR}/dmg_branding.tiff")
set(CPACK_DMG_BACKGROUND_IMAGE "${CMAKE_BINARY_DIR}/dmg_branding.tiff" PARENT_SCOPE)
# DS_Store contains the Finder layout
# - .DS_Store can be recreated using appdmg appdmg.json lmms.dmg
Expand All @@ -35,6 +36,5 @@ set(CPACK_DMG_DS_STORE "${CMAKE_SOURCE_DIR}/cmake/apple/DS_Store" PARENT_SCOPE)
unset(CPACK_RESOURCE_FILE_LICENSE PARENT_SCOPE)

# Additional vars otherwise unexposed to CPack
set(CPACK_DMG_BACKGROUND_PNGS "${CMAKE_SOURCE_DIR}/cmake/apple/*.png" PARENT_SCOPE)
set(CPACK_BINARY_DIR "${CMAKE_BINARY_DIR}" PARENT_SCOPE)
set(CPACK_DMG_FILE "${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${VERSION}-mac${APPLE_OS_VER}.dmg" PARENT_SCOPE)
5 changes: 1 addition & 4 deletions cmake/apple/CPackApple.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,4 @@ execute_process(COMMAND chmod u+x ${CPACK_BINARY_DIR}/package_apple.sh)
execute_process(COMMAND ${CPACK_BINARY_DIR}/install_apple.sh ${CPACK_TEMPORARY_INSTALL_DIRECTORY} RESULT_VARIABLE EXIT_CODE)
if(NOT EXIT_CODE EQUAL 0)
message(FATAL_ERROR "Execution of package_apple.sh failed")
endif()

# Create tiff from two pngs
execute_process(COMMAND convert "${CPACK_DMG_BACKGROUND_PNGS}" "${CPACK_DMG_BACKGROUND_IMAGE}")
endif()

0 comments on commit 655365e

Please sign in to comment.