fix(installer): align NSIS locale variables with Tauri 2.13

This commit is contained in:
Tunglies
2026-12-02 02:00:48 +08:00
parent 829c178fa6
commit d795aeb0ec
+11 -8
View File
@@ -81,6 +81,9 @@ Var VC_RUNTIME_NEEDED
Var ServiceExisted
Var ServiceStartType
Var ServiceWasRunning
Var ExistingVersionKind
Var Webview2DownloadResult
Var Webview2InstallExitCode
Name "${PRODUCTNAME}"
BrandingText "${COPYRIGHT}"
@@ -214,13 +217,13 @@ Function PageReinstall
; Compare this installar version with the existing installation
; and modify the messages presented to the user accordingly
compare_version:
StrCpy $R4 "$(older)"
StrCpy $ExistingVersionKind "$(older)"
${If} $WixMode = 1
ReadRegStr $R0 HKLM "$R6" "DisplayVersion"
${Else}
ReadRegStr $R0 SHCTX "${UNINSTKEY}" "DisplayVersion"
${EndIf}
${IfThen} $R0 == "" ${|} StrCpy $R4 "$(unknown)" ${|}
${IfThen} $R0 == "" ${|} StrCpy $ExistingVersionKind "$(unknown)" ${|}
nsis_tauri_utils::SemverCompare "${VERSION}" $R0
Pop $R0
@@ -895,8 +898,8 @@ Section WebView2
Delete "$TEMP\MicrosoftEdgeWebview2Setup.exe"
DetailPrint "$(webview2Downloading)"
NSISdl::download "https://go.microsoft.com/fwlink/p/?LinkId=2124703" "$TEMP\MicrosoftEdgeWebview2Setup.exe"
Pop $0
${If} $0 == "success"
Pop $Webview2DownloadResult
${If} $Webview2DownloadResult == "success"
DetailPrint "$(webview2DownloadSuccess)"
${Else}
DetailPrint "$(webview2DownloadError)"
@@ -927,8 +930,8 @@ Section WebView2
install_webview2:
DetailPrint "$(installingWebview2)"
; $6 holds the path to the webview2 installer
ExecWait "$6 ${WEBVIEW2INSTALLERARGS} /install" $1
${If} $1 = 0
ExecWait "$6 ${WEBVIEW2INSTALLERARGS} /install" $Webview2InstallExitCode
${If} $Webview2InstallExitCode = 0
DetailPrint "$(webview2InstallSuccess)"
${Else}
DetailPrint "$(webview2InstallError)"
@@ -953,8 +956,8 @@ Section WebView2
${If} $R1 != ""
; Chromium updater docs: https://source.chromium.org/chromium/chromium/src/+/main:docs/updater/user_manual.md
; Modified from "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft EdgeWebView\ModifyPath"
ExecWait `"$R1" /install appguid=${WEBVIEW2APPGUID}&needsadmin=true` $1
${If} $1 = 0
ExecWait `"$R1" /install appguid=${WEBVIEW2APPGUID}&needsadmin=true` $Webview2InstallExitCode
${If} $Webview2InstallExitCode = 0
DetailPrint "$(webview2InstallSuccess)"
${Else}
MessageBox MB_ICONEXCLAMATION|MB_ABORTRETRYIGNORE "$(webview2InstallError)" IDIGNORE ignore IDRETRY update_webview