From 4e4faafb08cea176173e86f1403d16968e36c9af Mon Sep 17 00:00:00 2001 From: Richard Barber Date: Thu, 20 Feb 2020 03:14:46 -0800 Subject: [PATCH] mac:fix destination of comconst.json --- CMakeLists.txt | 10 +++++++--- rtengine/CMakeLists.txt | 4 ++-- tools/osx/macosx_bundle.sh | 6 ++---- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a9f96a4d6..403314b07 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -150,7 +150,7 @@ endif() if(NOT DEFINED BUNDLE_BASE_INSTALL_DIR) if(APPLE) - set(BUNDLE_BASE_INSTALL_DIR "${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/MacOS") + set(BUNDLE_BASE_INSTALL_DIR "${CMAKE_BUILD_TYPE}") else() set(BUNDLE_BASE_INSTALL_DIR "${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}") endif() @@ -266,7 +266,7 @@ if(NOT DEFINED APPDATADIR) if(UNIX) if(BUILD_BUNDLE) if(APPLE) - set(APPDATADIR "${DATADIR}/share/metainfo") + set(APPDATADIR "${DATADIR}/metainfo") else() set(APPDATADIR "${DATADIR}/share/metainfo") endif() @@ -561,7 +561,11 @@ install(FILES RELEASE_NOTES.txt DESTINATION "${CREDITSDIR}" OPTIONAL) # The standard location for man pages in Linux is /usr/share/man # Use "manpath" to see the search paths for man pages on your system. if(BUILD_BUNDLE) - install(FILES "${PROJECT_SOURCE_DIR}/doc/manpage/rawtherapee.1" DESTINATION "${DATADIR}/share/man/man1") + if(APPLE) + install(FILES "${PROJECT_SOURCE_DIR}/doc/manpage/rawtherapee.1" DESTINATION "${DATADIR}/man/man1") + else() + install(FILES "${PROJECT_SOURCE_DIR}/doc/manpage/rawtherapee.1" DESTINATION "${DATADIR}/share/man/man1") + endif() else() install(FILES "${PROJECT_SOURCE_DIR}/doc/manpage/rawtherapee.1" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/man/man1") endif() diff --git a/rtengine/CMakeLists.txt b/rtengine/CMakeLists.txt index 3ac8a8071..8d13f0d6e 100644 --- a/rtengine/CMakeLists.txt +++ b/rtengine/CMakeLists.txt @@ -196,7 +196,7 @@ target_link_libraries(rtengine rtexif ) if(APPLE) -install(FILES ${CAMCONSTSFILE} DESTINATION "${CMAKE_INSTALL_PREFIX}/RawTherapee.app/Contents/Resources" PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) + install(FILES ${CAMCONSTSFILE} DESTINATION "${DATADIR}" PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) else() -install(FILES ${CAMCONSTSFILE} DESTINATION "${DATADIR}" PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) + install(FILES ${CAMCONSTSFILE} DESTINATION "${DATADIR}" PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) endif() diff --git a/tools/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh index 1d184899f..884979aba 100644 --- a/tools/osx/macosx_bundle.sh +++ b/tools/osx/macosx_bundle.sh @@ -12,7 +12,7 @@ fNormal="$(tput sgr0)" fBold="$(tput bold)" # Colors depend upon the user's terminal emulator color scheme - what is readable for you may be not readable for someone else. -fMagenta="$(tput setaf 3)" +fMagenta="$(tput setaf 5)" fRed="$(tput setaf 1)" function msg { @@ -125,8 +125,6 @@ msg "Removing old files:" rm -rf "${APP}" *.dmg *.zip msg "Creating bundle container:" -cd "${CMAKE_INSTALL_PREEFIX}" -install -d "${APP}" install -d "${RESOURCES}" install -d "${MACOS}" install -d "${LIB}" @@ -278,7 +276,7 @@ for frameworklibs in "${LIB}"/* ; do codesign -v -s "${CODESIGNID}" -i com.rawtherapee.RawTherapee --force --verbose -o runtime --timestamp "${frameworklibs}" done codesign --timestamp --strict -v -s "${CODESIGNID}" -i com.rawtherapee.RawTherapee -o runtime --entitlements "${CMAKE_BUILD_TYPE}"/rt.entitlements "${APP}" -spctl -a -vvvv ${APP} +spctl -a -vvvv "${APP}" fi # Notarize the app