From ba11a9355ac76342368ba122b252fe372b328128 Mon Sep 17 00:00:00 2001 From: Benitoite Date: Tue, 31 Jan 2023 23:42:36 -0800 Subject: [PATCH 01/18] mac: fixes lensfun logic Fixes use of the v1 lensfun interface for v0.3.3, v0.3.4-RC1, etc. --- tools/osx/macosx_bundle.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh index d0cbf4d6b..26b8b4d08 100644 --- a/tools/osx/macosx_bundle.sh +++ b/tools/osx/macosx_bundle.sh @@ -191,13 +191,15 @@ lensfunversion=$(pkg-config --modversion lensfun | cut -f3 -d'.') if [ $lensfunversion = 95 ] then ditto ${LOCAL_PREFIX}/share/lensfun/version_2/* "${RESOURCES}/share/lensfun" + # Copy liblensfun to Frameworks + ditto ${LOCAL_PREFIX}/lib/liblensfun.2.dylib "${CONTENTS}/Frameworks/liblensfun.2.dylib" + else ditto ${LOCAL_PREFIX}/share/lensfun/version_1/* "${RESOURCES}/share/lensfun" + # Copy liblensfun to Frameworks + ditto ${LOCAL_PREFIX}/lib/liblensfun.1.dylib "${CONTENTS}/Frameworks/liblensfun.1.dylib" fi -# Copy liblensfun to Frameworks -ditto ${LOCAL_PREFIX}/lib/liblensfun.2.dylib "${CONTENTS}/Frameworks/liblensfun.2.dylib" - # Copy libomp to Frameworks ditto ${LOCAL_PREFIX}/lib/libomp.dylib "${CONTENTS}/Frameworks" From fe69ebff6abbb7d5756f909b3d6abf246215cd4c Mon Sep 17 00:00:00 2001 From: Benitoite Date: Sun, 26 Feb 2023 23:13:24 -0800 Subject: [PATCH 02/18] macOS CI pass architecture to cmake for arch variable set by https://github.com/Beep6581/RawTherapee/blob/dev/tools/osx/macosx_bundle.sh#L102 --- .github/workflows/macos.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 11ae28aa4..576440714 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -48,6 +48,7 @@ jobs: -DCACHE_NAME_SUFFIX="${RAW_THERAPEE_MAJOR}.${RAW_THERAPEE_MINOR}-${REF}" \ -DPROC_TARGET_NUMBER="1" \ -DPROC_LABEL="generic processor" \ + -DCMAKE_OSX_ARCHITECTURES=$(uname -m) \ -DWITH_LTO="OFF" \ -DLENSFUNDBDIR="/Applications/RawTherapee.app/Contents/Resources/share/lensfun" \ -DCMAKE_C_COMPILER=clang \ From 0838d77fb94d4297e911ac975b6348115d93067d Mon Sep 17 00:00:00 2001 From: Benitoite Date: Sun, 26 Feb 2023 23:26:50 -0800 Subject: [PATCH 03/18] macOS CI: libomp ruby file is a formula Uses the --formula flag to tell brew the ruby file is a formula so it doesn't issue a red non-fatal error message. --- .github/workflows/macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 576440714..e466787db 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -64,7 +64,7 @@ jobs: -DCMAKE_RANLIB=/usr/bin/ranlib \ -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 \ .. - curl -L https://github.com/Homebrew/homebrew-core/raw/679923b4eb48a8dc7ecc1f05d06063cd79b3fc00/Formula/libomp.rb -o libomp.rb && brew install libomp.rb + curl -L https://github.com/Homebrew/homebrew-core/raw/679923b4eb48a8dc7ecc1f05d06063cd79b3fc00/Formula/libomp.rb -o libomp.rb && brew install --formula libomp.rb zsh -c 'echo "Configured in $(printf "%0.2f" $(($[$(date +%s)-$(cat configstamp)]/$((60.))))) minutes"' - name: Compile RawTherapee run: | From 69397aea097e8cd5f9c65add70925483d12be1ee Mon Sep 17 00:00:00 2001 From: Benitoite Date: Sun, 26 Feb 2023 23:32:20 -0800 Subject: [PATCH 04/18] macOS CI: update two actions to @v3 updates actions for node12->16 requirements. --- .github/workflows/macos.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index e466787db..4a258354a 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -14,7 +14,7 @@ jobs: build: runs-on: macos-11 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install dependencies run: | date -u @@ -92,7 +92,7 @@ jobs: "ARTIFACT_FILE: ${ARTIFACT_FILE}" \ "PUBLISH_NAME: ${PUBLISH_NAME}" exit - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: ${{env.ARTIFACT_FILE}} path: ${{env.ARTIFACT_PATH}} From c55bc5103fc50bc2499ebc2a7933bbd8eb4b1495 Mon Sep 17 00:00:00 2001 From: Benitoite Date: Mon, 27 Feb 2023 12:49:26 -0800 Subject: [PATCH 05/18] macOS: mute tput warnings tput warns you when running with no attached terminal; eg. GitHub CI. Redirects warnings to /dev/null --- tools/osx/macosx_bundle.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh index 26b8b4d08..9de3a7a5f 100644 --- a/tools/osx/macosx_bundle.sh +++ b/tools/osx/macosx_bundle.sh @@ -9,11 +9,11 @@ # - GTK_PREFIX # Formatting -fNormal="$(tput sgr0)" -fBold="$(tput bold)" +fNormal="$(tput sgr0)" >/dev/null 2>&1 +fBold="$(tput bold)" >/dev/null 2>&1 # Colors depend upon the user's terminal emulator color scheme - what is readable for you may be not readable for someone else. -fMagenta="$(tput setaf 5)" -fRed="$(tput setaf 1)" +fMagenta="$(tput setaf 5)" >/dev/null 2>&1 +fRed="$(tput setaf 1)" >/dev/null 2>&1 function msg { printf "\\n${fBold}-- %s${fNormal}\\n" "${@}" From 4d794d6bbb0c4cd258187a14971021c78f75a596 Mon Sep 17 00:00:00 2001 From: Benitoite Date: Mon, 27 Feb 2023 17:50:10 -0800 Subject: [PATCH 06/18] macOS: set the 'latest' artifact Uses a generically-named nightly instead of name-tagged with commit hash. --- .github/workflows/macos.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 4a258354a..7d3e0cbfd 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -62,7 +62,8 @@ jobs: -DOpenMP_libomp_LIBRARY=/usr/local/lib/libomp.dylib \ -DCMAKE_AR=/usr/bin/ar \ -DCMAKE_RANLIB=/usr/bin/ranlib \ - -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \ + -DOSX_NIGHTLY=ON \ .. curl -L https://github.com/Homebrew/homebrew-core/raw/679923b4eb48a8dc7ecc1f05d06063cd79b3fc00/Formula/libomp.rb -o libomp.rb && brew install --formula libomp.rb zsh -c 'echo "Configured in $(printf "%0.2f" $(($[$(date +%s)-$(cat configstamp)]/$((60.))))) minutes"' @@ -78,7 +79,7 @@ jobs: zsh date +%s > build/bundlestamp && date -u && cd build export REF=${GITHUB_REF##*/} && export LOCAL_PREFIX=/usr && sudo make macosx_bundle - export ARTIFACT=(RawTherapee*.zip) + export ARTIFACT=(RawTherapee*latest.zip) echo "=== artifact: ${ARTIFACT}" # defining environment variables for next step as per # https://github.com/actions/starter-workflows/issues/68 From d89ed3b5957140f797cb2700b9bc6810aa4dd2e2 Mon Sep 17 00:00:00 2001 From: Benitoite Date: Mon, 27 Feb 2023 19:46:25 -0800 Subject: [PATCH 07/18] mac: remove obsolete patch --- tools/osx/libiconv_1.16_rt.patch | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 tools/osx/libiconv_1.16_rt.patch diff --git a/tools/osx/libiconv_1.16_rt.patch b/tools/osx/libiconv_1.16_rt.patch deleted file mode 100644 index 470f7780c..000000000 --- a/tools/osx/libiconv_1.16_rt.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/lib/iconv.c b/lib/iconv.c -index b7a04f8..41c5896 100644 ---- a/lib/iconv.c -+++ b/lib/iconv.c -@@ -610,5 +610,26 @@ strong_alias (libiconv_open, iconv_open) - strong_alias (libiconv, iconv) - strong_alias (libiconv_close, iconv_close) - #endif -+ -+#undef iconv_open -+#undef iconv -+#undef iconv_close -+ -+LIBICONV_DLL_EXPORTED iconv_t iconv_open (const char* tocode, const char* fromcode) -+{ -+ return libiconv_open(tocode, fromcode); -+} -+ -+LIBICONV_DLL_EXPORTED size_t iconv (iconv_t icd, -+ ICONV_CONST char * * inbuf, size_t *inbytesleft, -+ char * * outbuf, size_t *outbytesleft) -+{ -+ return libiconv(icd, inbuf, inbytesleft, outbuf, outbytesleft); -+} -+ -+LIBICONV_DLL_EXPORTED int iconv_close (iconv_t icd) -+{ -+ return libiconv_close(icd); -+} - - #endif From 0d6733973865983d5c4c30333291dd820324e683 Mon Sep 17 00:00:00 2001 From: Benitoite Date: Mon, 27 Feb 2023 20:59:45 -0800 Subject: [PATCH 08/18] macOS: altool --notarize -> notarytool Updates notary script to use `xcrun notarytool` per Apple deprecation notices. --- tools/osx/macosx_bundle.sh | 45 ++------------------------------------ 1 file changed, 2 insertions(+), 43 deletions(-) diff --git a/tools/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh index 9de3a7a5f..87b318bf0 100644 --- a/tools/osx/macosx_bundle.sh +++ b/tools/osx/macosx_bundle.sh @@ -370,27 +370,7 @@ if [[ -n $NOTARY ]]; then msg "Notarizing the application:" ditto -c -k --sequesterRsrc --keepParent "${APP}" "${APP}.zip" echo "Uploading..." - uuid=`xcrun altool --notarize-app --primary-bundle-id "com.rawtherapee.RawTherapee" ${NOTARY} --file "${APP}.zip" 2>&1 | grep 'RequestUUID' | awk '{ print $3 }'` - echo "Result= $uuid" # Display identifier string - sleep 15 - while : - do - fullstatus=`xcrun altool --notarization-info "$uuid" ${NOTARY} 2>&1` # get the status - status1=`echo "$fullstatus" | grep 'Status\:' | awk '{ print $2 }'` - if [[ $status1 = "success" ]]; then - xcrun stapler staple *app # staple the ticket - xcrun stapler validate -v *app - echo "Notarization success" - break - elif [[ $status1 = "in" ]]; then - echo "Notarization still in progress, sleeping for 15 seconds and trying again" - sleep 15 - else - echo "Notarization failed fullstatus below" - echo "$fullstatus" - exit 1 - fi - done + sudo xcrun notarytool submit "${APP}.zip" ${NOTARY} --wait fi function CreateDmg { @@ -452,28 +432,7 @@ function CreateDmg { msg "Notarizing the dmg:" zip "${dmg_name}.dmg.zip" "${dmg_name}.dmg" echo "Uploading..." - uuid=$(xcrun altool --notarize-app --primary-bundle-id "com.rawtherapee" ${NOTARY} --file "${dmg_name}.dmg.zip" 2>&1 | grep 'RequestUUID' | awk '{ print $3 }') - echo "dmg Result= ${uuid}" # Display identifier string - sleep 15 - while : - do - fullstatus=`xcrun altool --notarization-info "$uuid" ${NOTARY} 2>&1` # get the status - status1=`echo "$fullstatus" | grep 'Status\:' | awk '{ print $2 }'` - if [[ $status1 = "success" ]]; then - xcrun stapler staple "${dmg_name}.dmg" # staple the ticket - xcrun stapler validate -v "${dmg_name}.dmg" - echo "dmg Notarization success" - rm *dmg.zip - break - elif [[ $status1 = "in" ]]; then - echo "dmg Notarization still in progress, sleeping for 15 seconds and trying again" - sleep 15 - else - echo "dmg Notarization failed fullstatus below" - echo "$fullstatus" - exit 1 - fi - done + sudo xcrun notarytool submit "${dmg_name}.dmg.zip" ${NOTARY} --wait fi # Zip disk image for redistribution From 74d6762f790e2a5d46d7788e05d4f267ffced820 Mon Sep 17 00:00:00 2001 From: Benitoite Date: Mon, 27 Feb 2023 21:04:46 -0800 Subject: [PATCH 09/18] macOS: show new notarytool format of notary string --- tools/osx/macosx_bundle.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh index 87b318bf0..1bfe6986d 100644 --- a/tools/osx/macosx_bundle.sh +++ b/tools/osx/macosx_bundle.sh @@ -135,8 +135,8 @@ EXPATLIB="$(cmake .. -LA -N | grep pkgcfg_lib_EXPAT_expat)"; pkgcfg_lib_EXPAT_ex #Out: Developer ID Application: Doctor Who (1234567890) CODESIGNID="$(cmake .. -L -N | grep CODESIGNID)"; CODESIGNID="${CODESIGNID#*=}" -#In: NOTARY:STRING=--username drwho@bbc.com --password abcd-efgh-hijk-lmno -#Out: --username drwho@bbc.com --password abcd-efgh-hijk-lmno +#In: NOTARY:STRING="--apple-id drwho@bbc.com --password abcd-efgh-hijk-lmno --team-id ABCDE12345" +#Out: --apple-id drwho@bbc.com --password abcd-efgh-hijk-lmno --team-id ABCDE12345 NOTARY="$(cmake .. -L -N | grep NOTARY)"; NOTARY="${NOTARY#*=}" # In: FANCY_DMG:BOOL=ON From 3fe30277bf2022f785453d0a5593d5adfee131d6 Mon Sep 17 00:00:00 2001 From: Benitoite Date: Mon, 27 Feb 2023 21:14:10 -0800 Subject: [PATCH 10/18] macOS: fixes a few packaging warnings and tries not forcing a non-system z or expat into Frameworks. --- tools/osx/macosx_bundle.sh | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/tools/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh index 1bfe6986d..a43a1814c 100644 --- a/tools/osx/macosx_bundle.sh +++ b/tools/osx/macosx_bundle.sh @@ -201,7 +201,7 @@ else fi # Copy libomp to Frameworks -ditto ${LOCAL_PREFIX}/lib/libomp.dylib "${CONTENTS}/Frameworks" +cp ${LOCAL_PREFIX}/lib/libomp.dylib "${CONTENTS}/Frameworks" msg "Copying dependencies from ${GTK_PREFIX}." CheckLink "${EXECUTABLE}" 2>&1 @@ -209,24 +209,20 @@ CheckLink "${EXECUTABLE}" 2>&1 # dylib install names ModifyInstallNames 2>&1 -# Copy libjpeg-turbo ("62") into the app bundle -ditto ${LOCAL_PREFIX}/lib/libjpeg.62.dylib "${CONTENTS}/Frameworks/libjpeg.62.dylib" +## Copy libexpat into the app bundle (which is keg-only) +## if [[ -d /usr/local/Cellar/expat ]]; then ditto /usr/local/Cellar/expat/*/lib/libexpat.1.dylib "${CONTENTS}/Frameworks"; else cp "${EXPATLIB}" "${CONTENTS}/Frameworks/libexpat.1.dylib"; fi -# Copy libexpat into the app bundle (which is keg-only) -if [[ -d /usr/local/Cellar/expat ]]; then ditto /usr/local/Cellar/expat/*/lib/libexpat.1.dylib "${CONTENTS}/Frameworks"; else ditto "${EXPATLIB}" "${CONTENTS}/Frameworks/libexpat.1.dylib"; fi +## Copy libz into the app bundle +## cp ${LOCAL_PREFIX}/lib/libz.1.dylib "${CONTENTS}/Frameworks" -# Copy libz into the app bundle -ditto ${LOCAL_PREFIX}/lib/libz.1.dylib "${CONTENTS}/Frameworks" - -# Copy libpng12 & 16 to the app bundle -ditto ${LOCAL_PREFIX}/lib/libpng16.16.dylib "${CONTENTS}/Frameworks/libpng16.16.dylib" -ditto ${LOCAL_PREFIX}/lib/libpng12.0.dylib "${CONTENTS}/Frameworks/libpng12.0.dylib" +# Copy libpng16 to the app bundle +cp ${LOCAL_PREFIX}/lib/libpng16.16.dylib "${CONTENTS}/Frameworks/libpng16.16.dylib" # Copy libtiff 5 into the app bundle -ditto ${LOCAL_PREFIX}/lib/libtiff.5.dylib "${CONTENTS}/Frameworks/libtiff.5.dylib" +cp ${LOCAL_PREFIX}/lib/libtiff.5.dylib "${CONTENTS}/Frameworks/libtiff.5.dylib" # Copy libomp to Frameworks -ditto ${LOCAL_PREFIX}/lib/libomp.dylib "${CONTENTS}/Frameworks" +cp ${LOCAL_PREFIX}/lib/libomp.dylib "${CONTENTS}/Frameworks" # Prepare GTK+3 installation msg "Copying configuration files from ${GTK_PREFIX}:" @@ -240,7 +236,7 @@ find -E "${LIB}" -type f -regex '.*\.(a|la|cache)$' | while read -r; do rm "${RE # Make Frameworks folder flat msg "Flattening the Frameworks folder" cp -RL "${LIB}"/gdk-pixbuf-2.0/2*/loaders/* "${LIB}" -cp "${LIB}"/gtk-3.0/3*/immodules/*.{dylib,so} "${LIB}" +cp "${LIB}"/gtk-3.0/3*/immodules/*.{dylib,so} "${LIB}" >/dev/null 2>&1 rm -r "${LIB}"/gtk-3.0 rm -r "${LIB}"/gdk-pixbuf-2.0 From 38ab9af4fc72239ef4132e4f7ca18b67f3e30bd2 Mon Sep 17 00:00:00 2001 From: Benitoite Date: Wed, 8 Mar 2023 01:05:38 -0800 Subject: [PATCH 11/18] Mac: option for CI artifact naming --- CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 30e646fd8..92888424c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,6 +87,9 @@ option(OSX_DEV_BUILD "Generate macOS development builds" OFF) # On macOS, optionally generate the final zip artifact file without version in the name for nightly upload purposes. option(OSX_NIGHTLY "Generate a generically-named zip" OFF) +# On macOS, optionally generate RawTherapee__macOS_.zip for the CI +option(OSX_CONTINUOUS "Generate a generically-named zip for CI" OFF) + # Generate a universal macOS build option(OSX_UNIVERSAL "Generate a universal app" OFF) @@ -94,14 +97,13 @@ option(OSX_UNIVERSAL "Generate a universal app" OFF) if(OSX_UNIVERSAL) if(NOT "${OSX_UNIVERSAL_URL}") if(CMAKE_OSX_ARCHITECTURES STREQUAL "arm64") - set(OSX_UNIVERSAL_URL "https://kd6kxr.keybase.pub/RawTherapee_macOS_x86_64_latest.zip" CACHE STRING "URL of x86_64 app for lipo") + set(OSX_UNIVERSAL_URL "file:///rawtherapee/latest/RawTherapee_macOS_x86_64_latest.zip" CACHE STRING "URL of x86_64 app for lipo") else() - set(OSX_UNIVERSAL_URL "https://kd6kxr.keybase.pub/RawTherapee_macOS_arm64_latest.zip" CACHE STRING "URL of arm64 app for lipo") + set(OSX_UNIVERSAL_URL "file:///rawtherapee/latest/RawTherapee_macOS_arm64_latest.zip" CACHE STRING "URL of arm64 app for lipo") endif() endif() endif() - # By default we don't use a specific processor target, so PROC_TARGET_NUMBER is # set to 0. Specify other values to optimize for specific processor architecture # as listed in ProcessorTargets.cmake: From a79888c1af937e3f1f5d465ed8ffe637a8f0d992 Mon Sep 17 00:00:00 2001 From: Benitoite Date: Wed, 8 Mar 2023 01:08:26 -0800 Subject: [PATCH 12/18] Mac: CI artifact naming --- tools/osx/macosx_bundle.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/tools/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh index a43a1814c..f06ce8aa9 100644 --- a/tools/osx/macosx_bundle.sh +++ b/tools/osx/macosx_bundle.sh @@ -120,8 +120,8 @@ minimum_macos_version=${MINIMUM_SYSTEM_VERSION} #Out: /opt LOCAL_PREFIX="$(cmake .. -L -N | grep LOCAL_PREFIX)"; LOCAL_PREFIX="${LOCAL_PREFIX#*=}" -#In: OSX_UNIVERSAL_URL=https:// etc. -#Out: https:// etc. +#In: OSX_UNIVERSAL_URL=file:/// etc. +#Out: file:/// etc. UNIVERSAL_URL="$(cmake .. -L -N | grep OSX_UNIVERSAL_URL)"; UNIVERSAL_URL="${UNIVERSAL_URL#*=}" if [[ -n $UNIVERSAL_URL ]]; then echo "Universal app is ON. The URL is ${UNIVERSAL_URL}" @@ -153,6 +153,13 @@ if [[ -n $NIGHTLY ]]; then echo "Nightly/generically-named zip is ON." fi +# In: OSX_CONTINUOUS:BOOL=ON +# Out: ON +OSX_CONTINUOUS="$(cmake .. -L -N | grep OSX_CONTINUOUS)"; NIGHTLY="${OSX_CONTINUOUS#*=}" && CONTINUOUS="${OSX_CONTINUOUS#*=}" +if [[ -n $CONTINUOUS ]]; then + echo "Continuous/generically-named zip is ON." +fi + APP="${PROJECT_NAME}.app" CONTENTS="${APP}/Contents" RESOURCES="${CONTENTS}/Resources" @@ -434,12 +441,16 @@ function CreateDmg { # Zip disk image for redistribution msg "Zipping disk image for redistribution:" mkdir "${PROJECT_NAME}_macOS_${MINIMUM_SYSTEM_VERSION}_${arch}_${PROJECT_FULL_VERSION}_folder" - ditto {"${PROJECT_NAME}_macOS_${MINIMUM_SYSTEM_VERSION}_${arch}_${PROJECT_FULL_VERSION}.dmg","rawtherapee-cli","${PROJECT_SOURCE_DATA_DIR}/INSTALL.txt"} "${PROJECT_NAME}_macOS_${MINIMUM_SYSTEM_VERSION}_${arch}_${PROJECT_FULL_VERSION}_folder" + cp {"${PROJECT_NAME}_macOS_${MINIMUM_SYSTEM_VERSION}_${arch}_${PROJECT_FULL_VERSION}.dmg","${PROJECT_NAME}.app/Contents/Frameworks/rawtherapee-cli","${PROJECT_SOURCE_DATA_DIR}/INSTALL.readme.rtf"} "${PROJECT_NAME}_macOS_${MINIMUM_SYSTEM_VERSION}_${arch}_${PROJECT_FULL_VERSION}_folder" zip -r "${PROJECT_NAME}_macOS_${MINIMUM_SYSTEM_VERSION}_${arch}_${PROJECT_FULL_VERSION}.zip" "${PROJECT_NAME}_macOS_${MINIMUM_SYSTEM_VERSION}_${arch}_${PROJECT_FULL_VERSION}_folder/" if [[ -n $NIGHTLY ]]; then cp "${PROJECT_NAME}_macOS_${MINIMUM_SYSTEM_VERSION}_${arch}_${PROJECT_FULL_VERSION}.zip" "${PROJECT_NAME}_macOS_${arch}_latest.zip" fi + if [[ -n $CONTINUOUS ]]; then + mv "${PROJECT_NAME}_macOS_${arch}_latest.zip" "${PROJECT_NAME}_$(git status|head -1|awk -v N=$3 '{print $3}')_macOS_${arch}_${CMAKE_BUILD_TYPE}.zip" + fi } + CreateDmg msg "Finishing build:" echo "Script complete." From 53b4edd01d6f35c7d500fadfa7bb28bf66369393 Mon Sep 17 00:00:00 2001 From: Benitoite Date: Wed, 8 Mar 2023 01:11:22 -0800 Subject: [PATCH 13/18] Mac: removes arch from CI name --- tools/osx/macosx_bundle.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh index f06ce8aa9..8125f45ee 100644 --- a/tools/osx/macosx_bundle.sh +++ b/tools/osx/macosx_bundle.sh @@ -447,7 +447,7 @@ function CreateDmg { cp "${PROJECT_NAME}_macOS_${MINIMUM_SYSTEM_VERSION}_${arch}_${PROJECT_FULL_VERSION}.zip" "${PROJECT_NAME}_macOS_${arch}_latest.zip" fi if [[ -n $CONTINUOUS ]]; then - mv "${PROJECT_NAME}_macOS_${arch}_latest.zip" "${PROJECT_NAME}_$(git status|head -1|awk -v N=$3 '{print $3}')_macOS_${arch}_${CMAKE_BUILD_TYPE}.zip" + mv "${PROJECT_NAME}_macOS_${arch}_latest.zip" "${PROJECT_NAME}_$(git status|head -1|awk -v N=$3 '{print $3}')_macOS_${CMAKE_BUILD_TYPE}.zip" fi } From 60ac617bcf65b20a011cdae593ebf8d409060eff Mon Sep 17 00:00:00 2001 From: Benitoite Date: Wed, 8 Mar 2023 01:42:51 -0800 Subject: [PATCH 14/18] Mac: set the CI artifact name --- .github/workflows/macos.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 7d3e0cbfd..3348d48b9 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -63,7 +63,7 @@ jobs: -DCMAKE_AR=/usr/bin/ar \ -DCMAKE_RANLIB=/usr/bin/ranlib \ -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \ - -DOSX_NIGHTLY=ON \ + -DOSX_CONTINUOUS=ON \ .. curl -L https://github.com/Homebrew/homebrew-core/raw/679923b4eb48a8dc7ecc1f05d06063cd79b3fc00/Formula/libomp.rb -o libomp.rb && brew install --formula libomp.rb zsh -c 'echo "Configured in $(printf "%0.2f" $(($[$(date +%s)-$(cat configstamp)]/$((60.))))) minutes"' @@ -79,7 +79,7 @@ jobs: zsh date +%s > build/bundlestamp && date -u && cd build export REF=${GITHUB_REF##*/} && export LOCAL_PREFIX=/usr && sudo make macosx_bundle - export ARTIFACT=(RawTherapee*latest.zip) + export ARTIFACT=(RawTherapee*${CMAKE_BUILD_TYPE}.zip) echo "=== artifact: ${ARTIFACT}" # defining environment variables for next step as per # https://github.com/actions/starter-workflows/issues/68 From 3e11f0bcf874071a65eba0cac28161afe6b90d23 Mon Sep 17 00:00:00 2001 From: Benitoite Date: Wed, 8 Mar 2023 10:02:52 -0800 Subject: [PATCH 15/18] Mac: use the symbolic ref for branch --- tools/osx/macosx_bundle.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh index 8125f45ee..51c055ee8 100644 --- a/tools/osx/macosx_bundle.sh +++ b/tools/osx/macosx_bundle.sh @@ -447,7 +447,7 @@ function CreateDmg { cp "${PROJECT_NAME}_macOS_${MINIMUM_SYSTEM_VERSION}_${arch}_${PROJECT_FULL_VERSION}.zip" "${PROJECT_NAME}_macOS_${arch}_latest.zip" fi if [[ -n $CONTINUOUS ]]; then - mv "${PROJECT_NAME}_macOS_${arch}_latest.zip" "${PROJECT_NAME}_$(git status|head -1|awk -v N=$3 '{print $3}')_macOS_${CMAKE_BUILD_TYPE}.zip" + mv "${PROJECT_NAME}_macOS_${arch}_latest.zip" "${PROJECT_NAME}_$(git symbolic-ref --short -q HEAD)_macOS_${CMAKE_BUILD_TYPE}.zip" fi } From ec19698dc4347318c54fd7e0f6c7d352c3a8629d Mon Sep 17 00:00:00 2001 From: Benitoite Date: Wed, 8 Mar 2023 11:42:47 -0800 Subject: [PATCH 16/18] Mac: use git branch --show-current --- tools/osx/macosx_bundle.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh index 51c055ee8..ace34d70f 100644 --- a/tools/osx/macosx_bundle.sh +++ b/tools/osx/macosx_bundle.sh @@ -447,7 +447,7 @@ function CreateDmg { cp "${PROJECT_NAME}_macOS_${MINIMUM_SYSTEM_VERSION}_${arch}_${PROJECT_FULL_VERSION}.zip" "${PROJECT_NAME}_macOS_${arch}_latest.zip" fi if [[ -n $CONTINUOUS ]]; then - mv "${PROJECT_NAME}_macOS_${arch}_latest.zip" "${PROJECT_NAME}_$(git symbolic-ref --short -q HEAD)_macOS_${CMAKE_BUILD_TYPE}.zip" + mv "${PROJECT_NAME}_macOS_${arch}_latest.zip" "${PROJECT_NAME}_$(git branch --show-current)_macOS_${CMAKE_BUILD_TYPE}.zip" fi } From f92dca3e590b65c4feee50b3aa0755811aa1d29f Mon Sep 17 00:00:00 2001 From: Benitoite Date: Wed, 8 Mar 2023 15:07:57 -0800 Subject: [PATCH 17/18] Mac: handle detached HEAD --- tools/osx/macosx_bundle.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh index ace34d70f..6b91654a3 100644 --- a/tools/osx/macosx_bundle.sh +++ b/tools/osx/macosx_bundle.sh @@ -447,7 +447,11 @@ function CreateDmg { cp "${PROJECT_NAME}_macOS_${MINIMUM_SYSTEM_VERSION}_${arch}_${PROJECT_FULL_VERSION}.zip" "${PROJECT_NAME}_macOS_${arch}_latest.zip" fi if [[ -n $CONTINUOUS ]]; then - mv "${PROJECT_NAME}_macOS_${arch}_latest.zip" "${PROJECT_NAME}_$(git branch --show-current)_macOS_${CMAKE_BUILD_TYPE}.zip" + BRANCH=$(git branch --show-current) + if test -z "${BRANCH}" + BRANCH=$(git rev-parse --short HEAD) + fi + mv "${PROJECT_NAME}_macOS_${arch}_latest.zip" "${PROJECT_NAME}_${BRANCH}_macOS_${CMAKE_BUILD_TYPE}.zip" fi } From ee2ebabb78533da17abaeb3872ce910bc05e950f Mon Sep 17 00:00:00 2001 From: Benitoite Date: Wed, 8 Mar 2023 15:57:07 -0800 Subject: [PATCH 18/18] =?UTF-8?q?Mac:=20add=20missing=20=E2=80=98then?= =?UTF-8?q?=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/osx/macosx_bundle.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh index 6b91654a3..ca381ec14 100644 --- a/tools/osx/macosx_bundle.sh +++ b/tools/osx/macosx_bundle.sh @@ -448,7 +448,7 @@ function CreateDmg { fi if [[ -n $CONTINUOUS ]]; then BRANCH=$(git branch --show-current) - if test -z "${BRANCH}" + if test -z "${BRANCH}"; then BRANCH=$(git rev-parse --short HEAD) fi mv "${PROJECT_NAME}_macOS_${arch}_latest.zip" "${PROJECT_NAME}_${BRANCH}_macOS_${CMAKE_BUILD_TYPE}.zip"