diff contrib/packaging/hgpackaging/wix.py @ 44769:9ade217b550d stable

packaging: add -python2 to Windows installer filenames We just taught the Windows installers to produce Python 3 variants built with PyOxidizer. Our plan is to publish both Python 2 and Python 3 versions of the installers for Mercurial 5.4. This commit teaches the Inno and WiX installers to add an optional string suffix to the installer name. On Python 2, that suffix is "-python2." We reserve the existing name for the Python 3 installers, which we want to make the default. Differential Revision: https://phab.mercurial-scm.org/D8479
author Gregory Szorc <gregory.szorc@gmail.com>
date Thu, 23 Apr 2020 18:48:36 -0700
parents 234882d17814
children 439ce34d81e6
line wrap: on
line diff
--- a/contrib/packaging/hgpackaging/wix.py	Thu Apr 23 17:24:37 2020 -0700
+++ b/contrib/packaging/hgpackaging/wix.py	Thu Apr 23 18:48:36 2020 -0700
@@ -358,6 +358,7 @@
         version=version,
         python2=True,
         msi_name=msi_name,
+        suffix="-python2",
         extra_wxs=extra_wxs,
         extra_features=extra_features,
         signing_info=signing_info,
@@ -415,6 +416,7 @@
     version: str,
     python2: bool,
     msi_name: typing.Optional[str] = "mercurial",
+    suffix: str = "",
     extra_wxs: typing.Optional[typing.Dict[str, str]] = None,
     extra_features: typing.Optional[typing.List[str]] = None,
     signing_info: typing.Optional[typing.Dict[str, str]] = None,
@@ -489,7 +491,9 @@
     run_candle(wix_path, build_dir, source, source_build_rel, defines=defines)
 
     msi_path = (
-        source_dir / 'dist' / ('%s-%s-%s.msi' % (msi_name, orig_version, arch))
+        source_dir
+        / 'dist'
+        / ('%s-%s-%s%s.msi' % (msi_name, orig_version, arch, suffix))
     )
 
     args = [