Patchwork [2,of,4] osx: create dmg with installer instead of zip

mail settings
Submitter Mads Kiilerich
Date Aug. 30, 2014, 12:51 p.m.
Message ID <3fe97f7dc300e16d338e.1409403067@localhost.localdomain>
Download mbox | patch
Permalink /patch/5631/
State Superseded
Commit 198e2da3ee207fedff9c762ee19b780713a37f6d
Headers show


Mads Kiilerich - Aug. 30, 2014, 12:51 p.m.
# HG changeset patch
# User Mads Kiilerich <>
# Date 1409402149 -7200
#      Sat Aug 30 14:35:49 2014 +0200
# Node ID 3fe97f7dc300e16d338efc923f5f66a0bf960b99
# Parent  04876a023f7467c87fd992148bf676be50dfdf57
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 .


diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -137,10 +137,11 @@  i18n/hg.pot: $(PYFILES) $(DOCFILES) i18n
 	@which -s bdist_mpkg || \
 	   (echo "Missing bdist_mpkg (easy_install bdist_mpkg)"; false)
+	rm -rf dist/mercurial-*.mpkg
 	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
 	mkdir -p packages/fedora
diff --git a/ b/
--- a/
+++ b/
@@ -583,7 +583,7 @@  setup(name='mercurial',
       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',