comparison contrib/packaging/hgpackaging/wix.py @ 41956:39f65c506899

wix: introduce variable to hold path to wix packaging directory For convenience. Differential Revision: https://phab.mercurial-scm.org/D6138
author Gregory Szorc <gregory.szorc@gmail.com>
date Thu, 14 Mar 2019 17:59:51 -0700
parents b83de9150c1c
children 131d0b7c3940
comparison
equal deleted inserted replaced
41955:9661a9c0695e 41956:39f65c506899
144 """ 144 """
145 arch = 'x64' if r'\x64' in os.environ.get('LIB', '') else 'x86' 145 arch = 'x64' if r'\x64' in os.environ.get('LIB', '') else 'x86'
146 146
147 hg_build_dir = source_dir / 'build' 147 hg_build_dir = source_dir / 'build'
148 dist_dir = source_dir / 'dist' 148 dist_dir = source_dir / 'dist'
149 149 wix_dir = source_dir / 'contrib' / 'packaging' / 'wix'
150 requirements_txt = (source_dir / 'contrib' / 'packaging' / 150
151 'wix' / 'requirements.txt') 151 requirements_txt = wix_dir / 'requirements.txt'
152 152
153 build_py2exe(source_dir, hg_build_dir, 153 build_py2exe(source_dir, hg_build_dir,
154 python_exe, 'wix', requirements_txt, 154 python_exe, 'wix', requirements_txt,
155 extra_packages=EXTRA_PACKAGES) 155 extra_packages=EXTRA_PACKAGES)
156 156
175 source_build_rel = pathlib.Path(os.path.relpath(source_dir, build_dir)) 175 source_build_rel = pathlib.Path(os.path.relpath(source_dir, build_dir))
176 176
177 defines = {'Platform': arch} 177 defines = {'Platform': arch}
178 178
179 for wxs, rel_path in SUPPORT_WXS: 179 for wxs, rel_path in SUPPORT_WXS:
180 wxs = source_dir / 'contrib' / 'packaging' / 'wix' / wxs 180 wxs = wix_dir / wxs
181 wxs_source_dir = source_dir / rel_path 181 wxs_source_dir = source_dir / rel_path
182 run_candle(wix_path, build_dir, wxs, wxs_source_dir, defines=defines) 182 run_candle(wix_path, build_dir, wxs, wxs_source_dir, defines=defines)
183 183
184 source = source_dir / 'contrib' / 'packaging' / 'wix' / 'mercurial.wxs' 184 source = wix_dir / 'mercurial.wxs'
185 defines['Version'] = version 185 defines['Version'] = version
186 defines['Comments'] = 'Installs Mercurial version %s' % version 186 defines['Comments'] = 'Installs Mercurial version %s' % version
187 defines['VCRedistSrcDir'] = str(hg_build_dir) 187 defines['VCRedistSrcDir'] = str(hg_build_dir)
188 188
189 run_candle(wix_path, build_dir, source, source_build_rel, defines=defines) 189 run_candle(wix_path, build_dir, source, source_build_rel, defines=defines)