wix: introduce variable to hold path to wix packaging directory
authorGregory Szorc <gregory.szorc@gmail.com>
Thu, 14 Mar 2019 17:59:51 -0700
changeset 41961 39f65c506899
parent 41960 9661a9c0695e
child 41962 131d0b7c3940
wix: introduce variable to hold path to wix packaging directory For convenience. Differential Revision: https://phab.mercurial-scm.org/D6138
contrib/packaging/hgpackaging/wix.py
--- a/contrib/packaging/hgpackaging/wix.py	Thu Mar 14 18:25:23 2019 -0700
+++ b/contrib/packaging/hgpackaging/wix.py	Thu Mar 14 17:59:51 2019 -0700
@@ -146,9 +146,9 @@
 
     hg_build_dir = source_dir / 'build'
     dist_dir = source_dir / 'dist'
+    wix_dir = source_dir / 'contrib' / 'packaging' / 'wix'
 
-    requirements_txt = (source_dir / 'contrib' / 'packaging' /
-                        'wix' / 'requirements.txt')
+    requirements_txt = wix_dir / 'requirements.txt'
 
     build_py2exe(source_dir, hg_build_dir,
                  python_exe, 'wix', requirements_txt,
@@ -177,11 +177,11 @@
     defines = {'Platform': arch}
 
     for wxs, rel_path in SUPPORT_WXS:
-        wxs = source_dir / 'contrib' / 'packaging' / 'wix' / wxs
+        wxs = wix_dir / wxs
         wxs_source_dir = source_dir / rel_path
         run_candle(wix_path, build_dir, wxs, wxs_source_dir, defines=defines)
 
-    source = source_dir / 'contrib' / 'packaging' / 'wix' / 'mercurial.wxs'
+    source = wix_dir / 'mercurial.wxs'
     defines['Version'] = version
     defines['Comments'] = 'Installs Mercurial version %s' % version
     defines['VCRedistSrcDir'] = str(hg_build_dir)