Skip to content

Commit 2915bd0

Browse files
authored
fix(bundler): Fix webview install modes in NSIS bundler (#6854)
1 parent 5053a9c commit 2915bd0

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'tauri-bundler': 'patch'
3+
---
4+
5+
Correctly escape arguments in NSIS script to fix bundling apps that use non-default WebView2 install modes.

tooling/bundler/src/bundle/windows/templates/installer.nsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,15 +356,15 @@ Section Webview2
356356

357357
!if "${INSTALLWEBVIEW2MODE}" == "embedBootstrapper"
358358
CreateDirectory "$INSTDIR\redist"
359-
File /oname="$INSTDIR\redist\MicrosoftEdgeWebview2Setup.exe" "WEBVIEW2BOOTSTRAPPERPATH"
359+
File "/oname=$INSTDIR\redist\MicrosoftEdgeWebview2Setup.exe" "${WEBVIEW2BOOTSTRAPPERPATH}"
360360
DetailPrint "$(installingWebview2)"
361361
StrCpy $6 "$INSTDIR\redist\MicrosoftEdgeWebview2Setup.exe"
362362
Goto install_webview2
363363
!endif
364364

365365
!if "${INSTALLWEBVIEW2MODE}" == "offlineInstaller"
366366
CreateDirectory "$INSTDIR\redist"
367-
File /oname="$INSTDIR\redist\MicrosoftEdgeWebView2RuntimeInstaller.exe" "WEBVIEW2INSTALLERPATH"
367+
File "/oname=$INSTDIR\redist\MicrosoftEdgeWebView2RuntimeInstaller.exe" "${WEBVIEW2INSTALLERPATH}"
368368
DetailPrint "$(installingWebview2)"
369369
StrCpy $6 "$INSTDIR\redist\MicrosoftEdgeWebView2RuntimeInstaller.exe"
370370
Goto install_webview2

0 commit comments

Comments
 (0)