diff --git a/CMakeLists.txt b/CMakeLists.txt index a0aa42264..d0624fdff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,10 +63,11 @@ if (WIN32) endif (WIN32) if (APPLE) -# SET (CMAKE_OSX_ARCHITECTURES "i386;x86_64;" ) -# SET (CMAKE_TRY_COMPILE_OSX_ARCHITECTURES "i386;x86_64;" ) - SET (CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.5.sdk") - SET (CMAKE_OSX_DEPLOYMENT_TARGET "10.5") + if (CMAKE_CXX_COMPILER MATCHES "g\\+\\+-mp-4.[5-8]" OR + CMAKE_CXX_COMPILER_ARG1 MATCHES "g\\+\\+-mp-4.[5-8]") + set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-weak_library,/usr/lib/libstdc++.6.dylib") + message (STATUS "CMAKE_CXX_COMPILER is MacPorts GCC.\n CMAKE_EXE_LINKER_FLAGS: ${CMAKE_EXE_LINKER_FLAGS}") + endif () endif (APPLE) option(USE_EXPERIMENTAL_LANG_VERSIONS "Build RT with -std=c++0x" OFF) diff --git a/COMPILE.txt b/COMPILE.txt index 40f620e89..48c56c023 100644 --- a/COMPILE.txt +++ b/COMPILE.txt @@ -508,30 +508,22 @@ OS X - XCode Development Tools (you only need a subset of these, but it is probably easier to just install all of them) - MacPorts - - Set /opt/local/etc/macports/variants.conf to include "+no_x11 +quartz" - - If you want to build for multiple architectures, add +universal to - variants.conf. Note that this will increase the size of the final - application substantially. - - Set /opt/local/etc/macports/macports.conf key 'universal_archs' to the - architectures you wish to build for. Possible values include "i386 - x86_64 ppc ppc64" - - Edit the beginning of CMakeLists.txt to enable the same architectures - as you added to variants.conf - - To install all the tools and dependencies, run: - sudo port install cairomm cmake fftw-3 glibmm gtk2 gtkmm lcms \ - libiptcdata pango-devel + - To install the dependencies, run: + sudo port install cairo +quartz -x11 pango +quartz -x11 gdk-pixbuf2 -x11 gtk2 +quartz libsigcxx2 + - gtkmm port will fail to install. Use `-s’ option. + sudo port -s install gtkmm + - To install other dependencies and tools. + sudo port install gtk-engines2 lcms2 libiptcdata fftw-3-single cmake gcc47 - If you don't already have Mercurial installed, run: sudo port install mercurial - - If you want to try OpenMP builds, run: - sudo port install gcc45 COMPILE: - - Enter the root directory of the RawTherapee source tree - - To enable OpenMP, assuming you have installed gcc45), type: - cmake -D CMAKE_C_COMPILER=gcc-mp-4.5 -D CMAKE_CXX_COMPILER=g++-mp-4.5 \ + - Make build directory. + mkdir build + cd build + - To enable OpenMP, assuming you have installed gcc47), type: + cmake -D CMAKE_C_COMPILER=gcc-mp-4.7 -D CMAKE_CXX_COMPILER=g++-mp-4.7 \ - OR to disable OpenMP and use the default compiler, type: - cmake -D OPTION_OMP=false If you want to upload a build, you should set some additional information about your processor. There are two possibilities: @@ -549,7 +541,7 @@ OS X - Type: make install - Type: - ./tools/osx/make-app-bundle - - You will find a RawTherapee.dmg file in the release/ folder; this is the + make macosx_bundle + - You will find a disk image in the build directory; this is the distribution release and can be run on any machine which meets the architecture requirements you specified in variants.conf earlier. \ No newline at end of file diff --git a/rtdata/CMakeLists.txt b/rtdata/CMakeLists.txt index 26687e1c0..93aad1c70 100644 --- a/rtdata/CMakeLists.txt +++ b/rtdata/CMakeLists.txt @@ -39,3 +39,23 @@ install (DIRECTORY ${THEMEDIR} DESTINATION "${DATADIR}") install (DIRECTORY ${IMAGESDIR} DESTINATION "${DATADIR}" FILES_MATCHING PATTERN "index.theme") install (DIRECTORY ${IMAGESDIR} DESTINATION "${DATADIR}" FILES_MATCHING PATTERN "*.png") install (FILES ${OPTIONSFILE} DESTINATION "${DATADIR}" PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ RENAME options) + +if (APPLE) + # CMake escapes first item quote character. Do not remove 'DUMMY_VARIABLE='. + set (MACOSX_BUNDLE_COMMAND DUMMY_VARIABLE= + PROJECT_NAME="${PROJECT_NAME}" + PROJECT_SOURCE_DIR="${PROJECT_SOURCE_DIR}" + CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" + GTK_PREFIX="${GTK_PREFIX}") + if (PROC_BIT_DEPTH MATCHES 32) + list (APPEND MACOSX_BUNDLE_COMMAND PROC_BIT_DEPTH=32) + elseif (PROC_BIT_DEPTH MATCHES 64) + list (APPEND MACOSX_BUNDLE_COMMAND PROC_BIT_DEPTH=64) + endif (PROC_BIT_DEPTH MATCHES 32) + list (APPEND MACOSX_BUNDLE_COMMAND sh "${PROJECT_SOURCE_DIR}/rtdata/osx/macosx_bundle.sh") + + add_custom_target(macosx_bundle + COMMAND ${MACOSX_BUNDLE_COMMAND} + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" + COMMENT "Creating Mac OS X bundle") +endif (APPLE) \ No newline at end of file diff --git a/rtdata/osx/Info.plist.in b/rtdata/osx/Info.plist.in new file mode 100644 index 000000000..43c463206 --- /dev/null +++ b/rtdata/osx/Info.plist.in @@ -0,0 +1,138 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDisplayName + RawTherapee + CFBundleDocumentTypes + + + CFBundleTypeExtensions + + pp3 + PP3 + + CFBundleTypeIconFile + profile.icns + CFBundleTypeName + RawTherapee Profile Data + CFBundleTypeOSTypes + + PP3 + + CFBundleTypeRole + None + LSIsAppleDefaultForType + + LSItemContentTypes + + com.rawtherapee.pp3 + + + + CFBundleTypeExtensions + + CRW + crw + CR2 + cr2 + NEF + nef + RAF + raf + ORF + orf + MRW + mrw + SRF + srf + DCR + dcr + ARW + arw + PEF + pef + RAW + raw + MOS + mos + + CFBundleTypeMIMETypes + + image/raw + + CFBundleTypeName + Camera Raw + CFBundleTypeOSTypes + + CRW + CR2 + NEF + + CFBundleTypeRole + None + LSIsAppleDefaultForType + + NSDocumentClass + PVDocument + + + CFBundleExecutable + rawtherapee + CFBundleGetInfoString + @version@, Copyright © 2004-2013 Gábor Horváth + CFBundleIconFile + rawtherapee.icns + CFBundleIdentifier + com.rawtherapee.rawtherapee + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + RawTherapee + CFBundlePackageType + APPL + CFBundleShortVersionString + @shortVersion@ + CFBundleSignature + ???? + CFBundleVersion + @version@ + LSExecutableArchitectures + + @arch@ + + NSHighResolutionCapable + + NSHumanReadableCopyright + Copyright © 2004-2013 Gábor Horváth + UTExportedTypeDeclarations + + + UTTypeConformsTo + + public.data + + UTTypeDescription + RawTherapee Profile Data + UTTypeIconFile + Icons.icns + UTTypeIdentifier + com.rawtherapee.pp3 + UTTypeReferenceURL + http://www.rawtherapee.com/ + UTTypeTagSpecification + + com.apple.ostype + PP3 + public.filename-extension + + pp3 + PP3 + + + + + + diff --git a/rtdata/osx/PkgInfo b/rtdata/osx/PkgInfo new file mode 100644 index 000000000..6f749b0f3 --- /dev/null +++ b/rtdata/osx/PkgInfo @@ -0,0 +1 @@ +APPL???? diff --git a/rtdata/osx/executable_loader.in b/rtdata/osx/executable_loader.in new file mode 100644 index 000000000..a8aca25fd --- /dev/null +++ b/rtdata/osx/executable_loader.in @@ -0,0 +1,34 @@ +#!/bin/bash + +cwd="$(cd "$(dirname "$0")"; pwd)" +app="${cwd%/Contents/*}" +etc="${cwd}"/etc + +#export DYLD_LIBRARY_PATH="${cwd}"/lib +export GTK_PATH="${cwd}" +export GTK_EXE_PREFIX="${cwd}" +export GTK_DATA_PREFIX="${cwd}" +export GTK_DATA_DIRS="${cwd}" +export XDG_DATA_DIRS="${cwd}"/share +export GTK2_RC_FILES="${etc}"/gtk-2.0/gtkrc +export GTK_IM_MODULE_FILE="${etc}"/gtk-2.0/gtk.immodules +export GDK_PIXBUF_MODULE_FILE="${etc}"/gtk-2.0/gdk-pixbuf.loaders +export PANGO_RC_FILE="${etc}"/pango/pangorc + +# environment variables for X11 backend +if test -d "${etc}"/fonts; then + export FONTCONFIG_PATH="${etc}"/fonts + + _DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH" + DYLD_LIBRARY_PATH=/tmp/`uuidgen` + mkdir $DYLD_LIBRARY_PATH + cp /usr/lib/libcups.2.dylib $DYLD_LIBRARY_PATH + export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$_DYLD_LIBRARY_PATH" +fi + +# strip out system arguments +case "$1" in -psn_*) shift;; esac + +ln -sf "${app}" /tmp + +exec "${cwd}"/rawtherapee-bin "$@" \ No newline at end of file diff --git a/rtdata/osx/macosx_bundle.sh b/rtdata/osx/macosx_bundle.sh new file mode 100644 index 000000000..2dc927a2b --- /dev/null +++ b/rtdata/osx/macosx_bundle.sh @@ -0,0 +1,216 @@ +#!/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 + + +# -------------------------------------- +# Functions +# -------------------------------------- +function message { + printf '\e[34m-- %s\e[m\n' "$*" +} +function get_dependencies { + otool -L "$1" | awk 'NR >= 2 && $1 !~ /^(\/usr\/lib|\/System|@executable_path|@rpath)\// { print $1 }' +} +function checkLink { + get_dependencies "$1" | + while read x + do + if test ! -f "${LIB}/${x##*/}"; then + ditto --arch ${arch} "${x}" "$_" + checkLink "$_" + fi + 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 + +echo "PROJECT_NAME: ${PROJECT_NAME}" +echo "PROJECT_VERSION: ${PROJECT_VERSION}" +echo "PROJECT_SOURCE_DIR: ${PROJECT_SOURCE_DIR}" +echo "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}" +echo "PROC_BIT_DEPTH: ${PROC_BIT_DEPTH}" +echo "MINIMUM_SYSTEM_VERSION: ${MINIMUM_SYSTEM_VERSION}" +echo "GTK_PREFIX: ${GTK_PREFIX}" +echo "PWD: ${PWD}" + +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}" + +# set bundle attribute +setFile -a B "${APP}" + +message "Copying release files" +ditto --arch ${arch} "${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 {/opt/local,"${MACOS}"}/share/themes/Mac/gtk-2.0-key/gtkrc +ditto {/opt/local,"${MACOS}"}/share/themes/Clearlooks/gtk-2.0/gtkrc +install -d "${MACOS}"/share/themes/Raleigh/gtk-2.0 && ( + cd "$_" && + 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 +# -------------------------------------- +## install_name_tool +# this command replaces install names. you will not need to set 'DYLD_LIBRARY_PATH' +# '@rpath' is replaced '@loader_path' when execute. + +# @rpath +find -E "${MACOS}" -type f -regex '.*(rawtherapee|\.dylib|\.so)$' | while read x; do + message "Modifying install names: ${x}" + { + # id (dylib file only) + case "${x}" in (*.dylib) + printf ' install_name_tool -id "%s" "%s"\n' "@rpath/${x##*/}" "${x}";; + esac + + # dependencies + get_dependencies "${x}" | while read y; do + printf ' install_name_tool -change "%s" "%s" "%s"\n' "${y}" "@rpath/${y##*/}" "${x}" + done + } | bash -v +done + +# @loader_path +message "Registering @loader_path into the executable" +printf ' install_name_tool -add_rpath @loader_path/lib "%s"' "${EXECUTABLE}" | bash -v + + +# -------------------------------------- +# required files +# -------------------------------------- +message "Installing required application bundle files" +PROJECT_SOURCE_DATA_DIR="${PROJECT_SOURCE_DIR}"/rtdata/osx + +## executable and 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 +# icons +cp "${PROJECT_SOURCE_DATA_DIR}"/{rawtherapee,profile}.icns "${RESOURCES}" +# PkgInfo +cp "${PROJECT_SOURCE_DATA_DIR}"/PkgInfo "${CONTENTS}" +# Info.plist +install -m 0644 "${PROJECT_SOURCE_DATA_DIR}"/Info.plist.in "${CONTENTS}"/Info.plist +# configure property values +sed -i "" -e "s|@version@|${PROJECT_VERSION}|" \ + -e "s|@shortVersion@|`echo ${PROJECT_VERSION} | cut -d. -f-3`|" \ + -e "s|@arch@|${arch}|" \ + "${CONTENTS}"/Info.plist +# specify min version +#defaults write "${PWD}/${CONTENTS}"/Info LSMinimumSystemVersion "${MINIMUM_SYSTEM_VERSION}" +plutil -convert binary1 "${CONTENTS}"/Info.plist + + + +# -------------------------------------- +# disk image +# -------------------------------------- +## cache directory +DMG_SOURCE_DIR=/tmp/`uuidgen` + +## disk image name +# space and comma will be replaced. +# example: RawTherapee_OSX108_4.0.10.1_Release.dmg +DMG="${PROJECT_NAME// /_}_OSX${MINIMUM_SYSTEM_VERSION//.}_${PROJECT_VERSION}_${CMAKE_BUILD_TYPE}".dmg +# -------------------------------------- +message "Preparing disk image sources at ${DMG_SOURCE_DIR}" +install -d ${DMG_SOURCE_DIR} +mv "${APP}" ${DMG_SOURCE_DIR} +cp AboutThisBuild.txt ${DMG_SOURCE_DIR} +# symlink to /Applications dir +ln -s /Applications ${DMG_SOURCE_DIR} +# .webloc files +defaults write ${DMG_SOURCE_DIR}/"RawTherapee Blog" URL 'http://www.rawtherapee.com' +mv ${DMG_SOURCE_DIR}/"RawTherapee Blog".{plist,webloc} +defaults write ${DMG_SOURCE_DIR}/"Online Manual" URL 'https://docs.google.com/document/d/1DHLb_6xNQsEInxiuU8pz1-sWNinnj09bpBUA4_Vl8w8/edit' +mv ${DMG_SOURCE_DIR}/"Online Manual".{plist,webloc} + +message "Creating disk image" +## hdiutil +# -format: defaut is 'UDZO'(zip compress). 'UDBZ' is bzip2 compress. +# -volname: example, RawTherapee_4.0.10.1 +hdiutil create -format UDBZ \ + -srcdir ${DMG_SOURCE_DIR} \ + -volname "${PROJECT_NAME}_${PROJECT_VERSION}" \ + "${DMG}" + +message "Cleaning disk image caches" +rm -rf ${DMG_SOURCE_DIR} diff --git a/rtdata/osx/profile.icns b/rtdata/osx/profile.icns new file mode 100644 index 000000000..fbe7831ec Binary files /dev/null and b/rtdata/osx/profile.icns differ diff --git a/tools/osx/Icons.icns b/rtdata/osx/rawtherapee.icns similarity index 100% rename from tools/osx/Icons.icns rename to rtdata/osx/rawtherapee.icns diff --git a/tools/osx/Info.plist b/tools/osx/Info.plist deleted file mode 100644 index 4020ef513..000000000 --- a/tools/osx/Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - start - CFBundleIconFile - Icons.icns - CFBundleIdentifier - com.rawtherapee.rawtherapee - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - RawTherapee - CFBundlePackageType - APPL - CFBundleShortVersionString - 3.0a - CFBundleSignature - APPL - CFBundleVersion - 3.0 Alpha - NSAppleScriptEnabled - NO - - diff --git a/tools/osx/make-app-bundle b/tools/osx/make-app-bundle deleted file mode 100755 index e17d4361c..000000000 --- a/tools/osx/make-app-bundle +++ /dev/null @@ -1,103 +0,0 @@ -#!/bin/bash -# Function checkLink: -# args: $1 - file -# -# Will loop through all dynamic links for $file, and update each to be relative. -function checkLink { - #echo "checkLink called with $1 $2" - local FILE=$1 - - otool -L $FILE | grep -v "${APP}" | grep -v '/usr/lib' | grep -v '/System/' | grep -v "@executable_path" | cut -f 1 -d ' ' | while read X - do - local NAME=${LIB}/`basename "$X"` - if [ ! -f "${NAME}" ] - then - cp $X "${NAME}" - - #Recursively update the linkage of libraries - checkLink "${NAME}" - fi - done -} - -APP=RawTherapee.app -CONTENTS=${APP}/Contents -RESOURCES=${CONTENTS}/Resources -MACOS=${CONTENTS}/MacOS -BIN=${MACOS}/bin -ETC=${MACOS}/etc -LIB=${MACOS}/lib -SHARE=${MACOS}/share -RELEASE=Release -DMG=rawtherapee_mac32_`date +%F`_`hg -R . branch`_`hg parents --template '{latesttag}i.{latesttagdistance}-{node|short}'`.dmg -EXECUTABLE=rawtherapee - -#Find where MacPorts is installed. We take a known binary (cmake), which is in /bin, and -# go up a level to get the main install folder. -MACPORTS_PREFIX=`which cmake` -MACPORTS_PREFIX=`dirname $MACPORTS_PREFIX` -MACPORTS_PREFIX=`dirname $MACPORTS_PREFIX` - -if [ ! -d ${RELEASE} ]; then - echo "Please run this from the root of the project; i.e. './tools/osx/make-app-bundle'." - exit -fi - -if [ -d "${APP}" ]; then - echo "Removing old application..." - rm -rf "${APP}" -fi -echo "Removing any old disk images..." -rm ${RELEASE}/rawtherapee*.dmg -rm ${RELEASE}/rawtherapee*.dmg.zip - -echo "Making application directory structure..." -mkdir -p "${RESOURCES}" -mkdir -p "${ETC}" -mkdir -p "${LIB}" -mkdir -p "${SHARE}/mime" - -#Copy over non-explicitly linked libraries -echo "Copying libraries from ${MACPORTS_PREFIX}..." -cp -R ${MACPORTS_PREFIX}/lib/pango ${LIB} -cp -R ${MACPORTS_PREFIX}/lib/gtk-2.0 ${LIB} -cp -R ${MACPORTS_PREFIX}/lib/gdk-pixbuf* ${LIB} - -#Copy over mimes (if a mime is copied, and nobody hears, is it really copied?) -echo "Copying shared files from ${MACPORTS_PREFIX}..." -cp -R ${MACPORTS_PREFIX}/share/mime/* ${SHARE}/mime - -#Copy over etc files, and modify as needed -echo "Copying configuration files from ${MACPORTS_PREFIX} and modifying for standalone app bundle..." -cp -R $MACPORTS_PREFIX/etc/gtk-2.0 ${ETC} -cp -R $MACPORTS_PREFIX/etc/pango ${ETC} -ESCAPED_MACPORTS_PREFIX=`echo ${MACPORTS_PREFIX} | sed -e 's/\\//\\\\\\//g'` -sed -i .bak -e "s/${ESCAPED_MACPORTS_PREFIX}/@executable_path/g" ${ETC}/gtk-2.0/gdk-pixbuf.loaders ${ETC}/gtk-2.0/gtk.immodules ${ETC}/pango/pango.modules -echo -e "[Pango]\nModuleFiles = /tmp/${EXECUTABLE}_pango.modules" > ${ETC}/pango/pangorc -rm ${LIB}/gdk-pixbuf-2.0/2.10.0/loaders.cache - -#Copy over the release files -echo "Copying release files..." -cp -R ${RELEASE}/* ${MACOS} - -#Copy application-specific stuff like icons and startup script -echo "Creating required application bundle files..." -cp ./tools/osx/Info.plist ${CONTENTS} -cp tools/osx/Icons.icns ${RESOURCES} -cp tools/osx/start ${MACOS} - -#Copy and relink the explicitly defined libraries -echo "Recursively copying libraries referenced by executable..." -checkLink "${MACOS}/${EXECUTABLE}" - - -#Make a .dmg for distribution and delete the .app -echo "Creating distribution .dmg..." -hdiutil create -srcdir ${APP} ${RELEASE}/${DMG} -echo "Cleaning up..." -rm -rf ${APP} - -cd ${RELEASE} -zip ${DMG}.zip ${DMG} AboutThisBuild.txt - -echo "All done!" diff --git a/tools/osx/start b/tools/osx/start deleted file mode 100755 index b6f40ca65..000000000 --- a/tools/osx/start +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -CWD=`dirname "$0"` -echo $CWD - -export DYLD_LIBRARY_PATH="${CWD}/lib:$DYLD_LIBRARY_PATH" -export GTK_DATA_PREFIX="${CWD}" -export GTK_DATA_DIRS="${CWD}" -export GTK_EXE_PREFIX="${CWD}" -export GTK_PATH="${CWD}" - -export GTK2_RC_FILES="${CWD}/etc/gtk-2.0/gtkrc" -export GTK_IM_MODULE_FILE="${CWD}/gtk-2.0/gtk.immodules" -export GDK_PIXBUF_MODULE_FILE="${CWD}/etc/gtk-2.0/gdk-pixbuf.loaders" -export PANGO_RC_FILE="${CWD}/etc/pango/pangorc" - -cp "${CWD}/etc/pango/pango.modules" /tmp/rawtherapee_pango.modules - -"${CWD}/rawtherapee"