Merge remote-tracking branch 'origin/CURA-9157_msi_installer' into CURA-9157_msi_installer

This commit is contained in:
Casper Lamboo 2022-12-19 16:48:11 +01:00
commit b8788333d2
5 changed files with 22 additions and 35 deletions

View File

@ -1,22 +0,0 @@
<?xml version='1.0' encoding='windows-1252'?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<UI>
<Dialog Id="ManageOldCuraDlg" Width="370" Height="270" Title="[ProductName] [Setup]" NoMinimize="yes">
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="&amp;Next">
<Publish Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
</Control>
<Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Default="no" Text="&amp;Back">
<Publish Event="NewDialog" Value="CustomizeDlg">1</Publish>
</Control>
<Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="WixUI_Bmp_Banner" />
<Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
<Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes">
<Text>{\WixUI_Font_Title}Manage installed versions</Text>
</Control>
<Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
<Control Id="DesktopShortcutCheckBox" Type="CheckBox" X="20" Y="160" Width="290" Height="17" Property="PREVIOUS_VERSIONS_INSTALLED" CheckBoxValue="0" Text="Uninstall previous Cura versions." />
</Dialog>
</UI>
</Fragment>
</Wix>

View File

@ -49,10 +49,17 @@
<UI Id="MyWixUI_Mondo">
<UIRef Id="WixUI_Mondo" />
<DialogRef Id="ManageOldCuraDlg" />
<DialogRef Id="CustomizeCuraDlg" />
<Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="ManageOldCuraDlg">1</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="ManageOldCuraDlg" Order="1">WixUI_InstallMode = "InstallCustom"</Publish>
<Publish Dialog="SetupTypeDlg" Control="CustomButton" Event="NewDialog" Value="CustomizeCuraDlg">1</Publish>
<Publish Dialog="CustomizeCuraDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="1">WixUI_InstallMode = "Change"</Publish>
<Publish Dialog="CustomizeCuraDlg" Control="Back" Event="NewDialog" Value="SetupTypeDlg" Order="2">WixUI_InstallMode = "InstallCustom"</Publish>
<Publish Dialog="CustomizeCuraDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="CustomizeCuraDlg" Order="1">WixUI_InstallMode = "InstallCustom"</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="CustomizeCuraDlg" Order="3">WixUI_InstallMode = "Change"</Publish>
<Publish Dialog="MaintenanceTypeDlg" Control="ChangeButton" Event="NewDialog" Value="CustomizeCuraDlg">1</Publish>
</UI>
<UIRef Id="WixUI_ErrorProgressText" />
@ -60,25 +67,26 @@
<WixVariable Id="WixUILicenseRtf" Value="{{ cura_license_file }}" />
<WixVariable Id="WixUIDialogBmp" Value="{{ cura_banner_side }}" />
<WixVariable Id="WixUIBannerBmp" Value="{{ cura_banner_top }}" />
<Icon Id="ICO_Cura" SourceFile="{{ cura_icon }}" />
<Property Id="ApplicationFolderName" Value="{{ app_name }} {{ version }}" />
<Icon Id="ICO_Cura" SourceFile="{{ cura_icon }}" />
<Property Id="ARPPRODUCTICON" Value="ICO_Cura" />
<Property Id="WixAppFolder" Value="WixPerMachineFolder" />
<!--Directory structure-->
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFiles64Folder">
<Directory Id="APPLICATIONFOLDER" Name="{{ app_name }} {{ version }}" />
<Directory Id="ProgramMenuFolder">
<Directory Id="ShortCutDir" Name="{{ app_name }}" />
</Directory>
</Directory>
<Directory Id="ProgramMenuFolder">
<Directory Id="ShortCutDir" Name="{{ app_name }}" />
</Directory>
</Directory>
<Property Id="ApplicationFolderName" Value="{{ app_name }} {{ version }}" />
<Property Id="WixAppFolder" Value="WixPerMachineFolder" />
<!--Shortcuts-->
<DirectoryRef Id="ShortCutDir">
<Component Id="CMP_Shortcuts" Guid="33741C82-30BF-41AF-8246-4422DCF22953">
<Component Id="CMP_Shortcuts" Guid="{{ shortcut_uuid }}">
<Shortcut Id="SHRT_Cura"
Name="{{ app_name }} {{ version }}"
Description="{{ app_name }} {{ version }}"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 601 KiB

After

Width:  |  Height:  |  Size: 451 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 84 KiB

View File

@ -41,6 +41,7 @@ def generate_wxs(source_path: Path, dist_path: Path, filename: Path, app_name: s
web_site="https://ultimaker.com",
year=datetime.now().year,
upgrade_code=str(uuid.uuid5(uuid.NAMESPACE_DNS, app_name)),
shortcut_uuid=str(uuid.uuid5(uuid.NAMESPACE_DNS, f"Shortcut {app_name}")),
cura_license_file=str(source_loc.joinpath("packaging", "msi", "cura_license.rtf")),
cura_banner_top=str(source_loc.joinpath("packaging", "msi", "banner_top.bmp")),
cura_banner_side=str(source_loc.joinpath("packaging", "msi", "banner_side.bmp")),
@ -51,8 +52,8 @@ def generate_wxs(source_path: Path, dist_path: Path, filename: Path, app_name: s
f.write(wxs_content)
try:
shutil.copy(source_loc.joinpath("packaging", "msi", "ManageOldCuraDlg.wxs"),
work_loc.joinpath("ManageOldCuraDlg.wxs"))
shutil.copy(source_loc.joinpath("packaging", "msi", "CustomizeCuraDlg.wxs"),
work_loc.joinpath("CustomizeCuraDlg.wxs"))
except shutil.SameFileError:
pass
@ -62,7 +63,7 @@ def build(dist_path: Path, filename: str):
work_loc = work_path(filename)
wxs_loc = work_loc.joinpath("UltiMaker-Cura.wxs")
heat_loc = work_loc.joinpath("HeatFile.wxs")
manageoldcuradlg_loc = work_loc.joinpath("ManageOldCuraDlg.wxs")
manageoldcuradlg_loc = work_loc.joinpath("CustomizeCuraDlg.wxs")
build_loc = work_loc.joinpath("build_msi")
heat_command = ["heat", "dir", f"{dist_loc.as_posix()}\\", "-dr", "APPLICATIONFOLDER", "-cg", "NewFilesGroup",