From dc2a8ffc60dea3c70e25c9ebc597ce938027baaf Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Thu, 12 Jan 2023 17:14:27 +0100 Subject: [PATCH] Uninstall previous versions as a feature Contributes to CURA-9157 --- packaging/msi/CustomizeCuraDlg.wxs | 56 -------------------------- packaging/msi/UltiMaker-Cura.wxs.jinja | 27 ++++--------- packaging/msi/create_windows_msi.py | 11 +---- 3 files changed, 8 insertions(+), 86 deletions(-) delete mode 100644 packaging/msi/CustomizeCuraDlg.wxs diff --git a/packaging/msi/CustomizeCuraDlg.wxs b/packaging/msi/CustomizeCuraDlg.wxs deleted file mode 100644 index 9214ae7693..0000000000 --- a/packaging/msi/CustomizeCuraDlg.wxs +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - 1 - Installed - Installed - - - 1 - - - - 1 - - - - - - - - 1 - - - - - - - - - - - - - - - - - - - Installed - - - - Installed - - - - - \ No newline at end of file diff --git a/packaging/msi/UltiMaker-Cura.wxs.jinja b/packaging/msi/UltiMaker-Cura.wxs.jinja index 8cde050497..fad969171f 100644 --- a/packaging/msi/UltiMaker-Cura.wxs.jinja +++ b/packaging/msi/UltiMaker-Cura.wxs.jinja @@ -19,10 +19,12 @@ Comments="Copyright (c) {{ year }} {{ company }}" /> - + + + - + @@ -48,23 +50,7 @@ - - - - - - 1 - - WixUI_InstallMode = "Change" - WixUI_InstallMode = "InstallCustom" - 1 - - WixUI_InstallMode = "InstallCustom" - WixUI_InstallMode = "Change" - 1 - - - + @@ -164,5 +150,6 @@ + \ No newline at end of file diff --git a/packaging/msi/create_windows_msi.py b/packaging/msi/create_windows_msi.py index 6f1f52c3d1..d57537a009 100644 --- a/packaging/msi/create_windows_msi.py +++ b/packaging/msi/create_windows_msi.py @@ -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