Set the .DS_Store file in the temp dmg directory rather than after it's mounted. jfs reported finder crashing after updating to 10.5.8. Setting it this way should work and avoid the issue of .DS_Store changing randomly as a folder won't show up on the desktop like a mounted image will.

Originally committed to SVN as r3481.
This commit is contained in:
Amar Takhar 2009-09-04 02:16:39 +00:00
parent 5a12ee807b
commit 99f421bf73

View file

@ -41,6 +41,10 @@ mkdir -v "${TMP_DMG}/.background"
cp -v packages/osx_dmg/dmg_background.png "${TMP_DMG}/.background/background.png"
cp -v packages/osx_bundle/Contents/Resources/Aegisub.icns "${TMP_DMG}/.VolumeIcon.icns"
echo
echo "--- Generating /Volumes/${PKG_NAME_VOLUME}/.DS_Store ----"
/usr/bin/perl tools/osx-dmg-dsstore.pl "${TMP_DMG}/.DS_Store" "${PKG_DIR}" "${TMP_DMG}/.background/background.png" || exit $?
echo
echo "---- Creating image ----"
/usr/bin/hdiutil create -srcfolder "${TMP_DMG}" -volname "${PKG_NAME}" -fs HFS+ -fsargs "-c c=64,a=16,e=16" -format UDRW "${PKG_NAME_RW}" || exit $?
@ -58,10 +62,6 @@ echo
echo "---- Setting root icon using SetFile ----"
SetFile -a C "/Volumes/${PKG_NAME_VOLUME}" || exit $?
echo
echo "--- Generating /Volumes/${PKG_NAME_VOLUME}/.DS_Store ----"
/usr/bin/perl tools/osx-dmg-dsstore.pl "/Volumes/${PKG_NAME_VOLUME}/.DS_Store" "${PKG_DIR}" "/Volumes/${PKG_NAME_VOLUME}/.background/background.png" || exit $?
echo
echo "---- Detaching ----"
/usr/bin/hdiutil detach "${DEV_NAME}" -force || exit $?