diff options
author | Robin Gareus <robin@gareus.org> | 2014-10-08 19:16:31 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-10-08 19:16:31 +0200 |
commit | 93f816b2fed3f03ead7af8247332fee920992140 (patch) | |
tree | 375b4f80f33d3bfcd06cd6449aff6b0c7d001d5a /tools | |
parent | aac3ca552159172778a0dbd00703002b5a0fcb27 (diff) |
fix setting OSX DMG background for 10.9.X
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/osx_packaging/osx_build | 63 |
1 files changed, 36 insertions, 27 deletions
diff --git a/tools/osx_packaging/osx_build b/tools/osx_packaging/osx_build index f440c50254..a4f46dda1f 100755 --- a/tools/osx_packaging/osx_build +++ b/tools/osx_packaging/osx_build @@ -596,7 +596,7 @@ VOLNAME=$APPNAME-$release_version # TODO use mktemp export TMPDIR=`pwd` -MNTPATH=`mktemp -d -t /ardourimg` +MNTPATH=`mktemp -d -t ardourimg` TMPDMG=`mktemp -t ardour` ICNSTMP=`mktemp -t ardouricon` EXTRA_SPACE_MB=30 @@ -621,32 +621,41 @@ cp -vi ${DMGBACKGROUND} "${MNTPATH}/.background/dmgbg.png" echo "setting DMG background ..." -echo ' - tell application "Finder" - tell disk "'${VOLNAME}'" - 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, 200, 800, '${DMGWINBOTTOM}'} - set theViewOptions to the icon view options of container window - set arrangement of theViewOptions to not arranged - set icon size of theViewOptions to 64 - set background picture of theViewOptions to file ".background:dmgbg.png" - make new alias file at container window to POSIX file "/Applications" with properties {name:"Applications"} - set position of item "'${APPDIR}'" of container window to {90, 100} - set position of item "Applications" of container window to {310, 100} - '${MIXBUSPOS}' - '${HARVIDPOS}' - '${XJADEOPOS}' - close - open - update without registering applications - delay 5 - eject - end tell - end tell -' | osascript +if test $(sw_vers -productVersion | cut -d '.' -f 2) -lt 9; then + # OSX ..10.8.X + DISKNAME=${VOLNAME} +else + # OSX 10.9.X and later + DISKNAME=`basename "${MNTPATH}"` +fi + +osascript << EOF + tell application "Finder" + activate + tell disk "${DISKNAME}" + 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, 200, 800, ${DMGWINBOTTOM}} + set theViewOptions to the icon view options of container window + set arrangement of theViewOptions to not arranged + set icon size of theViewOptions to 64 + set background picture of theViewOptions to file ".background:dmgbg.png" + make new alias file at container window to POSIX file "/Applications" with properties {name:"Applications"} + set position of item "${APPDIR}" of container window to {90, 100} + set position of item "Applications" of container window to {310, 100} + ${MIXBUSPOS} + ${HARVIDPOS} + ${XJADEOPOS} + close + open + update without registering applications + delay 5 + eject + end tell + end tell +EOF chmod -Rf go-w "${MNTPATH}" sync |