Skip to content

Commit

Permalink
fix(bundler): Fix webview install modes in NSIS bundler (#6854)
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianLars authored May 4, 2023
1 parent 5053a9c commit 2915bd0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changes/nsis-webview-installmodes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'tauri-bundler': 'patch'
---

Correctly escape arguments in NSIS script to fix bundling apps that use non-default WebView2 install modes.
4 changes: 2 additions & 2 deletions tooling/bundler/src/bundle/windows/templates/installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -356,15 +356,15 @@ Section Webview2

!if "${INSTALLWEBVIEW2MODE}" == "embedBootstrapper"
CreateDirectory "$INSTDIR\redist"
File /oname="$INSTDIR\redist\MicrosoftEdgeWebview2Setup.exe" "WEBVIEW2BOOTSTRAPPERPATH"
File "/oname=$INSTDIR\redist\MicrosoftEdgeWebview2Setup.exe" "${WEBVIEW2BOOTSTRAPPERPATH}"
DetailPrint "$(installingWebview2)"
StrCpy $6 "$INSTDIR\redist\MicrosoftEdgeWebview2Setup.exe"
Goto install_webview2
!endif

!if "${INSTALLWEBVIEW2MODE}" == "offlineInstaller"
CreateDirectory "$INSTDIR\redist"
File /oname="$INSTDIR\redist\MicrosoftEdgeWebView2RuntimeInstaller.exe" "WEBVIEW2INSTALLERPATH"
File "/oname=$INSTDIR\redist\MicrosoftEdgeWebView2RuntimeInstaller.exe" "${WEBVIEW2INSTALLERPATH}"
DetailPrint "$(installingWebview2)"
StrCpy $6 "$INSTDIR\redist\MicrosoftEdgeWebView2RuntimeInstaller.exe"
Goto install_webview2
Expand Down

0 comments on commit 2915bd0

Please sign in to comment.