aboutsummaryrefslogtreecommitdiff
path: root/tools/darwin
diff options
context:
space:
mode:
authorMemphiz <memphis@machzwo.de>2014-11-24 00:17:36 +0100
committerda-anda <da-anda@xbmc.org>2014-11-24 01:45:35 +0100
commitb4861cb8fc82175b5f3fc64f35ab6b363fb7a626 (patch)
treea330c7554a8edfda6d1b6a8ff6cec947ecfea8a8 /tools/darwin
parent10d1ffd9f2313f8b2a8c2207a10e6959d82851e0 (diff)
[osx/packaging] - generate the volumeicon.icns in the packaging script and fixup some pathes - remove some unneeded checks and do a sanity clean of the rw dmg during packaging
Diffstat (limited to 'tools/darwin')
-rwxr-xr-xtools/darwin/packaging/osx/dmgmaker.pl19
-rwxr-xr-xtools/darwin/packaging/osx/mkdmg-osx.sh.in7
2 files changed, 15 insertions, 11 deletions
diff --git a/tools/darwin/packaging/osx/dmgmaker.pl b/tools/darwin/packaging/osx/dmgmaker.pl
index 4720bf047a..a24614d538 100755
--- a/tools/darwin/packaging/osx/dmgmaker.pl
+++ b/tools/darwin/packaging/osx/dmgmaker.pl
@@ -38,6 +38,10 @@ sub make_dmg {
$dev_handle = $1 if $dev_handle =~ /^\/dev\/(disk.)/;
die("Could not obtain device handle\n") if !$dev_handle;
print "Got device handle \"$dev_handle\"\n";
+ #clear the volume - we will copy stuff on it with ditto later
+ #this removes crap which might have come in via the srcfolder
+ #parameter of hdiutil above
+ `rm -r /Volumes/$volname/*`;
print "Ignore \"No space left on device\" warnings from ditto, they are an autosize artifact\n";
`ditto "$mpkg" "/Volumes/$volname/$pkgname.$ext"`;
@@ -48,17 +52,10 @@ sub make_dmg {
# make symlink to /Applications
`ln -s /Applications "/Volumes/$volname/Applications"`;
- if ( -d "background" ) {
- `mkdir "/Volumes/$volname/background"`;
- `ditto background "/Volumes/$volname/background/"`;
- }
- if ( -f "VolumeDSStore" ) {
- `ditto VolumeDSStore "/Volumes/$volname/.DS_Store"` if $ext ne "app";
- `ditto VolumeDSStoreApp "/Volumes/$volname/.DS_Store"` if $ext eq "app";
- }
- if ( -d "background" ) {
- `xcrun SetFile -a V "/Volumes/$volname/background"`;
- }
+ `mkdir "/Volumes/$volname/background"`;
+ `ditto ../media/osx/background "/Volumes/$volname/background/"`;
+ `ditto VolumeDSStoreApp "/Volumes/$volname/.DS_Store"`;
+ `xcrun SetFile -a V "/Volumes/$volname/background"`;
`xcrun SetFile -a C "/Volumes/$volname/"`;
`hdiutil detach $dev_handle`;
`hdiutil convert "$volname.dmg" -format UDZO -imagekey zlib-level=9 -o "$volname.udzo.dmg"`;
diff --git a/tools/darwin/packaging/osx/mkdmg-osx.sh.in b/tools/darwin/packaging/osx/mkdmg-osx.sh.in
index 8a4dfe6a7b..33c13dd45a 100755
--- a/tools/darwin/packaging/osx/mkdmg-osx.sh.in
+++ b/tools/darwin/packaging/osx/mkdmg-osx.sh.in
@@ -36,6 +36,13 @@ then
umount /Volumes/$ARCHIVE
fi
+#generate volume iconset
+if [ `which iconutil` ]
+then
+ echo "Generating volumeIcon.icns"
+ iconutil -c icns --output "VolumeIcon.icns" "../media/osx/volumeIcon.iconset"
+fi
+
$DIRNAME/dmgmaker.pl $APP $ARCHIVE
echo "done"