From 817ac17189959f19cf17052eacc52651d774b4a3 Mon Sep 17 00:00:00 2001 From: Beep6581 Date: Sat, 20 Feb 2016 18:30:59 +0100 Subject: [PATCH] Updated OS X scripts and moved OS X and Windows files from rtdata/ to tools/ --- tools/generateSourceTarball | 11 ++++++----- {rtdata => tools}/osx/Info.plist.in | 2 +- {rtdata => tools}/osx/PkgInfo | 0 {rtdata => tools}/osx/executable_loader.in | 3 ++- {rtdata => tools}/osx/macosx_bundle.sh | 15 +++++++++++---- {rtdata => tools}/osx/profile.icns | Bin {rtdata => tools}/osx/rawtherapee.icns | Bin .../win/InnoSetup/WindowsInnoSetup.iss.in | 0 .../win/InnoSetup/installerStrip.bmp | Bin .../win/InnoSetup/installerStrip.svg | 0 {rtdata => tools}/win/readme.txt | 0 11 files changed, 20 insertions(+), 11 deletions(-) rename {rtdata => tools}/osx/Info.plist.in (97%) rename {rtdata => tools}/osx/PkgInfo (100%) rename {rtdata => tools}/osx/executable_loader.in (89%) rename {rtdata => tools}/osx/macosx_bundle.sh (92%) rename {rtdata => tools}/osx/profile.icns (100%) rename {rtdata => tools}/osx/rawtherapee.icns (100%) rename {rtdata => tools}/win/InnoSetup/WindowsInnoSetup.iss.in (100%) rename {rtdata => tools}/win/InnoSetup/installerStrip.bmp (100%) rename {rtdata => tools}/win/InnoSetup/installerStrip.svg (100%) rename {rtdata => tools}/win/readme.txt (100%) diff --git a/tools/generateSourceTarball b/tools/generateSourceTarball index eb4688037..98173c00f 100755 --- a/tools/generateSourceTarball +++ b/tools/generateSourceTarball @@ -1,16 +1,17 @@ #!/usr/bin/env bash if [[ ! "$1" ]]; then - printf "%s\n" "Usage: $0 " "Example: $0 4.0.10" + printf "%s\n" "Usage: $0 " "Example: $0 4.2" exit fi -hg update "$1" +git checkout "$1" || exit 0 tools/generateReleaseInfo mkdir rawtherapee-"$1" mv ReleaseInfo.cmake rawtherapee-"$1" -hg archive -X ".hg*" -X "rtgui/config.h" -X "rtgui/version.h" -X "rtdata/rawtherapee.desktop" rawtherapee-"$1".tar -tar -rf rawtherapee-"$1".tar rawtherapee-"$1"/ReleaseInfo.cmake +#hg archive -X ".hg*" -X "rtgui/config.h" -X "rtgui/version.h" -X "rtdata/rawtherapee.desktop" rawtherapee-"$1".tar +git archive --format=tar "$1" > rawtherapee-"$1".tar +tar --append --file=rawtherapee-"$1".tar rawtherapee-"$1"/ReleaseInfo.cmake xz -z -9e rawtherapee-"$1".tar rm -r rawtherapee-"$1" -hg update +git checkout diff --git a/rtdata/osx/Info.plist.in b/tools/osx/Info.plist.in similarity index 97% rename from rtdata/osx/Info.plist.in rename to tools/osx/Info.plist.in index 491d2ee85..5b08d63a1 100644 --- a/rtdata/osx/Info.plist.in +++ b/tools/osx/Info.plist.in @@ -111,7 +111,7 @@ CFBundleExecutable rawtherapee CFBundleGetInfoString - @version@, Copyright © 2004-2013 Gábor Horváth + @version@, Copyright © 2004-2010 Gábor Horváth, 2010-2016 RT dev team CFBundleIconFile rawtherapee.icns CFBundleIdentifier diff --git a/rtdata/osx/PkgInfo b/tools/osx/PkgInfo similarity index 100% rename from rtdata/osx/PkgInfo rename to tools/osx/PkgInfo diff --git a/rtdata/osx/executable_loader.in b/tools/osx/executable_loader.in similarity index 89% rename from rtdata/osx/executable_loader.in rename to tools/osx/executable_loader.in index d56cd1dc1..5f1911edb 100644 --- a/rtdata/osx/executable_loader.in +++ b/tools/osx/executable_loader.in @@ -4,7 +4,8 @@ cwd="$(cd "$(dirname "$0")"; pwd)" app="${cwd%/Contents/*}" etc="${cwd}"/etc -# for different os x version (issue 1795) +# for different os x versions +# see https://github.com/Beep6581/RawTherapee/issues/1779 cups_dir=/tmp/RT4 install -d ${cups_dir} cp -f /usr/lib/libcups.2.dylib ${cups_dir} diff --git a/rtdata/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh similarity index 92% rename from rtdata/osx/macosx_bundle.sh rename to tools/osx/macosx_bundle.sh index 670343b08..05836905e 100644 --- a/rtdata/osx/macosx_bundle.sh +++ b/tools/osx/macosx_bundle.sh @@ -5,7 +5,7 @@ # these are very important variables. Must be set into rtdata/CMakeLists.txt! # - PROJECT_NAME # - PROJECT_SOURCE_DIR -# - PROJECT_VERSION (if without mercurial) +# - PROJECT_VERSION (if without git) # - CMAKE_BUILD_TYPE # - PROC_BIT_DEPTH # - GTK_PREFIX @@ -13,9 +13,11 @@ 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}")" @@ -30,8 +32,13 @@ if test ! -d "${CMAKE_BUILD_TYPE}"; then 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}") +if test -x $(which git) -a -d "${PROJECT_SOURCE_DIR}/.git"; then + # This is what the version ought to look like to be accurate in the git universe: + # PROJECT_VERSION="$(git describe --tags --always)_$(git symbolic-ref --short -q HEAD)" + # outputs: 4.2-677-g904467b_master + # but due to Apple requirements https://goo.gl/eWDQv6 we must use this: + PROJECT_VERSION="$(git describe --tags --always | sed -e 's/-g.*//' -e 's/-/./')" + # outputs: 4.2.677 fi # if not specify CMAKE_OSX_DEPLOYMENT_TARGET when compiling, @@ -157,7 +164,7 @@ 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|@shortVersion@|$(echo ${PROJECT_VERSION}| s|@arch@|${arch}|" \ "${CONTENTS}"/Info.plist plutil -convert binary1 "${CONTENTS}"/Info.plist diff --git a/rtdata/osx/profile.icns b/tools/osx/profile.icns similarity index 100% rename from rtdata/osx/profile.icns rename to tools/osx/profile.icns diff --git a/rtdata/osx/rawtherapee.icns b/tools/osx/rawtherapee.icns similarity index 100% rename from rtdata/osx/rawtherapee.icns rename to tools/osx/rawtherapee.icns diff --git a/rtdata/win/InnoSetup/WindowsInnoSetup.iss.in b/tools/win/InnoSetup/WindowsInnoSetup.iss.in similarity index 100% rename from rtdata/win/InnoSetup/WindowsInnoSetup.iss.in rename to tools/win/InnoSetup/WindowsInnoSetup.iss.in diff --git a/rtdata/win/InnoSetup/installerStrip.bmp b/tools/win/InnoSetup/installerStrip.bmp similarity index 100% rename from rtdata/win/InnoSetup/installerStrip.bmp rename to tools/win/InnoSetup/installerStrip.bmp diff --git a/rtdata/win/InnoSetup/installerStrip.svg b/tools/win/InnoSetup/installerStrip.svg similarity index 100% rename from rtdata/win/InnoSetup/installerStrip.svg rename to tools/win/InnoSetup/installerStrip.svg diff --git a/rtdata/win/readme.txt b/tools/win/readme.txt similarity index 100% rename from rtdata/win/readme.txt rename to tools/win/readme.txt