1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-23 08:20:01 +01:00

Create dmg with genisoimage & libdmg-hfsplus

This commit is contained in:
John Maguire 2016-12-20 15:55:30 +00:00
parent 809387c75a
commit 08e1db494d

31
dist/create-dmg.sh vendored
View File

@ -28,32 +28,5 @@ OUT="$NAME.dmg"
mkdir -p "$TMP" mkdir -p "$TMP"
################################################################################ ################################################################################
genisoimage -D -V "Clementine" -no-pad -r -apple -o $NAME.iso $IN
# clean up dmg dmg $NAME.iso $OUT
rm -rf "$TMP"
rm -f "$OUT"
# create DMG contents and copy files
mkdir -p "$TMP/.background"
cp ../dist/dmg_background.png "$TMP/.background/background.png"
cp ../dist/DS_Store.in "$TMP/.DS_Store"
chmod go-rwx "$TMP/.DS_Store"
ln -s /Applications "$TMP/Applications"
# copies the prepared bundle into the dir that will become the DMG
cp -R "$IN" "$TMP"
# create
hdiutil makehybrid -hfs -hfs-volume-name Clementine -hfs-openfolder "$TMP" "$TMP" -o tmp.dmg
hdiutil convert -format UDZO -imagekey zlib-level=9 tmp.dmg -o "$OUT"
# cleanup
rm tmp.dmg
#hdiutil create -srcfolder "$TMP" \
# -format UDZO -imagekey zlib-level=9 \
# -scrub \
# "$OUT" \
# || die "Error creating DMG :("
# done !
echo 'DMG size:' `du -hs "$OUT" | awk '{print $1}'`