mirror of https://github.com/tauri-apps/tauri
enhance(bundler/wix): generate consistent product code for MSI installer derived from identifier (#10969)
* enhance(bundler/wix): generate consistent product code for MSI installer derived from identifier * Update .changes/wix-consistent-product-code.md [skip ci] * Update .changes/wix-consistent-product-code.md [skip ci] --------- Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app>
This commit is contained in:
parent
fe5ff1228c
commit
a1e88d2b57
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
"tauri-bundler": "patch:enhance"
|
||||
---
|
||||
|
||||
Generate a consistent Product code for MSI installer derived from `identifier` instead of generating random one each build.
|
||||
|
|
@ -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),
|
||||
|
|
|
@ -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)"
|
||||
|
|
Loading…
Reference in New Issue