From 7eb1171e3a2eb7bc5085ff28fc8610e5af82bdd5 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Thu, 12 Sep 2024 15:22:27 +0300 Subject: [PATCH] fix(bundler/wix): use product name to generate `UpgradeCode` for MSI (#10967) The upgrade code generation was changed due to an accidental regression in #9375. Previously `UpgradeCode` was calculated using the main binary name which was `.exe`, but #9375 changed the default main binary name to `.exe` and thus a different UpgradeCode was generetad. This PR reverts this change to use product name for `UpgradeCode` generation. --- .changes/wix-upgrade-code-regression.md | 5 +++++ crates/tauri-bundler/src/bundle/windows/msi/wix.rs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changes/wix-upgrade-code-regression.md diff --git a/.changes/wix-upgrade-code-regression.md b/.changes/wix-upgrade-code-regression.md new file mode 100644 index 000000000..77b2326b2 --- /dev/null +++ b/.changes/wix-upgrade-code-regression.md @@ -0,0 +1,5 @@ +--- +"tauri-bundler": "patch:bug" +--- + +Fix generated `UpgradeCode` for MSI not matching MSI installers created with tauri-bundler@v1. diff --git a/crates/tauri-bundler/src/bundle/windows/msi/wix.rs b/crates/tauri-bundler/src/bundle/windows/msi/wix.rs index 7e0f6d2b8..362ca1ff8 100644 --- a/crates/tauri-bundler/src/bundle/windows/msi/wix.rs +++ b/crates/tauri-bundler/src/bundle/windows/msi/wix.rs @@ -524,7 +524,7 @@ pub fn build_wix_app_installer( data.insert("manufacturer", to_json(manufacturer)); let upgrade_code = Uuid::new_v5( &Uuid::NAMESPACE_DNS, - format!("{}.app.x64", &settings.main_binary_name()).as_bytes(), + format!("{}.exe.app.x64", &settings.product_name()).as_bytes(), ) .to_string();