mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
wix: switch Mercurial Windows installer to use py2exe --bundle 3
--bundle 3 leaves all of the compiled C extensions and other DLLs outside of the library.zip, so we no longer add the installer folder to the system PATH. Instead, we now ship a small bin/hg.cmd and it is placed in the PATH. Switching to py2exe --bundle 3 is necessary because the higher bundle options are not supported on x64.
This commit is contained in:
parent
a5a62b9b6f
commit
a95ec762fd
39
contrib/wix/dist.wxs
Normal file
39
contrib/wix/dist.wxs
Normal file
@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
|
||||
<?include guids.wxi ?>
|
||||
|
||||
<Fragment>
|
||||
<DirectoryRef Id="INSTALLDIR" FileSource="$(var.SourceDir)">
|
||||
<Component Id="distOutput" Guid="$(var.dist.guid)">
|
||||
<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="python26.dll" />
|
||||
<File Name="pythoncom26.dll" />
|
||||
<File Name="pywintypes26.dll" />
|
||||
<File Name="bz2.pyd" />
|
||||
<File Name="select.pyd" />
|
||||
<File Name="unicodedata.pyd" />
|
||||
<File Name="win32api.pyd" />
|
||||
<File Name="win32com.shell.shell.pyd" />
|
||||
<File Name="win32console.pyd" />
|
||||
<File Name="win32file.pyd" />
|
||||
<File Name="win32gui.pyd" />
|
||||
<File Name="win32pipe.pyd" />
|
||||
<File Name="win32process.pyd" />
|
||||
<File Name="_elementtree.pyd" />
|
||||
<File Name="_hashlib.pyd" />
|
||||
<File Name="_socket.pyd" />
|
||||
<File Name="_ssl.pyd" />
|
||||
<File Name="_win32sysloader.pyd" />
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
</Fragment>
|
||||
|
||||
</Wix>
|
@ -8,6 +8,9 @@
|
||||
<?define contrib.guid = {F17D27B7-4A6B-4cd2-AE72-FED3CFAA585E} ?>
|
||||
<?define contrib.vim.guid = {BB04903A-652D-4C4F-9590-2BD07A2304F2} ?>
|
||||
|
||||
<!-- dist.wxs -->
|
||||
<?define dist.guid = {0F63D160-0740-4BAF-BF25-0C6930310F51} ?>
|
||||
|
||||
<!-- doc.wxs -->
|
||||
<?define doc.hg.1.html.guid = {AAAA3FDA-EDC5-4220-B59D-D342722358A2} ?>
|
||||
<?define doc.hgignore.5.html.guid = {AA9118C4-F3A0-4429-A5F4-5A1906B2D67F} ?>
|
||||
@ -42,5 +45,6 @@
|
||||
<?define mercurial.rc.guid = {1D5FAEEE-7E6E-43B1-9F7F-802714316B15} ?>
|
||||
<?define mergetools.rc.guid = {E8A1DC29-FF40-4B5F-BD12-80B9F7BF0CCD} ?>
|
||||
<?define ProgramMenuDir.guid = {D5A63320-1238-489B-B68B-CF053E9577CA} ?>
|
||||
<?define hgcmd.guid = {65CCC756-E72E-4C5F-901E-D575EDC80DB3} ?>
|
||||
|
||||
</Include>
|
||||
|
3
contrib/wix/hg.cmd
Normal file
3
contrib/wix/hg.cmd
Normal file
@ -0,0 +1,3 @@
|
||||
@echo off
|
||||
rem launch hg.exe from parent folder
|
||||
"%~dp0\..\hg.exe" %*
|
@ -8,6 +8,12 @@
|
||||
|
||||
<?include guids.wxi ?>
|
||||
|
||||
<?if $(var.Platform) = "x64" ?>
|
||||
<?define IsX64 = yes ?>
|
||||
<?else?>
|
||||
<?define IsX64 = no ?>
|
||||
<?endif?>
|
||||
|
||||
<Product Id='*'
|
||||
Name='Mercurial $(var.Version)'
|
||||
UpgradeCode='$(var.ProductUpgradeCode)'
|
||||
@ -52,10 +58,8 @@
|
||||
<Directory Id='INSTALLDIR' Name='Mercurial'>
|
||||
<Component Id='MainExecutable' Guid='$(var.ComponentMainExecutableGUID)'>
|
||||
<File Id='hgEXE' Name='hg.exe' Source='dist\hg.exe' KeyPath='yes' />
|
||||
<File Id='libraryZIP' Name='library.zip' Source='dist\library.zip' />
|
||||
<File Id='pythonDLL' Name='python26.dll' Source='dist\python26.dll' />
|
||||
<Environment Id="Environment" Name="PATH" Part="last" System="yes"
|
||||
Permanent="no" Value="[INSTALLDIR]" Action="set" />
|
||||
Permanent="no" Value="[INSTALLDIR]bin" Action="set" />
|
||||
</Component>
|
||||
<Component Id='ReadMe' Guid='$(var.ReadMe.guid)'>
|
||||
<File Id='ReadMe' Name='ReadMe.html' Source='contrib\win32\ReadMe.html'
|
||||
@ -65,6 +69,7 @@
|
||||
<File Id='COPYING' Name='COPYING.rtf' Source='contrib\wix\COPYING.rtf'
|
||||
KeyPath='yes'/>
|
||||
</Component>
|
||||
|
||||
<Directory Id='HGRCD' Name='hgrc.d'>
|
||||
<Component Id='mercurial.rc' Guid='$(var.mercurial.rc.guid)'>
|
||||
<File Id='mercurial.rc' Name='Mercurial.rc' Source='contrib\win32\mercurial.ini'
|
||||
@ -75,6 +80,12 @@
|
||||
ReadOnly='yes' KeyPath='yes'/>
|
||||
</Component>
|
||||
</Directory>
|
||||
|
||||
<Directory Id='binFolder' Name='bin'>
|
||||
<Component Id='HgCmd' Guid='$(var.hgcmd.guid)'>
|
||||
<File Id='Hg.Cmd' Name='hg.cmd' KeyPath='yes' Source='contrib\wix\hg.cmd' />
|
||||
</Component>
|
||||
</Directory>
|
||||
</Directory>
|
||||
</Directory>
|
||||
|
||||
@ -101,12 +112,14 @@
|
||||
<Feature Id='MainProgram' Title='Program' Description='Mercurial command line app'
|
||||
Level='1' Absent='disallow' >
|
||||
<ComponentRef Id='MainExecutable' />
|
||||
<ComponentRef Id='distOutput' />
|
||||
<ComponentRef Id='ProgramMenuDir' />
|
||||
<ComponentRef Id='ReadMe' />
|
||||
<ComponentRef Id='COPYING' />
|
||||
<ComponentRef Id='mercurial.rc' />
|
||||
<ComponentRef Id='mergetools.rc' />
|
||||
<ComponentRef Id='helpFolder' />
|
||||
<ComponentRef Id='HgCmd' />
|
||||
<ComponentGroupRef Id='templatesFolder' />
|
||||
<MergeRef Id='VCRuntime' />
|
||||
<MergeRef Id='VCRuntimePolicy' />
|
||||
|
Loading…
Reference in New Issue
Block a user