[vlc-commits] Make the Mac DMG prettier.

Brendon Justin git at videolan.org
Wed Dec 28 17:40:49 CET 2011


vlc | branch: master | Brendon Justin <brendonjustin at gmail.com> | Tue Dec 27 14:10:33 2011 -0500| [1550902d69c609e031485164298b9086d907de2b] | committer: Rafaël Carré

Make the Mac DMG prettier.

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>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1550902d69c609e031485164298b9086d907de2b
---

 extras/package/macosx/dmg_setup.scpt |   25 +++++++++++++++++++++++++
 extras/package/macosx/package.mak    |    6 +++++-
 2 files changed, 30 insertions(+), 1 deletions(-)

diff --git a/extras/package/macosx/dmg_setup.scpt b/extras/package/macosx/dmg_setup.scpt
new file mode 100644
index 0000000..678175e
--- /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 499698e..e0a641a 100644
--- a/extras/package/macosx/package.mak
+++ b/extras/package/macosx/package.mak
@@ -69,7 +69,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"



More information about the vlc-commits mailing list