Mercurial > hg-stable
changeset 13042:bd9bc4123920 stable
wix: add support for x64 native MSI packages
author | Steve Borho <steve@borho.org> |
---|---|
date | Fri, 26 Nov 2010 17:40:13 -0600 |
parents | 79388a8325dc |
children | cc40e4f49559 db1433e4bf5f |
files | contrib/wix/contrib.wxs contrib/wix/defines.wxi contrib/wix/dist.wxs contrib/wix/doc.wxs contrib/wix/help.wxs contrib/wix/i18n.wxs contrib/wix/locale.wxs contrib/wix/mercurial.wxs contrib/wix/templates.wxs |
diffstat | 9 files changed, 69 insertions(+), 37 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/wix/contrib.wxs Fri Nov 26 16:18:19 2010 -0600 +++ b/contrib/wix/contrib.wxs Fri Nov 26 17:40:13 2010 -0600 @@ -2,6 +2,7 @@ <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <?include guids.wxi ?> + <?include defines.wxi ?> <Fragment> <ComponentGroup Id="contribFolder"> @@ -13,7 +14,7 @@ <Fragment> <DirectoryRef Id="INSTALLDIR"> <Directory Id="contribdir" Name="contrib" FileSource="$(var.SourceDir)"> - <Component Id="contrib" Guid="$(var.contrib.guid)"> + <Component Id="contrib" Guid="$(var.contrib.guid)" Win64='$(var.IsX64)'> <File Name="bash_completion" KeyPath="yes" /> <File Name="hgk" /> <File Name="hgweb.fcgi" /> @@ -27,7 +28,7 @@ <File Name="zsh_completion" /> </Component> <Directory Id="vimdir" Name="vim"> - <Component Id="contrib.vim" Guid="$(var.contrib.vim.guid)"> + <Component Id="contrib.vim" Guid="$(var.contrib.vim.guid)" Win64='$(var.IsX64)'> <File Name="hg-menu.vim" KeyPath="yes" /> <File Name="HGAnnotate.vim" /> <File Name="hgcommand.vim" />
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/contrib/wix/defines.wxi Fri Nov 26 17:40:13 2010 -0600 @@ -0,0 +1,9 @@ +<Include> + + <?if $(var.Platform) = "x64" ?> + <?define IsX64 = yes ?> + <?else?> + <?define IsX64 = no ?> + <?endif?> + +</Include>
--- a/contrib/wix/dist.wxs Fri Nov 26 16:18:19 2010 -0600 +++ b/contrib/wix/dist.wxs Fri Nov 26 17:40:13 2010 -0600 @@ -2,10 +2,11 @@ <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <?include guids.wxi ?> + <?include defines.wxi ?> <Fragment> <DirectoryRef Id="INSTALLDIR" FileSource="$(var.SourceDir)"> - <Component Id="distOutput" Guid="$(var.dist.guid)"> + <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" />
--- a/contrib/wix/doc.wxs Fri Nov 26 16:18:19 2010 -0600 +++ b/contrib/wix/doc.wxs Fri Nov 26 17:40:13 2010 -0600 @@ -2,6 +2,7 @@ <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <?include guids.wxi ?> + <?include defines.wxi ?> <Fragment> <ComponentGroup Id="docFolder"> @@ -15,7 +16,7 @@ <Fragment> <DirectoryRef Id="INSTALLDIR"> <Directory Id="docdir" Name="doc" FileSource="$(var.SourceDir)"> - <Component Id="doc.hg.1.html" Guid="$(var.doc.hg.1.html.guid)"> + <Component Id="doc.hg.1.html" Guid="$(var.doc.hg.1.html.guid)" Win64='$(var.IsX64)'> <File Name="hg.1.html" KeyPath="yes"> <Shortcut Id="hg1StartMenu" Directory="ProgramMenuDir" Name="Mercurial Command Reference" @@ -23,7 +24,7 @@ /> </File> </Component> - <Component Id="doc.hgignore.5.html" Guid="$(var.doc.hgignore.5.html.guid)"> + <Component Id="doc.hgignore.5.html" Guid="$(var.doc.hgignore.5.html.guid)" Win64='$(var.IsX64)'> <File Name="hgignore.5.html" KeyPath="yes"> <Shortcut Id="hgignore5StartMenu" Directory="ProgramMenuDir" Name="Mercurial Ignore Files" @@ -31,7 +32,7 @@ /> </File> </Component> - <Component Id="doc.hgrc.5.html" Guid="$(var.doc.hgrc.5.html)"> + <Component Id="doc.hgrc.5.html" Guid="$(var.doc.hgrc.5.html)" Win64='$(var.IsX64)'> <File Name="hgrc.5.html" KeyPath="yes"> <Shortcut Id="hgrc5StartMenu" Directory="ProgramMenuDir" Name="Mercurial Configuration Files" @@ -39,7 +40,7 @@ /> </File> </Component> - <Component Id="doc.style.css" Guid="$(var.doc.style.css)"> + <Component Id="doc.style.css" Guid="$(var.doc.style.css)" Win64='$(var.IsX64)'> <File Name="style.css" KeyPath="yes" /> </Component> </Directory>
--- a/contrib/wix/help.wxs Fri Nov 26 16:18:19 2010 -0600 +++ b/contrib/wix/help.wxs Fri Nov 26 17:40:13 2010 -0600 @@ -2,11 +2,12 @@ <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <?include guids.wxi ?> + <?include defines.wxi ?> <Fragment> <DirectoryRef Id="INSTALLDIR"> <Directory Id="helpdir" Name="help" FileSource="$(var.SourceDir)"> - <Component Id="helpFolder" Guid="$(var.helpFolder.guid)"> + <Component Id="helpFolder" Guid="$(var.helpFolder.guid)" Win64='$(var.IsX64)'> <File Name="config.txt" KeyPath="yes" /> <File Name="dates.txt" /> <File Name="diffs.txt" />
--- a/contrib/wix/i18n.wxs Fri Nov 26 16:18:19 2010 -0600 +++ b/contrib/wix/i18n.wxs Fri Nov 26 17:40:13 2010 -0600 @@ -2,6 +2,7 @@ <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <?include guids.wxi ?> + <?include defines.wxi ?> <?define hg_po_langs = da;de;el;fr;it;ja;pt_BR;sv;zh_CN;zh_TW @@ -10,7 +11,7 @@ <Fragment> <DirectoryRef Id="INSTALLDIR"> <Directory Id="i18ndir" Name="i18n" FileSource="$(var.SourceDir)"> - <Component Id="i18nFolder" Guid="$(var.i18nFolder.guid)"> + <Component Id="i18nFolder" Guid="$(var.i18nFolder.guid)" Win64='$(var.IsX64)'> <File Name="hggettext" KeyPath="yes" /> <?foreach LANG in $(var.hg_po_langs) ?> <File Id="hg.$(var.LANG).po"
--- a/contrib/wix/locale.wxs Fri Nov 26 16:18:19 2010 -0600 +++ b/contrib/wix/locale.wxs Fri Nov 26 17:40:13 2010 -0600 @@ -1,6 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> + <?include defines.wxi ?> + <?define hglocales = da;de;el;fr;it;ja;pt_BR;sv;zh_CN;zh_TW ?> @@ -19,7 +21,7 @@ <?foreach LOC in $(var.hglocales) ?> <Directory Id="hg.locale.$(var.LOC)" Name="$(var.LOC)"> <Directory Id="hg.locale.$(var.LOC).LC_MESSAGES" Name="LC_MESSAGES"> - <Component Id="hg.locale.$(var.LOC)" Guid="*"> + <Component Id="hg.locale.$(var.LOC)" Guid="*" Win64='$(var.IsX64)'> <File Id="hg.mo.$(var.LOC)" Name="hg.mo" KeyPath="yes" /> </Component> </Directory>
--- a/contrib/wix/mercurial.wxs Fri Nov 26 16:18:19 2010 -0600 +++ b/contrib/wix/mercurial.wxs Fri Nov 26 17:40:13 2010 -0600 @@ -7,15 +7,16 @@ GNU General Public License version 2 or any later version. --> <?include guids.wxi ?> + <?include defines.wxi ?> <?if $(var.Platform) = "x64" ?> - <?define IsX64 = yes ?> + <?define PFolder = ProgramFiles64Folder ?> <?else?> - <?define IsX64 = no ?> + <?define PFolder = ProgramFilesFolder ?> <?endif?> <Product Id='*' - Name='Mercurial $(var.Version)' + Name='Mercurial $(var.Version) ($(var.Platform))' UpgradeCode='$(var.ProductUpgradeCode)' Language='1033' Codepage='1252' Version='$(var.Version)' Manufacturer='Matt Mackall and others'> @@ -24,6 +25,7 @@ Keywords='Installer' Description="Mercurial distributed SCM (version $(var.Version))" Comments='$(var.Comments)' + Platform='$(var.Platform)' Manufacturer='Matt Mackall and others' InstallerVersion='300' Languages='1033' Compressed='yes' SummaryCodepage='1252' /> @@ -31,8 +33,14 @@ CompressionLevel='high' /> <Property Id='DiskPrompt' Value="Mercurial $(var.Version) Installation [1]" /> - <Condition Message='Mercurial requires Windows XP or higher' - >VersionNT >= 501</Condition> + <?if $(var.Platform) = "x86" ?> + <Condition Message = "This x86 installer may not be used on a x64 platform"> + NOT VersionNT64 + </Condition> + <?endif?> + <Condition Message='Mercurial MSI installers require Windows XP or higher'> + VersionNT >= 501 + </Condition> <Property Id="INSTALLDIR"> <ComponentSearch Id='SearchForMainExecutableComponent' @@ -54,35 +62,35 @@ <Property Id='LicenseAccepted'>1</Property> <Directory Id='TARGETDIR' Name='SourceDir'> - <Directory Id='ProgramFilesFolder' Name='PFiles'> + <Directory Id='$(var.PFolder)' Name='PFiles'> <Directory Id='INSTALLDIR' Name='Mercurial'> - <Component Id='MainExecutable' Guid='$(var.ComponentMainExecutableGUID)'> + <Component Id='MainExecutable' Guid='$(var.ComponentMainExecutableGUID)' Win64='$(var.IsX64)'> <File Id='hgEXE' Name='hg.exe' Source='dist\hg.exe' KeyPath='yes' /> <Environment Id="Environment" Name="PATH" Part="last" System="yes" Permanent="no" Value="[INSTALLDIR]bin" Action="set" /> </Component> - <Component Id='ReadMe' Guid='$(var.ReadMe.guid)'> + <Component Id='ReadMe' Guid='$(var.ReadMe.guid)' Win64='$(var.IsX64)'> <File Id='ReadMe' Name='ReadMe.html' Source='contrib\win32\ReadMe.html' KeyPath='yes'/> </Component> - <Component Id='COPYING' Guid='$(var.COPYING.guid)'> + <Component Id='COPYING' Guid='$(var.COPYING.guid)' Win64='$(var.IsX64)'> <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)'> + <Component Id='mercurial.rc' Guid='$(var.mercurial.rc.guid)' Win64='$(var.IsX64)'> <File Id='mercurial.rc' Name='Mercurial.rc' Source='contrib\win32\mercurial.ini' ReadOnly='yes' KeyPath='yes'/> </Component> - <Component Id='mergetools.rc' Guid='$(var.mergetools.rc.guid)'> + <Component Id='mergetools.rc' Guid='$(var.mergetools.rc.guid)' Win64='$(var.IsX64)'> <File Id='mergetools.rc' Name='MergeTools.rc' Source='contrib\mergetools.hgrc' ReadOnly='yes' KeyPath='yes'/> </Component> </Directory> <Directory Id='binFolder' Name='bin'> - <Component Id='HgCmd' Guid='$(var.hgcmd.guid)'> + <Component Id='HgCmd' Guid='$(var.hgcmd.guid)' Win64='$(var.IsX64)'> <File Id='Hg.Cmd' Name='hg.cmd' KeyPath='yes' Source='contrib\wix\hg.cmd' /> </Component> </Directory> @@ -91,7 +99,7 @@ <Directory Id="ProgramMenuFolder" Name="Programs"> <Directory Id="ProgramMenuDir" Name="Mercurial $(var.Version)"> - <Component Id="ProgramMenuDir" Guid="$(var.ProgramMenuDir.guid)"> + <Component Id="ProgramMenuDir" Guid="$(var.ProgramMenuDir.guid)" Win64='$(var.IsX64)'> <RemoveFolder Id='ProgramMenuDir' On='uninstall' /> <RegistryValue Root='HKCU' Key='Software\Mercurial\InstallDir' Type='string' Value='[INSTALLDIR]' KeyPath='yes' /> @@ -101,10 +109,17 @@ </Directory> </Directory> - <Merge Id='VCRuntime' DiskId='1' Language='1033' - SourceFile='$(var.VCRedistSrcDir)\microsoft.vcxx.crt.x86_msm.msm' /> - <Merge Id='VCRuntimePolicy' DiskId='1' Language='1033' - SourceFile='$(var.VCRedistSrcDir)\policy.x.xx.microsoft.vcxx.crt.x86_msm.msm' /> + <?if $(var.Platform) = "x86" ?> + <Merge Id='VCRuntime' DiskId='1' Language='1033' + SourceFile='$(var.VCRedistSrcDir)\microsoft.vcxx.crt.x86_msm.msm' /> + <Merge Id='VCRuntimePolicy' DiskId='1' Language='1033' + SourceFile='$(var.VCRedistSrcDir)\policy.x.xx.microsoft.vcxx.crt.x86_msm.msm' /> + <?else?> + <Merge Id='VCRuntime' DiskId='1' Language='1033' + SourceFile='$(var.VCRedistSrcDir)\microsoft.vcxx.crt.x64_msm.msm' /> + <Merge Id='VCRuntimePolicy' DiskId='1' Language='1033' + SourceFile='$(var.VCRedistSrcDir)\policy.x.xx.microsoft.vcxx.crt.x64_msm.msm' /> + <?endif?> </Directory> <Feature Id='Complete' Title='Mercurial' Description='The complete package'
--- a/contrib/wix/templates.wxs Fri Nov 26 16:18:19 2010 -0600 +++ b/contrib/wix/templates.wxs Fri Nov 26 17:40:13 2010 -0600 @@ -2,6 +2,7 @@ <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <?include guids.wxi ?> + <?include defines.wxi ?> <Fragment> <ComponentGroup Id="templatesFolder"> @@ -26,7 +27,7 @@ <Directory Id="templatesdir" Name="templates" FileSource="$(var.SourceDir)"> - <Component Id="templates.root" Guid="$(var.templates.root.guid)"> + <Component Id="templates.root" Guid="$(var.templates.root.guid)" Win64='$(var.IsX64)'> <File Name="map-cmdline.changelog" KeyPath="yes" /> <File Name="map-cmdline.compact" /> <File Name="map-cmdline.default" /> @@ -35,7 +36,7 @@ </Component> <Directory Id="templates.atomdir" Name="atom"> - <Component Id="templates.atom" Guid="$(var.templates.atom.guid)"> + <Component Id="templates.atom" Guid="$(var.templates.atom.guid)" Win64='$(var.IsX64)'> <File Id="atom.changelog.tmpl" Name="changelog.tmpl" KeyPath="yes" /> <File Id="atom.changelogentry.tmpl" Name="changelogentry.tmpl" /> <File Id="atom.error.tmpl" Name="error.tmpl" /> @@ -48,14 +49,14 @@ </Directory> <Directory Id="templates.coaldir" Name="coal"> - <Component Id="templates.coal" Guid="$(var.templates.coal.guid)"> + <Component Id="templates.coal" Guid="$(var.templates.coal.guid)" Win64='$(var.IsX64)'> <File Id="coal.header.tmpl" Name="header.tmpl" KeyPath="yes" /> <File Id="coal.map" Name="map" /> </Component> </Directory> <Directory Id="templates.gitwebdir" Name="gitweb"> - <Component Id="templates.gitweb" Guid="$(var.templates.gitweb.guid)"> + <Component Id="templates.gitweb" Guid="$(var.templates.gitweb.guid)" Win64='$(var.IsX64)'> <File Id="gitweb.branches.tmpl" Name="branches.tmpl" KeyPath="yes" /> <File Id="gitweb.changelog.tmpl" Name="changelog.tmpl" /> <File Id="gitweb.changelogentry.tmpl" Name="changelogentry.tmpl" /> @@ -82,7 +83,7 @@ </Directory> <Directory Id="templates.monobluedir" Name="monoblue"> - <Component Id="templates.monoblue" Guid="$(var.templates.monoblue.guid)"> + <Component Id="templates.monoblue" Guid="$(var.templates.monoblue.guid)" Win64='$(var.IsX64)'> <File Id="monoblue.branches.tmpl" Name="branches.tmpl" KeyPath="yes" /> <File Id="monoblue.changelog.tmpl" Name="changelog.tmpl" /> <File Id="monoblue.changelogentry.tmpl" Name="changelogentry.tmpl" /> @@ -109,7 +110,7 @@ </Directory> <Directory Id="templates.paperdir" Name="paper"> - <Component Id="templates.paper" Guid="$(var.templates.paper.guid)"> + <Component Id="templates.paper" Guid="$(var.templates.paper.guid)" Win64='$(var.IsX64)'> <File Id="paper.branches.tmpl" Name="branches.tmpl" KeyPath="yes" /> <File Id="paper.changeset.tmpl" Name="changeset.tmpl" /> <File Id="paper.error.tmpl" Name="error.tmpl" /> @@ -135,7 +136,7 @@ </Directory> <Directory Id="templates.rawdir" Name="raw"> - <Component Id="templates.raw" Guid="$(var.templates.raw.guid)"> + <Component Id="templates.raw" Guid="$(var.templates.raw.guid)" Win64='$(var.IsX64)'> <File Id="raw.changeset.tmpl" Name="changeset.tmpl" KeyPath="yes" /> <File Id="raw.error.tmpl" Name="error.tmpl" /> <File Id="raw.fileannotate.tmpl" Name="fileannotate.tmpl" /> @@ -148,7 +149,7 @@ </Directory> <Directory Id="templates.rssdir" Name="rss"> - <Component Id="templates.rss" Guid="$(var.templates.rss.guid)"> + <Component Id="templates.rss" Guid="$(var.templates.rss.guid)" Win64='$(var.IsX64)'> <File Id="rss.changelog.tmpl" Name="changelog.tmpl" KeyPath="yes" /> <File Id="rss.changelogentry.tmpl" Name="changelogentry.tmpl" /> <File Id="rss.error.tmpl" Name="error.tmpl" /> @@ -162,7 +163,7 @@ </Directory> <Directory Id="templates.spartandir" Name="spartan"> - <Component Id="templates.spartan" Guid="$(var.templates.spartan.guid)"> + <Component Id="templates.spartan" Guid="$(var.templates.spartan.guid)" Win64='$(var.IsX64)'> <File Id="spartan.branches.tmpl" Name="branches.tmpl" KeyPath="yes" /> <File Id="spartan.changelog.tmpl" Name="changelog.tmpl" /> <File Id="spartan.changelogentry.tmpl" Name="changelogentry.tmpl" /> @@ -188,7 +189,7 @@ </Directory> <Directory Id="templates.staticdir" Name="static"> - <Component Id="templates.static" Guid="$(var.templates.static.guid)"> + <Component Id="templates.static" Guid="$(var.templates.static.guid)" Win64='$(var.IsX64)'> <File Id="static.background.png" Name="background.png" KeyPath="yes" /> <File Id="static.coal.file.png" Name="coal-file.png" /> <File Id="static.coal.folder.png" Name="coal-folder.png" />