13
0

fix setting OSX DMG background for 10.9.X

This commit is contained in:
Robin Gareus 2014-10-08 19:16:31 +02:00
parent aac3ca5521
commit 93f816b2fe

View File

@ -596,7 +596,7 @@ VOLNAME=$APPNAME-$release_version
# TODO use mktemp # TODO use mktemp
export TMPDIR=`pwd` export TMPDIR=`pwd`
MNTPATH=`mktemp -d -t /ardourimg` MNTPATH=`mktemp -d -t ardourimg`
TMPDMG=`mktemp -t ardour` TMPDMG=`mktemp -t ardour`
ICNSTMP=`mktemp -t ardouricon` ICNSTMP=`mktemp -t ardouricon`
EXTRA_SPACE_MB=30 EXTRA_SPACE_MB=30
@ -621,32 +621,41 @@ cp -vi ${DMGBACKGROUND} "${MNTPATH}/.background/dmgbg.png"
echo "setting DMG background ..." echo "setting DMG background ..."
echo ' if test $(sw_vers -productVersion | cut -d '.' -f 2) -lt 9; then
tell application "Finder" # OSX ..10.8.X
tell disk "'${VOLNAME}'" DISKNAME=${VOLNAME}
open else
set current view of container window to icon view # OSX 10.9.X and later
set toolbar visible of container window to false DISKNAME=`basename "${MNTPATH}"`
set statusbar visible of container window to false fi
set the bounds of container window to {400, 200, 800, '${DMGWINBOTTOM}'}
set theViewOptions to the icon view options of container window osascript << EOF
set arrangement of theViewOptions to not arranged tell application "Finder"
set icon size of theViewOptions to 64 activate
set background picture of theViewOptions to file ".background:dmgbg.png" tell disk "${DISKNAME}"
make new alias file at container window to POSIX file "/Applications" with properties {name:"Applications"} open
set position of item "'${APPDIR}'" of container window to {90, 100} set current view of container window to icon view
set position of item "Applications" of container window to {310, 100} set toolbar visible of container window to false
'${MIXBUSPOS}' set statusbar visible of container window to false
'${HARVIDPOS}' set the bounds of container window to {400, 200, 800, ${DMGWINBOTTOM}}
'${XJADEOPOS}' set theViewOptions to the icon view options of container window
close set arrangement of theViewOptions to not arranged
open set icon size of theViewOptions to 64
update without registering applications set background picture of theViewOptions to file ".background:dmgbg.png"
delay 5 make new alias file at container window to POSIX file "/Applications" with properties {name:"Applications"}
eject set position of item "${APPDIR}" of container window to {90, 100}
end tell set position of item "Applications" of container window to {310, 100}
end tell ${MIXBUSPOS}
' | osascript ${HARVIDPOS}
${XJADEOPOS}
close
open
update without registering applications
delay 5
eject
end tell
end tell
EOF
chmod -Rf go-w "${MNTPATH}" chmod -Rf go-w "${MNTPATH}"
sync sync