fix(bundler): properly reinstall files on MSI downgrades, closes #3868 (#4044)

This commit is contained in:
Lucas Fernandes Nogueira 2022-05-04 06:48:53 -07:00 committed by GitHub
parent 95726ebb61
commit 72e577dcc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -0,0 +1,5 @@
---
"tauri-bundler": patch
---
Fix app downgrades when using the Windows installer.

View File

@ -25,8 +25,12 @@
InstallScope="perMachine" InstallScope="perMachine"
SummaryCodepage="!(loc.TauriCodepage)"/> SummaryCodepage="!(loc.TauriCodepage)"/>
<!-- https://docs.microsoft.com/en-us/windows/win32/msi/reinstallmode -->
<!-- force all files to be reinstalled; rewrite all registry entries; reinstall all shortcuts -->
<Property Id="REINSTALLMODE" Value="amus" />
{{#if allow_downgrades}} {{#if allow_downgrades}}
<MajorUpgrade AllowDowngrades="yes" /> <MajorUpgrade AllowDowngrades="yes" Schedule="afterInstallInitialize" />
{{else}} {{else}}
<MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeErrorMessage)" AllowSameVersionUpgrades="yes" /> <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeErrorMessage)" AllowSameVersionUpgrades="yes" />
{{/if}} {{/if}}