diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 33d6232ab5..dc1519f42a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1002,9 +1002,9 @@ dist-mac-weekly: - macos script: # Do not call sh since it is old bash on macOS, not the default zsh - - zsh build/macos/3_dist-gimp-apple.sh + - zsh build/macos/dmg/3_dist-gimp-apple.sh artifacts: expose_as: 'macOS dmg' paths: - - build/macos/_Output/ + - build/macos/dmg/_Output/ expire_in: 8 days diff --git a/build/macos/3_dist-gimp-apple.sh b/build/macos/dmg/3_dist-gimp-apple.sh similarity index 91% rename from build/macos/3_dist-gimp-apple.sh rename to build/macos/dmg/3_dist-gimp-apple.sh index 16d8cb1fd1..ed000712e3 100644 --- a/build/macos/3_dist-gimp-apple.sh +++ b/build/macos/dmg/3_dist-gimp-apple.sh @@ -16,10 +16,10 @@ case $(readlink /proc/$$/exe) in ;; esac set -e -if [ "$0" != 'build/macos/3_dist-gimp-apple.sh' ] && [ $(basename "$PWD") != 'macos' ]; then +if [ "$0" != 'build/macos/dmg/3_dist-gimp-apple.sh' ] && [ $(basename "$PWD") != 'dmg' ]; then printf '\033[31m(ERROR)\033[0m: Script called from wrong dir. Please, call this script from the root of gimp git dir\n' exit 1 -elif [ $(basename "$PWD") = 'macos' ]; then +elif [ $(basename "$PWD") = 'dmg' ]; then cd ../../.. fi @@ -133,14 +133,14 @@ conf_plist "%MUTEX_SUFFIX%" "$MUTEX_SUFFIX" ### List supported filetypes sed -i '' "s|%FILE_TYPES%|$(tr -d '\n' < $BUILD_DIR/plug-ins/file_associations_mac.list)|g" "$DMG_MOUNT/$BUNDLE_NAME.app/Contents/Info.plist" -## 4.2 FIXME: Create .DS_Store to set .dmg background and icon layout -printf '(INFO): generating .DS_Store\n' +## 4.2 Create or copy .DS_Store to set .dmg background and icon layout +printf '(INFO): handling .DS_Store\n' +mkdir -p "$DMG_MOUNT/.background" +cp -r "$BG_PATH" "$DMG_MOUNT/.background/" ln -s /Applications "$DMG_MOUNT/Applications" +sync +sleep 2 #avoid Finder async issues if [ -z "$GITLAB_CI" ]; then - mkdir -p "$DMG_MOUNT/.background" - cp -r "$BG_PATH" "$DMG_MOUNT/.background/" - sync - sleep 2 #avoid Finder async issues osascript <