diff --git a/packaging/osx/DS_Store b/packaging/osx/DS_Store index 8c3e14d3f3..724f017411 100644 Binary files a/packaging/osx/DS_Store and b/packaging/osx/DS_Store differ diff --git a/packaging/osx/background.tiff b/packaging/osx/background.tiff index 4b7cd6de26..cb76199d46 100644 Binary files a/packaging/osx/background.tiff and b/packaging/osx/background.tiff differ diff --git a/packaging/osx/buildpackage.sh b/packaging/osx/buildpackage.sh index f5181c6e2e..fa13b0083b 100755 --- a/packaging/osx/buildpackage.sh +++ b/packaging/osx/buildpackage.sh @@ -54,14 +54,13 @@ echo "Building launchers" curl -s -L -O https://github.com/OpenRA/OpenRALauncherOSX/releases/download/${LAUNCHER_TAG}/launcher.zip || exit 3 unzip -qq -d "${BUILTDIR}" launcher.zip rm launcher.zip -mkdir -p "${BUILTDIR}/.DropDMGBackground" # Background image is created from source svg in artsrc repository # exported to tiff at 72 + 144 DPI, then combined using # tiffutil -cathidpicheck bg.tiff bg2x.tiff -out background.tiff -cp background.tiff "${BUILTDIR}/.DropDMGBackground" +cp background.tiff "${BUILTDIR}/.background.tiff" -# Finder metadata created using free trial of DropDMG +# Finder metadata created using create-dsstore.sh cp DS_Store "${BUILTDIR}/.DS_Store" ln -s /Applications/ "${BUILTDIR}/Applications" diff --git a/packaging/osx/create-dsstore.sh b/packaging/osx/create-dsstore.sh new file mode 100755 index 0000000000..9e96d668f4 --- /dev/null +++ b/packaging/osx/create-dsstore.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# Script to create DS_Store file for the macOS dmg package +# Requires macOS host + +mkdir "dmgsrc" +mkdir "dmgsrc/OpenRA - Tiberian Dawn.app" +mkdir "dmgsrc/OpenRA - Red Alert.app" +mkdir "dmgsrc/OpenRA - Dune 2000.app" +cp background.tiff "dmgsrc/.background.tiff" + +hdiutil create /tmp/OpenRA.dmg -format UDRW -volname "OpenRA" -fs HFS+ -srcfolder dmgsrc +DMG_DEVICE=$(hdiutil attach -readwrite -noverify -noautoopen "/tmp/OpenRA.dmg" | egrep '^/dev/' | sed 1q | awk '{print $1}') +sleep 2 +ls -lah /Volumes/OpenRA +echo ' + tell application "Finder" + tell disk "'OpenRA'" + open + set current view of container window to icon view + set toolbar visible of container window to false + set statusbar visible of container window to false + set the bounds of container window to {400, 100, 1040, 580} + set theViewOptions to the icon view options of container window + set arrangement of theViewOptions to not arranged + set icon size of theViewOptions to 72 + set background picture of theViewOptions to file ".background.tiff" + make new alias file at container window to POSIX file "/Applications" with properties {name:"Applications"} + set position of item "'OpenRA - Tiberian Dawn.app'" of container window to {160, 106} + set position of item "'OpenRA - Red Alert.app'" of container window to {320, 106} + set position of item "'OpenRA - Dune 2000.app'" of container window to {480, 106} + set position of item "Applications" of container window to {320, 298} + set position of item ".background.tiff" of container window to {160, 298} + set position of item ".fseventsd" of container window to {160, 298} + update without registering applications + delay 5 + close + end tell + end tell +' | osascript + +cp "/Volumes/OpenRA/.DS_Store" DS_Store + +hdiutil detach ${DMG_DEVICE} +rm /tmp/OpenRA.dmg +rm -rf dmgsrc \ No newline at end of file