[vlc-commits] Make the Mac DMG prettier.

Brendon Justin git at videolan.org
Thu Dec 29 02:30:41 CET 2011


vlc/vlc-1.2 | branch: master | Brendon Justin <brendonjustin at gmail.com> | Tue Dec 27 14:10:33 2011 -0500| [d3ed71eb911a8aa034614f2bbdc745691764c87d] | committer: Jean-Baptiste Kempf

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>
(cherry picked from commit 1550902d69c609e031485164298b9086d907de2b)
(cherry picked from commit cca013e7565ceb8337e904c6bafe38499d1f3915)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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 ad5ff76..91bf22a 100644
--- a/extras/package/macosx/package.mak
+++ b/extras/package/macosx/package.mak
@@ -70,7 +70,11 @@ package-macosx: VLC-release.app ChangeLog
 	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