Forráskód Böngészése

fix(bundler): Fix webview install modes in NSIS bundler (#6854)

Fabian-Lars 2 éve
szülő
commit
2915bd068e

+ 5 - 0
.changes/nsis-webview-installmodes.md

@@ -0,0 +1,5 @@
+---
+'tauri-bundler': 'patch'
+---
+
+Correctly escape arguments in NSIS script to fix bundling apps that use non-default WebView2 install modes.

+ 2 - 2
tooling/bundler/src/bundle/windows/templates/installer.nsi

@@ -356,7 +356,7 @@ 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
@@ -364,7 +364,7 @@ Section Webview2
 
   !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