Issue 2311: improved "Decoding..." progress bar
This commit is contained in:
167
rtdata/osx/Info.plist.in
Normal file
167
rtdata/osx/Info.plist.in
Normal file
@@ -0,0 +1,167 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>RawTherapee</string>
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>pp3</string>
|
||||
<string>PP3</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>profile.icns</string>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>RawTherapee Profile Data</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
<key>LSIsAppleDefaultForType</key>
|
||||
<true/>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>com.rawtherapee.pp3</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>3FR</string>
|
||||
<string>3fr</string>
|
||||
<string>ARW</string>
|
||||
<string>arw</string>
|
||||
<string>CR2</string>
|
||||
<string>cr2</string>
|
||||
<string>CRF</string>
|
||||
<string>crf</string>
|
||||
<string>CRW</string>
|
||||
<string>crw</string>
|
||||
<string>DCR</string>
|
||||
<string>dcr</string>
|
||||
<string>DNG</string>
|
||||
<string>dng</string>
|
||||
<string>FFF</string>
|
||||
<string>fff</string>
|
||||
<string>IIQ</string>
|
||||
<string>iiq</string>
|
||||
<string>KDC</string>
|
||||
<string>kdc</string>
|
||||
<string>MEF</string>
|
||||
<string>mef</string>
|
||||
<string>MOS</string>
|
||||
<string>mos</string>
|
||||
<string>MRW</string>
|
||||
<string>mrw</string>
|
||||
<string>NEF</string>
|
||||
<string>nef</string>
|
||||
<string>NRW</string>
|
||||
<string>nrw</string>
|
||||
<string>ORF</string>
|
||||
<string>orf</string>
|
||||
<string>PEF</string>
|
||||
<string>pef</string>
|
||||
<string>RAF</string>
|
||||
<string>raf</string>
|
||||
<string>RAW</string>
|
||||
<string>raw</string>
|
||||
<string>RW2</string>
|
||||
<string>rw2</string>
|
||||
<string>RWZ</string>
|
||||
<string>rwz</string>
|
||||
<string>SR2</string>
|
||||
<string>sr2</string>
|
||||
<string>SRF</string>
|
||||
<string>srf</string>
|
||||
<string>SRW</string>
|
||||
<string>srw</string>
|
||||
</array>
|
||||
<key>CFBundleTypeMIMETypes</key>
|
||||
<array>
|
||||
<string>image/raw</string>
|
||||
</array>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Camera Raw</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>JPEG</string>
|
||||
<string>jpeg</string>
|
||||
<string>JPG</string>
|
||||
<string>jpg</string>
|
||||
<string>PNG</string>
|
||||
<string>png</string>
|
||||
<string>TIF</string>
|
||||
<string>tif</string>
|
||||
<string>TIFF</string>
|
||||
<string>tiff</string>
|
||||
</array>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Image</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>rawtherapee</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>@version@, Copyright © 2004-2013 Gábor Horváth</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>rawtherapee.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.rawtherapee.rawtherapee</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>RawTherapee</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@shortVersion@</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>@version@</string>
|
||||
<key>LSExecutableArchitectures</key>
|
||||
<array>
|
||||
<string>@arch@</string>
|
||||
</array>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<true/>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2004-2013 Gábor Horváth</string>
|
||||
<key>UTExportedTypeDeclarations</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>UTTypeConformsTo</key>
|
||||
<array>
|
||||
<string>public.data</string>
|
||||
</array>
|
||||
<key>UTTypeDescription</key>
|
||||
<string>RawTherapee Profile Data</string>
|
||||
<key>UTTypeIconFile</key>
|
||||
<string>Icons.icns</string>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>com.rawtherapee.pp3</string>
|
||||
<key>UTTypeReferenceURL</key>
|
||||
<string>http://www.rawtherapee.com/</string>
|
||||
<key>UTTypeTagSpecification</key>
|
||||
<dict>
|
||||
<key>com.apple.ostype</key>
|
||||
<string>PP3</string>
|
||||
<key>public.filename-extension</key>
|
||||
<array>
|
||||
<string>pp3</string>
|
||||
<string>PP3</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
1
rtdata/osx/PkgInfo
Normal file
1
rtdata/osx/PkgInfo
Normal file
@@ -0,0 +1 @@
|
||||
APPL????
|
30
rtdata/osx/executable_loader.in
Normal file
30
rtdata/osx/executable_loader.in
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
cwd="$(cd "$(dirname "$0")"; pwd)"
|
||||
app="${cwd%/Contents/*}"
|
||||
etc="${cwd}"/etc
|
||||
|
||||
# for different os x version (issue 1795)
|
||||
cups_dir=/tmp/RT4
|
||||
install -d ${cups_dir}
|
||||
cp -f /usr/lib/libcups.2.dylib ${cups_dir}
|
||||
|
||||
export DYLD_LIBRARY_PATH="${cwd}"/lib:${cups_dir}
|
||||
export GTK_EXE_PREFIX="${cwd}"
|
||||
export GTK_DATA_PREFIX="${cwd}"
|
||||
export GTK_IM_MODULE_FILE="${etc}"/gtk-2.0/gtk.immodules
|
||||
export GDK_PIXBUF_MODULE_FILE="${etc}"/gtk-2.0/gdk-pixbuf.loaders
|
||||
export XDG_DATA_DIRS="${cwd}"/share
|
||||
export PANGO_RC_FILE="${etc}"/pango/pangorc
|
||||
|
||||
# environment variables for X11 backend
|
||||
if test -d "${etc}"/fonts; then
|
||||
export FONTCONFIG_PATH="${etc}"/fonts
|
||||
fi
|
||||
|
||||
# strip out system argument
|
||||
case $1 in -psn_*) shift;; esac
|
||||
|
||||
ln -sf "${app}" /tmp
|
||||
|
||||
exec "${cwd}"/rawtherapee-bin "$@"
|
183
rtdata/osx/macosx_bundle.sh
Normal file
183
rtdata/osx/macosx_bundle.sh
Normal file
@@ -0,0 +1,183 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Required variables
|
||||
# ------------------
|
||||
# these are very important variables. Must be set into rtdata/CMakeLists.txt!
|
||||
# - PROJECT_NAME
|
||||
# - PROJECT_SOURCE_DIR
|
||||
# - PROJECT_VERSION (if without mercurial)
|
||||
# - CMAKE_BUILD_TYPE
|
||||
# - PROC_BIT_DEPTH
|
||||
# - GTK_PREFIX
|
||||
|
||||
function message {
|
||||
printf '\e[34m-- %s\e[m\n' "$*"
|
||||
}
|
||||
function GetDependencies {
|
||||
otool -L "$1" | awk 'NR >= 2 && $1 !~ /^(\/usr\/lib|\/System|@executable_path|@rpath)\// { print $1 }'
|
||||
}
|
||||
function CheckLink {
|
||||
GetDependencies "$1" | while read; do
|
||||
local dest="${LIB}/$(basename "${REPLY}")"
|
||||
test -f "${dest}" || { ditto --arch ${arch} "${REPLY}" "${dest}"; CheckLink "${dest}"; }
|
||||
done
|
||||
}
|
||||
|
||||
# source check
|
||||
if test ! -d "${CMAKE_BUILD_TYPE}"; then
|
||||
printf "\e[31m${PWD}/${CMAKE_BUILD_TYPE} directory is not found. Please execute 'make install' first.\e[m\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# update project version
|
||||
if test -x $(which hg) -a -d "${PROJECT_SOURCE_DIR}/.hg"; then
|
||||
PROJECT_VERSION=$(hg -R "${PROJECT_SOURCE_DIR}" parents --template "{latesttag}.{latesttagdistance}")
|
||||
fi
|
||||
|
||||
# if not specify CMAKE_OSX_DEPLOYMENT_TARGET when compiling,
|
||||
# 'MINIMUM_VERSION' will be used host OS X version.
|
||||
MINIMUM_SYSTEM_VERSION=$(otool -l "${CMAKE_BUILD_TYPE}"/rawtherapee | grep -A2 'LC_VERSION_MIN_MACOSX' | awk '$1 ~ /version/ { printf $2 }')
|
||||
if test ! -n "${MINIMUM_SYSTEM_VERSION}"; then
|
||||
MINIMUM_SYSTEM_VERSION=$(sw_vers -productVersion | cut -d. -f-2)
|
||||
fi
|
||||
|
||||
case ${PROC_BIT_DEPTH} in
|
||||
64) arch=x86_64;;
|
||||
32) arch=i386;;
|
||||
esac
|
||||
|
||||
cat <<__EOS__
|
||||
PROJECT_NAME: ${PROJECT_NAME}
|
||||
PROJECT_VERSION: ${PROJECT_VERSION}
|
||||
PROJECT_SOURCE_DIR: ${PROJECT_SOURCE_DIR}
|
||||
CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}
|
||||
PROC_BIT_DEPTH: ${PROC_BIT_DEPTH}
|
||||
MINIMUM_SYSTEM_VERSION: ${MINIMUM_SYSTEM_VERSION}
|
||||
GTK_PREFIX: ${GTK_PREFIX}
|
||||
PWD: ${PWD}
|
||||
__EOS__
|
||||
|
||||
APP="${PROJECT_NAME}".app
|
||||
CONTENTS="${APP}"/Contents
|
||||
RESOURCES="${CONTENTS}"/Resources
|
||||
MACOS="${CONTENTS}"/MacOS
|
||||
LIB="${MACOS}"/lib
|
||||
ETC="${MACOS}"/etc
|
||||
EXECUTABLE="${MACOS}"/rawtherapee
|
||||
|
||||
message "Removing old files"
|
||||
rm -rf "${APP}" ${PROJECT_NAME}_*.dmg
|
||||
|
||||
message "Creating bundle container"
|
||||
install -d "${RESOURCES}" \
|
||||
"${MACOS}" \
|
||||
"${LIB}" \
|
||||
"${ETC}"
|
||||
|
||||
message "Copying release files"
|
||||
ditto "${CMAKE_BUILD_TYPE}" "${MACOS}"
|
||||
|
||||
message "Copying dependencies from ${GTK_PREFIX}"
|
||||
CheckLink "${EXECUTABLE}"
|
||||
|
||||
message "Copying library modules from ${GTK_PREFIX}"
|
||||
ditto --arch ${arch} {"${GTK_PREFIX}"/lib,"${LIB}"}/gdk-pixbuf-2.0
|
||||
ditto --arch ${arch} {"${GTK_PREFIX}"/lib,"${LIB}"}/gtk-2.0
|
||||
ditto --arch ${arch} {"${GTK_PREFIX}"/lib,"${LIB}"}/pango
|
||||
|
||||
message "Removing static libraries and cache files"
|
||||
find -E "${LIB}" -type f -regex '.*\.(a|la|cache)$' | while read; do rm "${REPLY}"; done
|
||||
|
||||
message "Copying configuration files from ${GTK_PREFIX}"
|
||||
install -d "${ETC}"/{gtk-2.0,pango}
|
||||
cp "${GTK_PREFIX}"/etc/gtk-2.0/im-multipress.conf "${ETC}"/gtk-2.0
|
||||
"${GTK_PREFIX}"/bin/gdk-pixbuf-query-loaders "${LIB}"/gdk-pixbuf-2.0/*/loaders/*.so > "${ETC}"/gtk-2.0/gdk-pixbuf.loaders
|
||||
"${GTK_PREFIX}"/bin/gtk-query-immodules-2.0 "${LIB}"/gtk-2.0/*/immodules/*.so > "${ETC}"/gtk-2.0/gtk.immodules
|
||||
"${GTK_PREFIX}"/bin/pango-querymodules "${LIB}"/pango/*/modules/*.so > "${ETC}"/pango/pango.modules
|
||||
sed -i "" -e "s|${PWD}|/tmp|" "${ETC}"/gtk-2.0/gdk-pixbuf.loaders \
|
||||
"${ETC}"/gtk-2.0/gtk.immodules \
|
||||
"${ETC}"/pango/pango.modules
|
||||
printf "[Pango]\nModuleFiles = /tmp/${ETC}/pango/pango.modules" > "${ETC}"/pango/pangorc
|
||||
|
||||
|
||||
|
||||
message "Copying shared files from ${GTK_PREFIX}"
|
||||
cp -R "${GTK_PREFIX}"/share/mime "${MACOS}"/share
|
||||
# gtk themes
|
||||
ditto {"${GTK_PREFIX}","${MACOS}"}/share/themes/Mac/gtk-2.0-key/gtkrc
|
||||
ditto {"${GTK_PREFIX}","${MACOS}"}/share/themes/Clearlooks/gtk-2.0/gtkrc
|
||||
install -d "${MACOS}"/share/themes/Raleigh/gtk-2.0
|
||||
(cd "${MACOS}"/share/themes/Raleigh/gtk-2.0 && ln -s ../../Clearlooks/gtk-2.0/gtkrc)
|
||||
# fontconfig files (X11 backend only)
|
||||
if otool -L "${EXECUTABLE}" | grep -sq 'libgtk-x11-2.0'; then
|
||||
message "Installing fontconfig files (Your library is X11 backend. 'FONTCONFIG_PATH' will be set by executable loader.)"
|
||||
cp -RL "${GTK_PREFIX}"/etc/fonts "${ETC}"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# install names
|
||||
find -E "${MACOS}" -type f -regex '.*/(rawtherapee|.*\.(dylib|so))' | while read x; do
|
||||
message "Modifying install names: ${x}"
|
||||
{
|
||||
# id
|
||||
case ${x} in *.dylib) echo " install_name_tool -id '@rpath/$(basename "${x}")' '${x}'";; esac
|
||||
# names
|
||||
GetDependencies "${x}" | while read y; do
|
||||
echo " install_name_tool -change '${y}' '@rpath/$(basename "${y}")' '${x}'"
|
||||
done
|
||||
} | bash -v
|
||||
done
|
||||
|
||||
message "Registering @loader_path into the executable"
|
||||
echo " install_name_tool -add_rpath @loader_path/lib '${EXECUTABLE}'" | bash -v
|
||||
|
||||
|
||||
|
||||
message "Installing required application bundle files"
|
||||
PROJECT_SOURCE_DATA_DIR="${PROJECT_SOURCE_DIR}"/rtdata/osx
|
||||
# executable loader
|
||||
# note: executable is renamed to 'rawtherapee-bin'.
|
||||
mv "${MACOS}"/rawtherapee{,-bin}
|
||||
install -m 0755 "${PROJECT_SOURCE_DATA_DIR}"/executable_loader.in "${MACOS}"/rawtherapee
|
||||
# app bundle resources
|
||||
cp "${PROJECT_SOURCE_DATA_DIR}"/{rawtherapee,profile}.icns "${RESOURCES}"
|
||||
cp "${PROJECT_SOURCE_DATA_DIR}"/PkgInfo "${CONTENTS}"
|
||||
install -m 0644 "${PROJECT_SOURCE_DATA_DIR}"/Info.plist.in "${CONTENTS}"/Info.plist
|
||||
sed -i "" -e "s|@version@|${PROJECT_VERSION}|
|
||||
s|@shortVersion@|$(echo ${PROJECT_VERSION} | cut -d. -f-3)|
|
||||
s|@arch@|${arch}|" \
|
||||
"${CONTENTS}"/Info.plist
|
||||
plutil -convert binary1 "${CONTENTS}"/Info.plist
|
||||
|
||||
|
||||
|
||||
function CreateDmg {
|
||||
local srcdir=$(mktemp -dt $$)
|
||||
|
||||
message "Preparing disk image sources at ${srcdir}"
|
||||
mv "${APP}" ${srcdir}
|
||||
cp AboutThisBuild.txt ${srcdir}
|
||||
ln -s /Applications ${srcdir}
|
||||
|
||||
# web bookmarks
|
||||
function CreateWebloc {
|
||||
defaults write ${srcdir}/"$1" URL "$2"
|
||||
mv ${srcdir}/"$1".{plist,webloc}
|
||||
}
|
||||
CreateWebloc 'RawTherapee Blog' 'http://www.rawtherapee.com'
|
||||
CreateWebloc 'Online Manual' 'https://docs.google.com/document/d/1DHLb_6xNQsEInxiuU8pz1-sWNinnj09bpBUA4_Vl8w8/edit'
|
||||
|
||||
# disk image name
|
||||
dmg_name="${PROJECT_NAME// /_}_OSX_${MINIMUM_SYSTEM_VERSION}_${PROC_BIT_DEPTH}_${PROJECT_VERSION}"
|
||||
if ! echo ${CMAKE_BUILD_TYPE} | grep -sqi "release"; then
|
||||
dmg_name="${dmg_name}_$(echo ${CMAKE_BUILD_TYPE} | tr '[:upper:]' '[:lower:]')"
|
||||
fi
|
||||
|
||||
message "Creating disk image"
|
||||
hdiutil create -format UDBZ -srcdir ${srcdir} -volname "${PROJECT_NAME}_${PROJECT_VERSION}" "${dmg_name}".dmg
|
||||
|
||||
message "Removing disk image caches"
|
||||
rm -rf ${srcdir}
|
||||
}
|
||||
CreateDmg
|
BIN
rtdata/osx/profile.icns
Normal file
BIN
rtdata/osx/profile.icns
Normal file
Binary file not shown.
BIN
rtdata/osx/rawtherapee.icns
Normal file
BIN
rtdata/osx/rawtherapee.icns
Normal file
Binary file not shown.
Reference in New Issue
Block a user