-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
fea(wix): add minimum webview2 version support #14793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
ffe622a
66e54b1
87fa0c3
0bc6e98
857300b
49225bf
76a436f
d468f0d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| --- | ||
| "tauri-bundler": minor:feat | ||
| "tauri-cli": minor:feat | ||
| "@tauri-apps/cli": minor:feat | ||
| --- | ||
|
|
||
| Added support for `minimumWebview2Version` option support for the MSI (Wix) installer, the old `bundle > windows > nsis > minimumWebview2Version` is now deprecated in favor of `bundle > windows > minimumWebview2Version` | ||
|
|
||
| Notes: | ||
|
|
||
| - For anyone relying on the `WVRTINSTALLED` `Property` tag in `main.wxs`, it is now renamed to `INSTALLED_WEBVIEW2_VERSION` | ||
| - For `tauri-bundler` lib users, the `WindowsSettings` now has a new field `minimum_webview2_version` which can be a breaking change |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -283,38 +283,62 @@ | |
|
|
||
| {{#if install_webview}} | ||
| <!-- WebView2 --> | ||
| <Property Id="WVRTINSTALLED"> | ||
| <RegistrySearch Id="WVRTInstalledSystem" Root="HKLM" Key="SOFTWARE\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" Name="pv" Type="raw" Win64="no" /> | ||
| <RegistrySearch Id="WVRTInstalledUser" Root="HKCU" Key="SOFTWARE\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" Name="pv" Type="raw"/> | ||
| <Property Id="INSTALLED_WEBVIEW2_VERSION"> | ||
|
Legend-Master marked this conversation as resolved.
|
||
| <RegistrySearch Id="Webview2VersionSystemx64" Root="HKLM" Key="SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" Name="pv" Type="raw" /> | ||
| <RegistrySearch Id="Webview2VersionSystemx86" Root="HKLM" Key="SOFTWARE\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" Name="pv" Type="raw" /> | ||
| <RegistrySearch Id="Webview2VersionUser" Root="HKCU" Key="SOFTWARE\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" Name="pv" Type="raw"/> | ||
|
Comment on lines
+287
to
+289
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the same as the old version that used Win64="no" but i guess being more explicit is good.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The description of the |
||
| </Property> | ||
|
|
||
| {{#if download_bootstrapper}} | ||
| <!-- Download webview bootstrapper mode --> | ||
| <CustomAction Id='DownloadAndInvokeBootstrapper' Directory="INSTALLDIR" Execute="deferred" ExeCommand='powershell.exe -NoProfile -windowstyle hidden try [\{] [\[]Net.ServicePointManager[\]]::SecurityProtocol = [\[]Net.SecurityProtocolType[\]]::Tls12 [\}] catch [\{][\}]; Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/p/?LinkId=2124703" -OutFile "$env:TEMP\MicrosoftEdgeWebview2Setup.exe" ; Start-Process -FilePath "$env:TEMP\MicrosoftEdgeWebview2Setup.exe" -ArgumentList ({{webview_installer_args}} '/install') -Wait' Return='check'/> | ||
| <InstallExecuteSequence> | ||
| <Custom Action='DownloadAndInvokeBootstrapper' Before='InstallFinalize'> | ||
| <![CDATA[NOT(REMOVE OR WVRTINSTALLED)]]> | ||
| <![CDATA[NOT(REMOVE OR INSTALLED_WEBVIEW2_VERSION)]]> | ||
| </Custom> | ||
| </InstallExecuteSequence> | ||
| {{/if}} | ||
|
|
||
| <!-- Embedded webview bootstrapper mode --> | ||
| {{#if webview2_bootstrapper_path}} | ||
| <!-- Embedded webview bootstrapper mode --> | ||
| <Binary Id="MicrosoftEdgeWebview2Setup.exe" SourceFile="{{webview2_bootstrapper_path}}"/> | ||
| <CustomAction Id='InvokeBootstrapper' BinaryKey='MicrosoftEdgeWebview2Setup.exe' Execute="deferred" ExeCommand='{{webview_installer_args}} /install' Return='check' /> | ||
| <InstallExecuteSequence> | ||
| <Custom Action='InvokeBootstrapper' Before='InstallFinalize'> | ||
| <![CDATA[NOT(REMOVE OR WVRTINSTALLED)]]> | ||
| <![CDATA[NOT(REMOVE OR INSTALLED_WEBVIEW2_VERSION)]]> | ||
| </Custom> | ||
| </InstallExecuteSequence> | ||
| {{/if}} | ||
|
|
||
| <!-- Embedded offline installer --> | ||
| {{#if webview2_installer_path}} | ||
| <!-- Embedded offline installer --> | ||
| <Binary Id="MicrosoftEdgeWebView2RuntimeInstaller.exe" SourceFile="{{webview2_installer_path}}"/> | ||
| <CustomAction Id='InvokeStandalone' BinaryKey='MicrosoftEdgeWebView2RuntimeInstaller.exe' Execute="deferred" ExeCommand='{{webview_installer_args}} /install' Return='check' /> | ||
| <InstallExecuteSequence> | ||
| <Custom Action='InvokeStandalone' Before='InstallFinalize'> | ||
| <![CDATA[NOT(REMOVE OR WVRTINSTALLED)]]> | ||
| <![CDATA[NOT(REMOVE OR INSTALLED_WEBVIEW2_VERSION)]]> | ||
| </Custom> | ||
| </InstallExecuteSequence> | ||
| {{/if}} | ||
|
|
||
| {{#if minimum_webview2_version}} | ||
| <!-- Update WebView2 if minimum version requirement not met --> | ||
| <Property Id="MINIMUM_WEBVIEW2_VERSION" Value="{{minimum_webview2_version}}" /> | ||
| <Property Id="EDGEUPDATE_PATH"> | ||
| <RegistrySearch Id="EdgeUpdateLocalMachine64" Root="HKLM" Key="SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate" Name="path" Type="raw" /> | ||
| <RegistrySearch Id="EdgeUpdateLocalMachine32" Root="HKLM" Key="SOFTWARE\Microsoft\EdgeUpdate" Name="path" Type="raw"/> | ||
| <RegistrySearch Id="EdgeUpdateCurrentUser" Root="HKCU" Key="SOFTWARE\Microsoft\EdgeUpdate" Name="path" Type="raw"/> | ||
| </Property> | ||
| <!-- 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" --> | ||
| <CustomAction Id="UpdateWebView2ViaEdgeUpdate" Execute="deferred" Property="EDGEUPDATE_PATH" Return="check" Impersonate="no" ExeCommand="/install appguid={F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}&needsadmin=true" /> | ||
| <InstallExecuteSequence> | ||
| <Custom Action='UpdateWebView2ViaEdgeUpdate' Before='InstallFinalize'> | ||
| <![CDATA[ | ||
| NOT REMOVE | ||
| AND INSTALLED_WEBVIEW2_VERSION | ||
| AND (INSTALLED_WEBVIEW2_VERSION < MINIMUM_WEBVIEW2_VERSION) | ||
| ]]> | ||
| </Custom> | ||
| </InstallExecuteSequence> | ||
| {{/if}} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a field here is technically breaking as well...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any better idea than making it all Builder patterns in v3?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
marking minors as breaking? 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
time to stop using semver