Suggestion for resolving CMakeLists.txt , macosx_bundle.sh , executable_loader.in Please review + double-check on macOS
50 lines
1.4 KiB
Bash
50 lines
1.4 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
cd "$(dirname "$0")" || exit 1
|
|
|
|
cwd="$(pwd)"
|
|
app="${cwd%/Contents/*}"
|
|
lib="${app}/Contents/Frameworks"
|
|
resources="${app}/Contents/Resources"
|
|
etc="${resources}"/etc
|
|
|
|
### Pending deletion:
|
|
# See https://github.com/Beep6581/RawTherapee/issues/1779
|
|
# cups_dir=/tmp/RT5
|
|
# install -d "${cups_dir}"
|
|
# cp -f /usr/lib/libcups.2.dylib "${cups_dir}"
|
|
# export DYLD_LIBRARY_PATH="${lib}:${cups_dir}"
|
|
|
|
# export GTK_EXE_PREFIX="${resources}"
|
|
# export GTK_DATA_PREFIX="${resources}"
|
|
# export XDG_DATA_DIRS="${resources}/share"
|
|
# export GTK_IM_MODULE_FILE="${etc}/gtk-3.0/gtk.immodules"
|
|
|
|
export DYLD_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}/gdk-pixbuf-2.0/2.10.0/loaders"
|
|
|
|
export RT_SETTINGS="${HOME}/Library/Application Support/RawTherapee/config"
|
|
export RT_CACHE="${HOME}/Library/Application Support/RawTherapee/cache"
|
|
|
|
### Pending deletion:
|
|
# Environment variables for X11 backend
|
|
#if [[ -d ${etc}/fonts ]]; then
|
|
# export FONTCONFIG_PATH="${etc}/fonts"
|
|
#fi
|
|
|
|
# Strip out system argument
|
|
case "$1" in
|
|
-psn_*) shift ;;
|
|
esac
|
|
if [[ -d "/tmp/RawTherapee.app" ]]; then
|
|
rm -rf "/tmp/RawTherapee.app"
|
|
fi
|
|
ln -sf "${app}" /tmp
|
|
|
|
exec "${cwd}/rawtherapee-bin" "$@"
|