Set product code based app_name and version

This might fix upgrading of alpha versions

Contribute to CURA-9157
This commit is contained in:
Jelle Spijker 2023-01-10 17:00:09 +01:00
parent 81cb75ebd7
commit f99aeb9182
2 changed files with 5 additions and 2 deletions

View file

@ -1,14 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:fw="http://schemas.microsoft.com/wix/FirewallExtension">
<Product
Id="*"
Id="{{ product_code }}"
Name="{{ app_name }}"
Language="1033"
Version="{{ version_major }}.{{ version_minor }}.{{ version_patch }}"
Manufacturer="{{ company }}"
UpgradeCode="{{ upgrade_code }}"
>
<Package InstallerVersion="500"
<Package
Id="*"
InstallerVersion="500"
Compressed="yes"
InstallScope="perMachine"
Manufacturer="{{ company }}"

View file

@ -40,6 +40,7 @@ def generate_wxs(source_path: Path, dist_path: Path, filename: Path, app_name: s
company="UltiMaker",
web_site="https://ultimaker.com",
year=datetime.now().year,
product_code=str(uuid.uuid5(uuid.NAMESPACE_DNS, app_name + os.environ.get("CURA_VERSION_MAJOR") + os.environ.get("CURA_VERSION_MINOR"))),
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")),