diff --git a/CMakeLists.txt b/CMakeLists.txt index 1947d2c1b..5cef1fc97 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -168,7 +168,7 @@ endif() if(NOT DEFINED DATADIR) if(BUILD_BUNDLE) if(APPLE) - set(DATADIR "/Applications/RawTherapee.app/Contents/Resources") + set(DATADIR "../Resources/share") else() set(DATADIR .) endif() @@ -180,7 +180,7 @@ endif() if(NOT DEFINED LIBDIR) if(BUILD_BUNDLE) if(APPLE) - set(LIBDIR "/Applications/RawTherapee.app/Contents/Frameworks") + set(LIBDIR "../Frameworks") else() set(LIBDIR .) endif() diff --git a/rtengine/CMakeLists.txt b/rtengine/CMakeLists.txt index 5f59da371..3ac8a8071 100644 --- a/rtengine/CMakeLists.txt +++ b/rtengine/CMakeLists.txt @@ -195,4 +195,8 @@ target_link_libraries(rtengine rtexif ${KLT_LIBRARIES} ) +if(APPLE) +install(FILES ${CAMCONSTSFILE} DESTINATION "${CMAKE_INSTALL_PREFIX}/RawTherapee.app/Contents/Resources" PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) +else() install(FILES ${CAMCONSTSFILE} DESTINATION "${DATADIR}" PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) +endif() diff --git a/rtgui/config.h.in b/rtgui/config.h.in index 95217b689..570f263b8 100644 --- a/rtgui/config.h.in +++ b/rtgui/config.h.in @@ -22,10 +22,19 @@ #cmakedefine BUILD_BUNDLE #cmakedefine HAVE_UNALIGNED_MALLOC + +#ifdef __APPLE__ +#define DATA_SEARCH_PATH "/Applications/RawTherapee.com/Contents/Resources/share" +#define DOC_SEARCH_PATH "/Applications/RawTherapee.com/Contents/Resources" +#define CREDITS_SEARCH_PATH "/Applications/RawTherapee.com/Contents/Resources" +#define LICENCE_SEARCH_PATH "/Applications/RawTherapee.com/Contents/Resources" +#define LENSFUN_DB_PATH "${LENSFUNDBDIR}" +#else #define DATA_SEARCH_PATH "${DATADIR}" #define DOC_SEARCH_PATH "${DOCDIR}" #define CREDITS_SEARCH_PATH "${CREDITSDIR}" #define LICENCE_SEARCH_PATH "${LICENCEDIR}" #define LENSFUN_DB_PATH "${LENSFUNDBDIR}" +#endif #endif diff --git a/tools/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh index 6beefd83f..44908cb4d 100644 --- a/tools/osx/macosx_bundle.sh +++ b/tools/osx/macosx_bundle.sh @@ -110,7 +110,7 @@ EXPATLIB="$(cmake .. -LA -N | grep "pkgcfg_lib_EXPAT_expat" | cut -d "=" -f2)" CODESIGNID="$(cmake .. -LA -N | grep "CODESIGNID" | cut -d "=" -f2)" NOTARY="$(cmake .. -LA -N | grep "NOTARY" | cut -d "=" -f2)" FANCY_DMG="$(cmake .. -LA -N | grep "FANCY_DMG" | cut -d "=" -f2)" -echo ${FANCY_DMG} || echo "Building plain .dmg" +echo ${FANCY_DMG} APP="${PROJECT_NAME}.app" CONTENTS="${APP}/Contents" @@ -125,17 +125,14 @@ msg "Removing old files:" rm -rf "${APP}" *.dmg *.zip msg "Creating bundle container:" -install -d "${RESOURCES}" \ -"${MACOS}" \ -"${LIB}" \ -"${ETC}" +install -d "${APP}" "${RESOURCES}" "${MACOS}" "${LIB}" "${ETC}" -echo "\n--------\n" >> "${CMAKE_BUILD_TYPE}"/Resources/AboutThisBuild.txt -echo "Bundle system: $(sysctl -n machdep.cpu.brand_string)" >> "${CMAKE_BUILD_TYPE}"/Resources/AboutThisBuild.txt -echo "Bundle OS: $(sw_vers -productName) $(sw_vers -productVersion) $(sw_vers -buildVersion) $(uname -mrs)" >> "${CMAKE_BUILD_TYPE}"/Resources/AboutThisBuild.txt -echo "Bundle date: $(date -Ru) ZULU" >> "${CMAKE_BUILD_TYPE}"/Resources/AboutThisBuild.txt -echo "Bundle epoch: $(date +%s)" >> "${CMAKE_BUILD_TYPE}"/Resources/AboutThisBuild.txt -echo "Bundle UUID: $(uuidgen|tr 'A-Z' 'a-z')" >> "${CMAKE_BUILD_TYPE}"/Resources/AboutThisBuild.txt +echo "\n--------\n" >> "${CMAKE_BUILD_TYPE}/Resources/AboutThisBuild.txt" +echo "Bundle system: $(sysctl -n machdep.cpu.brand_string)" >> "${CMAKE_BUILD_TYPE}/Resources/AboutThisBuild.txt" +echo "Bundle OS: $(sw_vers -productName) $(sw_vers -productVersion) $(sw_vers -buildVersion) $(uname -mrs)" >> "${CMAKE_BUILD_TYPE}/${RESOURCES}/AboutThisBuild.txt" +echo "Bundle date: $(date -Ru) ZULU" >> "${CMAKE_BUILD_TYPE}/Resources/AboutThisBuild.txt" +echo "Bundle epoch: $(date +%s)" >> "${CMAKE_BUILD_TYPE}/Resources/AboutThisBuild.txt" +echo "Bundle UUID: $(uuidgen|tr 'A-Z' 'a-z')" >> "${CMAKE_BUILD_TYPE}/Resources/AboutThisBuild.txt" msg "Copying binary executable files." ditto "${CMAKE_BUILD_TYPE}/MacOS" "${MACOS}" @@ -318,8 +315,8 @@ function CreateWebloc { defaults write "${srcDir}/$1" URL "$2" mv "${srcDir}/$1".{plist,webloc} } -CreateWebloc 'Website' 'http://www.rawtherapee.com/' -CreateWebloc 'Manual' 'http://rawpedia.rawtherapee.com/' +CreateWebloc 'Website' 'https://www.rawtherapee.com/' +CreateWebloc 'Manual' 'https://rawpedia.rawtherapee.com/' # Disk image name dmg_name="${PROJECT_NAME// /_}_OSX_${MINIMUM_SYSTEM_VERSION}_${PROC_BIT_DEPTH}_${PROJECT_FULL_VERSION}" @@ -374,3 +371,4 @@ msg "Finishing build:" echo "Script complete." # # TODO filter out the benign errors +# Build a fancy dmg