vlc | branch: master | Marvin Scholz <epira...@gmail.com> | Mon Feb 20 14:49:09 2017 +0100| [4e080f7ae4e0669b59de9b65e9833ac778bfd160] | committer: Marvin Scholz
macOS: Re-work dmg packaging This removes the dmg_setup.scpt and instead a template diskimage is used (VLCDMGTemplate.sparseimage.bz2). > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4e080f7ae4e0669b59de9b65e9833ac778bfd160 --- .../package/macosx/VLCDMGTemplate.sparseimage.bz2 | Bin 0 -> 1447119 bytes extras/package/macosx/dmg_setup.scpt | 25 ------------ extras/package/macosx/package.mak | 42 +++++++++++---------- 3 files changed, 22 insertions(+), 45 deletions(-) diff --git a/extras/package/macosx/VLCDMGTemplate.sparseimage.bz2 b/extras/package/macosx/VLCDMGTemplate.sparseimage.bz2 new file mode 100644 index 0000000..956aee6 Binary files /dev/null and b/extras/package/macosx/VLCDMGTemplate.sparseimage.bz2 differ diff --git a/extras/package/macosx/dmg_setup.scpt b/extras/package/macosx/dmg_setup.scpt deleted file mode 100644 index 678175e..0000000 --- a/extras/package/macosx/dmg_setup.scpt +++ /dev/null @@ -1,25 +0,0 @@ -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 1d912d7..3498ecc 100644 --- a/extras/package/macosx/package.mak +++ b/extras/package/macosx/package.mak @@ -55,25 +55,27 @@ endif find $@ -type d -exec chmod ugo+rx '{}' \; find $@ -type f -exec chmod ugo+r '{}' \; - package-macosx: VLC.app - mkdir -p "$(top_builddir)/vlc-$(VERSION)/Goodies/" - cp -R "$(top_builddir)/VLC.app" "$(top_builddir)/vlc-$(VERSION)/VLC.app" - cd $(srcdir); cp AUTHORS COPYING README THANKS NEWS $(abs_top_builddir)/vlc-$(VERSION)/Goodies/ - $(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 -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" - hdiutil convert "$(top_builddir)/vlc-$(VERSION)-rw.dmg" -format UDBZ -o "$(top_builddir)/vlc-$(VERSION).dmg" - ls -l "$(top_builddir)/vlc-$(VERSION).dmg" - rm -f "$(top_builddir)/vlc-$(VERSION)-rw.dmg" - rm -rf "$(top_builddir)/vlc-$(VERSION)" + @echo "Creating VLC-$(VERSION).dmg disk image" + ## Unzip the template dmg + bunzip2 -kqc "$(srcdir)/extras/package/macosx/VLCDMGTemplate.sparseimage.bz2" > VLCDMGTemplate.sparseimage + ## Increase size + hdiutil resize -size 150M VLCDMGTemplate.sparseimage + ## Mount the extracted dmg + hdiutil attach VLCDMGTemplate.sparseimage -noautoopen -quiet -mountpoint "$(top_builddir)/VLCDMGTemplateMnt" + ## Copy goodies + cd $(srcdir) && cp -R AUTHORS COPYING README THANKS NEWS "$(abs_top_builddir)/VLCDMGTemplateMnt/Goodies/" + ## Copy VLC.app + cp -R "$(top_builddir)/VLC.app/" "$(top_builddir)/VLCDMGTemplateMnt/VLC.app" + ## Unmount + hdiutil detach "$(top_builddir)/VLCDMGTemplateMnt" -quiet -force + ## Convert image + rm -Rf "VLC-$(VERSION).dmg" + hdiutil convert VLCDMGTemplate.sparseimage -quiet -format UDBZ -o "VLC-$(VERSION).dmg" + ## Remove template image + rm -Rf VLCDMGTemplate.sparseimage + @echo "VLC-$(VERSION).dmg created successfully!" + package-macosx-zip: VLC.app mkdir -p $(top_builddir)/vlc-$(VERSION)/Goodies/ @@ -112,9 +114,9 @@ EXTRA_DIST += \ extras/package/macosx/build.sh \ extras/package/macosx/codesign.sh \ extras/package/macosx/configure.sh \ - extras/package/macosx/dmg_setup.scpt \ extras/package/macosx/fullscreen_panel.svg \ extras/package/macosx/vlc_status_icon.svg \ extras/package/macosx/vlc_app_icon.svg \ extras/package/macosx/VLC.entitlements \ - extras/package/macosx/VLC.xcodeproj/project.pbxproj + extras/package/macosx/VLC.xcodeproj/project.pbxproj \ + extras/package/macosx/VLCDMGTemplate.sparseimage.bz2 _______________________________________________ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits