[vlc-devel] [PATCH] Make the Mac DMG prettier.
Rafaël Carré
funman at videolan.org
Tue Dec 27 20:10:33 CET 2011
Modified-by: Rafaël Carré <funman at videolan.org>
Specify mount point explicitely
Quote $(srcdir)
Signed-off-by: Rafaël Carré <funman at videolan.org>
---
The argument to the script is the volume name, not the mount point
Tested on 10.7
extras/package/macosx/dmg_setup.scpt | 25 +++++++++++++++++++++++++
extras/package/macosx/package.mak | 6 +++++-
2 files changed, 30 insertions(+), 1 deletions(-)
create mode 100644 extras/package/macosx/dmg_setup.scpt
diff --git a/extras/package/macosx/dmg_setup.scpt b/extras/package/macosx/dmg_setup.scpt
new file mode 100644
index 0000000..f50ab36
--- /dev/null
+++ b/extras/package/macosx/dmg_setup.scpt
@@ -0,0 +1,25 @@
+on run argv
+ tell application "Finder"
+ tell disk (item 1 of argv)
+ open
+ set current view of container window to icon view
+ set toolbar visible of container window to false
+ set statusbar visible of container window to false
+ set the bounds of container window to {300, 100, 750, 500}
+ set theViewOptions to the icon view options of container window
+ set arrangement of theViewOptions to not arranged
+ set icon size of theViewOptions to 104
+ # Don't set a background image, for now
+ # set background picture of theViewOptions to file ".background/background.png"
+ set position of item "VLC.app" of container window to {110, 100}
+ set position of item "Applications" of container window to {335, 100}
+ set position of item "Read Me.rtf" of container window to {110, 275}
+ set position of item "Goodies" of container window to {335, 275}
+ # Force saving changes to the disk by closing and opening the window
+ close
+ open
+ update without registering applications
+ delay 5
+ end tell
+ end tell
+end run
diff --git a/extras/package/macosx/package.mak b/extras/package/macosx/package.mak
index ab4d096..d861dc4 100644
--- a/extras/package/macosx/package.mak
+++ b/extras/package/macosx/package.mak
@@ -67,7 +67,11 @@ package-macosx: VLC-release.app
cp $(srcdir)/extras/package/macosx/Resources/about_bg.png $(top_builddir)/vlc-$(VERSION)/.background/background.png
$(LN_S) -f /Applications $(top_builddir)/vlc-$(VERSION)/
rm -f "$(top_builddir)/vlc-$(VERSION)-rw.dmg"
- hdiutil create -verbose -srcfolder "$(top_builddir)/vlc-$(VERSION)" "$(top_builddir)/vlc-$(VERSION)-rw.dmg" -scrub
+ hdiutil create -verbose -srcfolder "$(top_builddir)/vlc-$(VERSION)" "$(top_builddir)/vlc-$(VERSION)-rw.dmg" -scrub -format UDRW
+ mkdir -p ./mount
+ hdiutil attach -readwrite -noverify -noautoopen -mountRoot ./mount "vlc-$(VERSION)-rw.dmg"
+ osascript "$(srcdir)"/extras/package/macosx/dmg_setup.scpt "vlc-$(VERSION)"
+ hdiutil detach ./mount/"vlc-$(VERSION)"
# Make sure the image is not writable
# Note: We can't directly create a read only dmg as we do the bless stuff
rm -f "$(top_builddir)/vlc-$(VERSION).dmg"
--
1.7.4.4
More information about the vlc-devel
mailing list