Skip to content

Commit 8e9752b

Browse files
authored
feat(bundler/wix): install webview2 runtime (#1329)
* feat(bundler/wix): install webview2 runtime * add changefile
1 parent fde3621 commit 8e9752b

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

.changes/wix-install-webview2.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri-bundler": minor
3+
---
4+
5+
Automatically install Webview2 runtime alongside app.

cli/tauri-bundler/src/bundle/templates/main.wxs

+11
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,17 @@
147147
</Feature>
148148
</Feature>
149149

150+
<!-- WebView2 -->
151+
<Property Id="WVRTINSTALLED">
152+
<RegistrySearch Id="WVRTInstalled" Root="HKLM" Key="SOFTWARE\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" Name="pv" Type="raw" Win64="no"/>
153+
</Property>
154+
<CustomAction Id='DownloadAndInvokeBootstrapper' Directory="INSTALLDIR" Execute="deferred" ExeCommand='powershell.exe -windowstyle hidden Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/p/?LinkId=2124703" -OutFile "$env:TEMP\MicrosoftEdgeWebview2Setup.exe" ; &amp; $env:TEMP\MicrosoftEdgeWebview2Setup.exe /install' Return='check'/>
155+
<InstallExecuteSequence>
156+
<Custom Action='DownloadAndInvokeBootstrapper' Before='InstallFinalize'>
157+
<![CDATA[NOT(REMOVE OR WVRTINSTALLED)]]>
158+
</Custom>
159+
</InstallExecuteSequence>
160+
150161
<SetProperty Id="ARPINSTALLLOCATION" Value="[INSTALLDIR]" After="CostFinalize"/>
151162
</Product>
152163
</Wix>

0 commit comments

Comments
 (0)