Uninstall previous versions as a feature

Contributes to CURA-9157
This commit is contained in:
Jelle Spijker 2023-01-12 17:14:27 +01:00
parent 37725db5e3
commit dc2a8ffc60
3 changed files with 8 additions and 86 deletions

View file

@ -51,12 +51,6 @@ def generate_wxs(source_path: Path, dist_path: Path, filename: Path, app_name: s
with open(work_loc.joinpath("UltiMaker-Cura.wxs"), "w") as f:
f.write(wxs_content)
try:
shutil.copy(source_loc.joinpath("packaging", "msi", "CustomizeCuraDlg.wxs"),
work_loc.joinpath("CustomizeCuraDlg.wxs"))
except shutil.SameFileError:
pass
try:
shutil.copy(source_loc.joinpath("packaging", "msi", "ExcludeComponents.xslt"),
work_loc.joinpath("ExcludeComponents.xslt"))
@ -79,7 +73,6 @@ def build(dist_path: Path, filename: Path):
wxs_loc = work_loc.joinpath("UltiMaker-Cura.wxs")
heat_loc = work_loc.joinpath("HeatFile.wxs")
exclude_components_loc = work_loc.joinpath("ExcludeComponents.xslt")
manageoldcuradlg_loc = work_loc.joinpath("CustomizeCuraDlg.wxs")
build_loc = work_loc.joinpath("build_msi")
heat_command = ["heat",
@ -102,14 +95,12 @@ def build(dist_path: Path, filename: Path):
"-ext", "WixFirewallExtension",
"-out", f"{build_loc.as_posix()}\\",
f"{wxs_loc.as_posix()}",
f"{heat_loc.as_posix()}",
f"{manageoldcuradlg_loc.as_posix()}"]
f"{heat_loc.as_posix()}"]
subprocess.call(build_command)
link_command = ["light",
f"{build_loc.joinpath(wxs_loc.name).with_suffix('.wixobj')}",
f"{build_loc.joinpath(heat_loc.name).with_suffix('.wixobj')}",
f"{build_loc.joinpath(manageoldcuradlg_loc.name).with_suffix('.wixobj')}",
"-sw1076", # Don't pollute logs with warnings from auto generated content
"-dcl:high", # Use high compression ratio
"-sval", # Disable ICE validation otherwise the CI complains