Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance(bundler/wix): generate consistent product code for MSI installer derived from identifier #10969

Merged
merged 4 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changes/wix-consistent-product-code.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"tauri-bundler": "patch:enhance"
---

Generate a consitent Product code for MSI installer derived from `identifier` instead of generating random one each build.
lucasfernog marked this conversation as resolved.
Show resolved Hide resolved

1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions crates/tauri-bundler/src/bundle/windows/msi/wix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,12 @@ pub fn build_wix_app_installer(
.to_string();

data.insert("upgrade_code", to_json(upgrade_code.as_str()));
let product_code = Uuid::new_v5(
&Uuid::NAMESPACE_DNS,
&settings.bundle_identifier().as_bytes(),
)
.to_string();
data.insert("product_code", to_json(product_code.as_str()));
data.insert(
"allow_downgrades",
to_json(settings.windows().allow_downgrades),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product
Id="*"
Id="{{product_code}}"
Name="{{product_name}}"
UpgradeCode="{{upgrade_code}}"
Language="!(loc.TauriLanguage)"
Expand Down