Skip to content
Extraits de code Groupes Projets
Valider eeb574b1 rédigé par Thomas Goyne's avatar Thomas Goyne
Parcourir les fichiers

Fix dmg creation on 10.9

parent 2640dc42
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
# Released under GNU GPL, read the file 'COPYING' from the Inkscape project for more # Released under GNU GPL, read the file 'COPYING' from the Inkscape project for more
# information. # information.
set -e
TMP_DMG="temp_dmg" TMP_DMG="temp_dmg"
PKG_DIR="Aegisub.app" PKG_DIR="Aegisub.app"
PKG_NAME="Aegisub-${1}" PKG_NAME="Aegisub-${1}"
...@@ -39,20 +41,20 @@ cp -v packages/osx_bundle/Contents/Resources/Aegisub.icns "${TMP_DMG}/.VolumeIco ...@@ -39,20 +41,20 @@ cp -v packages/osx_bundle/Contents/Resources/Aegisub.icns "${TMP_DMG}/.VolumeIco
echo echo
echo "---- Creating image ----" 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 $? /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}"
echo echo
echo "---- Mounting image ----" echo "---- Mounting image ----"
DEV_NAME=`/usr/bin/hdiutil attach -readwrite -noverify -noautoopen "${PKG_NAME_RW}" |awk '/Apple_partition_scheme/ {print $1}'` || exit $? DEV_NAME=`/usr/bin/hdiutil attach -readwrite -noverify -noautoopen "${PKG_NAME_RW}" |awk '/GUID_partition_scheme/ {print $1}'`
echo "Device name: ${DEV_NAME}" echo "Device name: ${DEV_NAME}"
echo echo
echo "---- Setting bless -openfolder ----" echo "---- Setting bless -openfolder ----"
bless -openfolder "/Volumes/${PKG_NAME_VOLUME}" || exit $? bless -openfolder "/Volumes/${PKG_NAME_VOLUME}"
echo echo
echo "---- Setting root icon using SetFile ----" echo "---- Setting root icon using SetFile ----"
SetFile -a C "/Volumes/${PKG_NAME_VOLUME}" || exit $? SetFile -a C "/Volumes/${PKG_NAME_VOLUME}"
echo echo
if test -n "${SET_STYLE}"; then if test -n "${SET_STYLE}"; then
...@@ -77,7 +79,7 @@ if test -n "${SET_STYLE}"; then ...@@ -77,7 +79,7 @@ if test -n "${SET_STYLE}"; then
hdiutil detach "${DEV_NAME}" hdiutil detach "${DEV_NAME}"
DEV_NAME=`/usr/bin/hdiutil attach -readwrite -noverify -noautoopen "${PKG_NAME_RW}" |awk '/Apple_partition_scheme/ {print $1}'` || exit $? DEV_NAME=`/usr/bin/hdiutil attach -readwrite -noverify -noautoopen "${PKG_NAME_RW}" |awk '/GUID_partition_scheme/ {print $1}'`
echo "Device name: ${DEV_NAME}" echo "Device name: ${DEV_NAME}"
cp -v "/Volumes/${PKG_NAME_VOLUME}/.DS_Store" packages/osx_dmg/DS_Store cp -v "/Volumes/${PKG_NAME_VOLUME}/.DS_Store" packages/osx_dmg/DS_Store
...@@ -93,15 +95,16 @@ fi ...@@ -93,15 +95,16 @@ fi
echo echo
echo "---- Detaching ----" echo "---- Detaching ----"
/usr/bin/hdiutil detach "${DEV_NAME}" -force || exit $? echo /usr/bin/hdiutil detach "${DEV_NAME}" -force
/usr/bin/hdiutil detach "${DEV_NAME}" -force
echo echo
echo "---- Compressing ----" echo "---- Compressing ----"
/usr/bin/hdiutil convert "${PKG_NAME_RW}" -format UDBZ -imagekey bzip2-level=9 -o "${PKG_NAME}.dmg" || exit $? /usr/bin/hdiutil convert "${PKG_NAME_RW}" -format UDBZ -imagekey bzip2-level=9 -o "${PKG_NAME}.dmg"
echo echo
echo "---- Removing \"${TMP_DMG}\", \"${PKG_NAME_RW}\" ----" echo "---- Removing \"${TMP_DMG}\", \"${PKG_NAME_RW}\" ----"
rm -rf "${TMP_DMG}" "${PKG_NAME_RW}" || exit $? rm -rf "${TMP_DMG}" "${PKG_NAME_RW}"
echo echo
echo "Done!" echo "Done!"
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter