diff --git a/AboutThisBuild.txt.in b/AboutThisBuild.txt.in
index f48d39b50..06f628187 100644
--- a/AboutThisBuild.txt.in
+++ b/AboutThisBuild.txt.in
@@ -13,3 +13,7 @@ Build flags: ${CXX_FLAGS}
Link flags: ${LFLAGS}
OpenMP support: ${OPTION_OMP}
MMAP support: ${WITH_MYFILE_MMAP}
+Build OS: ${BUILDINFO_OS}
+Build date: ${BUILDINFO_DATE} ZULU
+Build epoch: ${BUILDINFO_EPOCH}
+Build UUID: ${BUILDINFO_UUID}
diff --git a/UpdateInfo.cmake b/UpdateInfo.cmake
index d1f532506..a4de8fe1a 100644
--- a/UpdateInfo.cmake
+++ b/UpdateInfo.cmake
@@ -64,6 +64,11 @@ if(REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND)
set(GIT_NUMERIC_VERSION_BS "${GIT_NUMERIC_VERSION_BS}.${GIT_COMMITS_SINCE_TAG}")
endif()
+ execute_process(COMMAND uname -mrs OUTPUT_VARIABLE BUILDINFO_OS OUTPUT_STRIP_TRAILING_WHITESPACE)
+ execute_process(COMMAND date -Ru OUTPUT_VARIABLE BUILDINFO_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
+ execute_process(COMMAND date +%s OUTPUT_VARIABLE BUILDINFO_EPOCH OUTPUT_STRIP_TRAILING_WHITESPACE)
+ execute_process(COMMAND uuidgen COMMAND tr "A-Z" "a-z" OUTPUT_VARIABLE BUILDINFO_UUID OUTPUT_STRIP_TRAILING_WHITESPACE)
+
message(STATUS "Git checkout information:")
message(STATUS " Commit description: ${GIT_DESCRIBE}")
message(STATUS " Branch: ${GIT_BRANCH}")
@@ -72,6 +77,11 @@ if(REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND)
message(STATUS " Commits since tag: ${GIT_COMMITS_SINCE_TAG}")
message(STATUS " Commits since branch: ${GIT_COMMITS_SINCE_BRANCH}")
message(STATUS " Version (unreliable): ${GIT_NUMERIC_VERSION_BS}")
+ message(STATUS "Build information:")
+ message(STATUS " Build OS: ${BUILDINFO_OS}")
+ message(STATUS " Build date: ${BUILDINFO_DATE}")
+ message(STATUS " Epoch: ${BUILDINFO_EPOCH}")
+ message(STATUS " UUID: ${BUILDINFO_UUID}")
if(NOT DEFINED CACHE_NAME_SUFFIX)
set(CACHE_NAME_SUFFIX "${GIT_DESCRIBE}")
diff --git a/tools/osx/Info.plist-bin.in b/tools/osx/Info.plist-bin.in
deleted file mode 100644
index 33abd4f7a..000000000
--- a/tools/osx/Info.plist-bin.in
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
- CFBundleName
- RawTherapee-bin
- CFBundleIdentifier
- com.rawtherapee.rawtherapee
-
-
diff --git a/tools/osx/Info.plist.in b/tools/osx/Info.plist.in
index eec1ab490..7e4918cc0 100644
--- a/tools/osx/Info.plist.in
+++ b/tools/osx/Info.plist.in
@@ -2,6 +2,35 @@
+ LSEnvironment
+
+ XDG_DATA_DIRS
+ /Applications/RawTherapee.app/Contents/Resources/share
+ DYLD_FALLBACK_LIBRARY_PATH
+ /Applications/RawTherapee.app/Contents/Frameworks
+ GTK_PATH
+ /Applications/RawTherapee.app/Contents/Frameworks
+ GTK_IM_MODULE_FILE
+ /Applications/RawTherapee.app/Contents/Resources/etc/gtk-3.0/gtk.immodules
+ XDG_DATA_HOME
+ /Applications/RawTherapee.app/Contents/Resources/share
+ GSETTINGS_SCHEMA_DIR
+ /Applications/RawTherapee.app/Contents/Resources/share/glib-2.0/schemas
+ GDK_PIXBUF_MODULE_FILE
+ /Applications/RawTherapee.app/Contents/Resources/etc/gtk-3.0/gdk-pixbuf.loaders
+ GDK_PIXBUF_MODULEDIR
+ /Applications/RawTherapee.app/Contents/Frameworks
+ FONTCONFIG_PATH
+ /Applications/RawTherapee.app/Contents/Resources/etc/fonts
+ LIBDIR
+ /Applications/RawTherapee.app/Contents/Frameworks
+ DATADIR
+ /Applications/RawTherapee.app/Contents/Resources
+ GDK_RENDERING
+ similar
+ GTK_OVERLAY_SCROLLING
+ 0
+
CFBundleDevelopmentRegion
English
CFBundleDisplayName
@@ -115,7 +144,7 @@
CFBundleIconFile
rawtherapee.icns
CFBundleIdentifier
- com.rawtherapee.rawtherapee
+ com.rawtherapee.RawTherapee
CFBundleInfoDictionaryVersion
6.0
CFBundleName
diff --git a/tools/osx/executable_loader.in b/tools/osx/executable_loader.in
deleted file mode 100644
index 5ee609043..000000000
--- a/tools/osx/executable_loader.in
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-
-# GIMP has this next line regarding raising the number-of-open-files limit:
-ulimit -n 7000
-
-cd "$(dirname "$0")" || exit 1
-
-cwd="$(pwd)"
-app="/Applications/RawTherapee.app"
-lib="${app}/Contents/Frameworks"
-resources="${app}/Contents/Resources"
-etc="${resources}/etc"
-export XDG_DATA_DIRS="${resources}/share"
-export DYLD_FALLBACK_LIBRARY_PATH="${lib}"
-export GTK_PATH="${lib}/gtk-3.0/3.0.0"
-export XDG_DATA_HOME="${resources}/share"
-export GSETTINGS_SCHEMA_DIR="${resources}/share/glib-2.0/schemas"
-export GDK_PIXBUF_MODULE_FILE="${etc}/gtk-3.0/gdk-pixbuf.loaders"
-export GDK_PIXBUF_MODULEDIR="${lib}"
-
-export RT_SETTINGS="${HOME}/Library/Application Support/RawTherapee/config"
-export RT_CACHE="${HOME}/Library/Application Support/RawTherapee/cache"
-
-# Strip out system argument
-case "$1" in
- -psn_*) shift ;;
-esac
-
-# Prevent crash when directory name contains special characters
-AppleLocale=`defaults read -g AppleLocale`
-export LANG=${AppleLocale%@*}.UTF-8
-
-exec "${app}/Contents/MacOS/bin/rawtherapee-bin" "$@"
diff --git a/tools/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh
index 7a6bfe765..cb5338121 100644
--- a/tools/osx/macosx_bundle.sh
+++ b/tools/osx/macosx_bundle.sh
@@ -50,6 +50,22 @@ function ModifyInstallNames {
done
}
+function ModifyInstallNames {
+ find -E "${CONTENTS}" -type f -regex '.*/(rawtherapee-cli|rawtherapee|.*\.(dylib|so))' | while read -r x; do
+ msg "Modifying install names: ${x}"
+ {
+ # id
+ if [ ${x:(-6)} == ".dylib" ] || [ f${x:(-3)} == ".so" ]; then
+ echo " install_name_tool -id '@rpath/$(basename "${x}")' '${x}'"
+ fi
+ GetDependencies "${x}" | while read -r y
+ do
+ echo " install_name_tool -change '${y}' '@rpath/$(basename "${y}")' '${x}'"
+ done
+ } | bash -v
+ done
+}
+
# Source check
if [[ ! -d "${CMAKE_BUILD_TYPE}" ]]; then
msgError "${PWD}/${CMAKE_BUILD_TYPE} folder does not exist. Please execute 'make install' first."
@@ -132,9 +148,16 @@ echo "Bundle date: $(date -Ru) ZULU" >> Resources/AboutThisBuild.txt
echo "Bundle epoch: $(date +%s)" >> Resources/AboutThisBuild.txt
echo "Bundle UUID: $(uuidgen)" >> 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)" >> "${CMAKE_BUILD_TYPE}"/Resources/AboutThisBuild.txt
+
msg "Copying release files:"
ditto "${CMAKE_BUILD_TYPE}/MacOS" "${MACOS}"
-ditto "Resources" "${RESOURCES}"
+ditto "${CMAKE_BUILD_TYPE}/Resources" "${RESOURCES}"
# Copy the Lensfun database into the app bundle
mkdir -p "${RESOURCES}/share/lensfun"
@@ -152,6 +175,9 @@ CheckLink "${EXECUTABLE}"
# dylib install names
ModifyInstallNames
+# dylib install names
+ModifyInstallNames
+
# Copy libjpeg-turbo ("62") into the app bundle
ditto ${LOCAL_PREFIX}/local/lib/libjpeg.62.dylib "${CONTENTS}/Frameworks/libjpeg.62.dylib"
@@ -193,11 +219,6 @@ ditto "${LIB}"/gtk-3.0/3*/immodules/*.{dylib,so} "${LIB}"
rm -r "${LIB}"/gtk-3.0
rm -r "${LIB}"/gdk-pixbuf-2.0
-msg "Build glib database:"
-mkdir -p ${RESOURCES}/share/glib-2.0
-ditto {"${LOCAL_PREFIX}/local","${RESOURCES}"}/share/glib-2.0/schemas
-"${LOCAL_PREFIX}/local/bin/glib-compile-schemas" "${RESOURCES}/share/glib-2.0/schemas"
-
# GTK+3 themes
msg "Copy GTK+3 theme and icon resources:"
ditto {"${LOCAL_PREFIX}/local","${RESOURCES}"}/share/themes/Mac/gtk-3.0/gtk-keys.css
diff --git a/tools/osx/rt-bin.entitlements b/tools/osx/rt-bin.entitlements
deleted file mode 100644
index 9e5e269cb..000000000
--- a/tools/osx/rt-bin.entitlements
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-com.apple.security.inherit
-
-
-
\ No newline at end of file
diff --git a/tools/osx/rt.entitlements b/tools/osx/rt.entitlements
index 082661401..61422fae7 100644
--- a/tools/osx/rt.entitlements
+++ b/tools/osx/rt.entitlements
@@ -1,20 +1,20 @@
-
- application-identifier
- com.rawtherapee.rawtherapee
- com.apple.security.temporary-exception.files.absolute-path.read-write
-
- "/"
-
- com.apple.security.cs.allow-dyld-environment-variables
-
- com.apple.security.files.user-selected.read-write
-
- com.apple.security.app-sandbox
-
- com.apple.security.files.downloads.read-write
-
-
-
+
+ application-identifier
+ com.rawtherapee.RawTherapee
+ com.apple.security.temporary-exception.files.absolute-path.read-write
+
+ /
+
+ com.apple.security.cs.allow-dyld-environment-variables
+
+ com.apple.security.files.user-selected.read-write
+
+ com.apple.security.app-sandbox
+
+ com.apple.security.files.downloads.read-write
+
+
+
\ No newline at end of file