aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMemphiz <memphis@machzwo.de>2014-11-24 20:34:27 +0100
committerMemphiz <memphis@machzwo.de>2014-11-24 21:44:20 +0100
commitfb7649a5293bdd4ce4fac832446325705d690b7a (patch)
tree1920eb6efca194e5f7fb7350972209d9b56e6c2d
parent828181a432beac8a352ebebcaeb2f414323a015c (diff)
[osx/packaging] - ensure that our dmg is always mounted with a static name (/Volumes/Kodi in our case) - else the prepared .DS_Store won't work and we don't get the background image and icon position
-rwxr-xr-xtools/darwin/packaging/osx/dmgmaker.pl20
1 files changed, 10 insertions, 10 deletions
diff --git a/tools/darwin/packaging/osx/dmgmaker.pl b/tools/darwin/packaging/osx/dmgmaker.pl
index a24614d538..54164ebd52 100755
--- a/tools/darwin/packaging/osx/dmgmaker.pl
+++ b/tools/darwin/packaging/osx/dmgmaker.pl
@@ -32,7 +32,7 @@ sub make_dmg {
$ext = "mpkg" if !$ext;
# thanks to http://dev.simon-cozens.org/songbee/browser/release-manager-tools/build-dmg.sh
- `hdiutil create -fs HFS+ -volname "$volname" -format UDRW -srcfolder "$mpkg" "$volname.dmg"`;
+ `hdiutil create -fs HFS+ -volname "$pkgname" -format UDRW -srcfolder "$mpkg" "$volname.dmg"`;
$dev_handle = `hdiutil attach -readwrite -noverify -noautoopen "$volname.dmg" | grep Apple_HFS`;
chomp $dev_handle;
$dev_handle = $1 if $dev_handle =~ /^\/dev\/(disk.)/;
@@ -41,22 +41,22 @@ sub make_dmg {
#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/*`;
+ `rm -r /Volumes/$pkgname/*`;
print "Ignore \"No space left on device\" warnings from ditto, they are an autosize artifact\n";
- `ditto "$mpkg" "/Volumes/$volname/$pkgname.$ext"`;
+ `ditto "$mpkg" "/Volumes/$pkgname/$pkgname.$ext"`;
# set a volume icon if we have one
if ( -f "VolumeIcon.icns" ) {
- `ditto VolumeIcon.icns "/Volumes/$volname/.VolumeIcon.icns"`;
+ `ditto VolumeIcon.icns "/Volumes/$pkgname/.VolumeIcon.icns"`;
}
# make symlink to /Applications
- `ln -s /Applications "/Volumes/$volname/Applications"`;
+ `ln -s /Applications "/Volumes/$pkgname/Applications"`;
- `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/"`;
+ `mkdir "/Volumes/$pkgname/background"`;
+ `ditto ../media/osx/background "/Volumes/$pkgname/background/"`;
+ `xcrun SetFile -a V "/Volumes/$pkgname/background"`;
+ `xcrun SetFile -a C "/Volumes/$pkgname/"`;
+ `cp VolumeDSStoreApp "/Volumes/$pkgname/.DS_Store"`;
`hdiutil detach $dev_handle`;
`hdiutil convert "$volname.dmg" -format UDZO -imagekey zlib-level=9 -o "$volname.udzo.dmg"`;
`rm -f "$volname.dmg"`;