changeset 22358:198e2da3ee20

osx: create dmg with installer instead of zip OS X would offer to expand the zip so the (multi file) installer inside it could be run ... but that would leave the expanded zip folder around. Instead, use a .dmg file that automatically will be mounted - that seems more common on OS X. Still, there is two levels of levels of clicking before actually launching the installer. Having a single file installer would be better ... but seems to be hard. A more feasible improvement would be some fancy layout inside the .dmg .
author Mads Kiilerich <madski@unity3d.com>
date Sun, 31 Aug 2014 10:24:25 +0200
parents 9c3c3dc14a65
children e3714b927af5
files Makefile setup.py
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Sat Aug 30 12:33:12 2014 +0200
+++ b/Makefile	Sun Aug 31 10:24:25 2014 +0200
@@ -137,10 +137,11 @@
 osx:
 	@which bdist_mpkg >/dev/null || \
 	   (echo "Missing bdist_mpkg (easy_install bdist_mpkg)"; false)
+	rm -rf dist/mercurial-*.mpkg
 	bdist_mpkg setup.py
 	mkdir -p packages/osx
+	N=`cd dist && echo mercurial-*.mpkg | sed 's,\.mpkg$$,,'` && hdiutil create -srcfolder dist/$$N.mpkg/ -scrub -volname "$$N" -ov packages/osx/$$N.dmg
 	rm -rf dist/mercurial-*.mpkg
-	mv dist/mercurial*macosx*.zip packages/osx
 
 fedora:
 	mkdir -p packages/fedora
--- a/setup.py	Sat Aug 30 12:33:12 2014 +0200
+++ b/setup.py	Sun Aug 31 10:24:25 2014 +0200
@@ -583,7 +583,7 @@
       cmdclass=cmdclass,
       distclass=hgdist,
       options={'py2exe': {'packages': ['hgext', 'email']},
-               'bdist_mpkg': {'zipdist': True,
+               'bdist_mpkg': {'zipdist': False,
                               'license': 'COPYING',
                               'readme': 'contrib/macosx/Readme.html',
                               'welcome': 'contrib/macosx/Welcome.html',