[PATCH] wix: move library.zip and all *.pyd into a lib/ folder

Steve Borho steve at borho.org
Wed Jun 3 14:46:41 CDT 2015


# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1433359879 18000
#      Wed Jun 03 14:31:19 2015 -0500
# Node ID 997393275616a726b8a24947cdafc2834fe7c00c
# Parent  724d7982b7906775b024c04875c0c064342d186e
wix: move library.zip and all *.pyd into a lib/ folder

This makes the root install folder (on Windows) nice and tidy. The
only files left in the root folder are:

hg.exe
python27.dll
COPYING.rtf
ReadMe.html

the last of which was probably out-of-date 7 years ago

diff -r 724d7982b790 -r 997393275616 contrib/wix/dist.wxs
--- a/contrib/wix/dist.wxs	Tue Jun 02 13:24:39 2015 -0500
+++ b/contrib/wix/dist.wxs	Wed Jun 03 14:31:19 2015 -0500
@@ -7,24 +7,28 @@
   <Fragment>
     <DirectoryRef Id="INSTALLDIR" FileSource="$(var.SourceDir)">
       <Component Id="distOutput" Guid="$(var.dist.guid)" Win64='$(var.IsX64)'>
-        <File Name="library.zip" KeyPath="yes" />
-        <File Name="mercurial.base85.pyd" />
-        <File Name="mercurial.bdiff.pyd" />
-        <File Name="mercurial.diffhelpers.pyd" />
-        <File Name="mercurial.mpatch.pyd" />
-        <File Name="mercurial.osutil.pyd" />
-        <File Name="mercurial.parsers.pyd" />
-        <File Name="pyexpat.pyd" />
-        <File Name="python27.dll" />
-        <File Name="bz2.pyd" />
-        <File Name="select.pyd" />
-        <File Name="unicodedata.pyd" />
-        <File Name="_ctypes.pyd" />
-        <File Name="_elementtree.pyd" />
-        <File Name="_hashlib.pyd" />
-        <File Name="_socket.pyd" />
-        <File Name="_ssl.pyd" />
+        <File Name="python27.dll" KeyPath="yes" />
       </Component>
+      <Directory Id="libdir" Name="lib" FileSource="$(var.SourceDir)/lib">
+        <Component Id="libOutput" Guid="$(var.lib.guid)" Win64='$(var.IsX64)'>
+          <File Name="library.zip" KeyPath="yes" />
+          <File Name="mercurial.base85.pyd" />
+          <File Name="mercurial.bdiff.pyd" />
+          <File Name="mercurial.diffhelpers.pyd" />
+          <File Name="mercurial.mpatch.pyd" />
+          <File Name="mercurial.osutil.pyd" />
+          <File Name="mercurial.parsers.pyd" />
+          <File Name="pyexpat.pyd" />
+          <File Name="bz2.pyd" />
+          <File Name="select.pyd" />
+          <File Name="unicodedata.pyd" />
+          <File Name="_ctypes.pyd" />
+          <File Name="_elementtree.pyd" />
+          <File Name="_hashlib.pyd" />
+          <File Name="_socket.pyd" />
+          <File Name="_ssl.pyd" />
+        </Component>
+      </Directory>
     </DirectoryRef>
   </Fragment>
 
diff -r 724d7982b790 -r 997393275616 contrib/wix/guids.wxi
--- a/contrib/wix/guids.wxi	Tue Jun 02 13:24:39 2015 -0500
+++ b/contrib/wix/guids.wxi	Wed Jun 03 14:31:19 2015 -0500
@@ -9,7 +9,8 @@
   <?define contrib.vim.guid = {BB04903A-652D-4C4F-9590-2BD07A2304F2} ?>
 
   <!-- dist.wxs -->
-  <?define dist.guid = {C3B634A4-1B05-4A40-94A9-38EE853CF693} ?>
+  <?define dist.guid = {CE405FE6-CD1E-4873-9C9A-7683AE5A3D90} ?>
+  <?define lib.guid = {91D53B14-E924-432A-ACA2-65F9B3F7C56A} ?>
 
   <!-- doc.wxs -->
   <?define doc.hg.1.html.guid = {AAAA3FDA-EDC5-4220-B59D-D342722358A2} ?>
diff -r 724d7982b790 -r 997393275616 contrib/wix/mercurial.wxs
--- a/contrib/wix/mercurial.wxs	Tue Jun 02 13:24:39 2015 -0500
+++ b/contrib/wix/mercurial.wxs	Wed Jun 03 14:31:19 2015 -0500
@@ -118,6 +118,7 @@
              Level='1' Absent='disallow' >
         <ComponentRef Id='MainExecutable' />
         <ComponentRef Id='distOutput' />
+        <ComponentRef Id='libOutput' />
         <ComponentRef Id='ProgramMenuDir' />
         <ComponentRef Id='ReadMe' />
         <ComponentRef Id='COPYING' />
diff -r 724d7982b790 -r 997393275616 setup.py
--- a/setup.py	Tue Jun 02 13:24:39 2015 -0500
+++ b/setup.py	Wed Jun 03 14:31:19 2015 -0500
@@ -557,6 +557,8 @@
          'product_version':version}]
     # sub command of 'build' because 'py2exe' does not handle sub_commands
     build.sub_commands.insert(0, ('build_hgextindex', None))
+    # put dlls in sub directory so that they won't pollute PATH
+    extra['zipfile'] = 'lib/library.zip'
 
 if os.name == 'nt':
     # Windows binary file versions for exe/dll files must have the


More information about the Mercurial-devel mailing list