Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

chore: uninstall when upgrading windows installer (#5945)

Nguyen Ngoc Minha4e5973573b5
diff --git a/src-tauri/tauri.bundle.windows.nsis.template b/src-tauri/tauri.bundle.windows.nsis.template
index f579190e8..2a216c4a6 100644
--- a/src-tauri/tauri.bundle.windows.nsis.template
+++ b/src-tauri/tauri.bundle.windows.nsis.template
@@ -286,6 +286,12 @@ Function PageReinstallUpdateSelection
${EndIf}
FunctionEnd
Function PageLeaveReinstall
+ ; In passive mode, always uninstall when upgrading
+ ${If} $PassiveMode = 1
+ ${AndIf} $R0 = 1 ; Upgrading
+ Goto reinst_uninstall
+ ${EndIf}
+
${NSD_GetState} $R2 $R1
; If migrating from Wix, always uninstall