1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-06-06 02:13:41 +03:00

WiX: Autogeneration of EDMarketConnector.wxs fully working

* Changed config version to 5.3.0-beta2 to be sure during testing.
* Fixed the case on ChangeLog.md in setup.py py2exe config.
* Replaced all TABs with <4 spaces> in wix/template.wxs.
* Now generating the correct Feature tree in the output file.  NB: The
  'RegistryEntries' isn't part of the file Components but still needs to
  be referenced inside <Feature>.
This commit is contained in:
Athanasius 2021-12-07 16:48:11 +00:00
parent 0af2af344d
commit a196bfe172
No known key found for this signature in database
GPG Key ID: AE3E527847057C7D
3 changed files with 123 additions and 99 deletions

View File

@ -33,7 +33,7 @@ appcmdname = 'EDMC'
# <https://semver.org/#semantic-versioning-specification-semver>
# Major.Minor.Patch(-prerelease)(+buildmetadata)
# NB: Do *not* import this, use the functions appversion() and appversion_nobuild()
_static_appversion = '5.3.0-beta1'
_static_appversion = '5.3.0-beta2'
_cached_version: Optional[semantic_version.Version] = None
copyright = '© 2015-2019 Jonathan Harris, 2020-2021 EDCD'

View File

@ -212,7 +212,7 @@ elif sys.platform == 'win32':
'WinSparkle.dll',
'WinSparkle.pdb', # For debugging - don't include in package
'EUROCAPS.TTF',
'Changelog.md',
'ChangeLog.md',
'commodity.csv',
'rare_commodity.csv',
'snd_good.wav',
@ -351,6 +351,30 @@ elif sys.platform == 'win32':
program_files_folder.insert(0, directory_win32)
# Append the Feature/ComponentRef listing to match
feature = template_tree.find('.//{*}Feature[@Id="Complete"][@Level="1"]')
if feature is None:
raise ValueError(f'{template_file}: Expected Feature element with Id="Complete" Level="1"')
# This isn't part of the components
feature.append(
etree.Element(
'ComponentRef',
attrib={
'Id': 'RegistryEntries'
},
nsmap=directory_win32.nsmap
)
)
for c in directory_win32.findall('.//{*}Component'):
feature.append(
etree.Element(
'ComponentRef',
attrib={
'Id': c.get('Id')
},
nsmap=directory_win32.nsmap
)
)
# Insert what we now have into the template and write it out
template_tree.write(