Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content
main
Switch branches/tags
WebView2Samples/SampleApps/WV2DeploymentWiXCustomActionSample/
WebView2Samples/SampleApps/WV2DeploymentWiXCustomActionSample/

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
description extendedZipContent languages page_type products urlFragment
Demonstrate the deployment workflow of WebView2 with WiX Custom Action.
path target
SharedContent
SharedContent
path target
LICENSE
LICENSE
cpp
sample
microsoft-edge
WV2DeploymentWiXCustomActionSample

WebView2 Deployment WiX Custom Action Sample

To help developers understand how to deploy the Evergreen WebView2 Runtime with your application, this sample creates a WiX installer for WebView2APISample and uses WiX Custom Action to chain-install the Evergreen WebView2 Runtime.

This sample showcases deployment workflows for,

  • Download the Evergreen WebView2 Runtime Bootstrapper through link.
  • Package the Evergreen WebView2 Runtime Bootstrapper.
  • Package the Evergreen WebView2 Runtime Standalone Installer.

Prerequisites

Build steps

To create a WiX installer that chain-installs the Evergreen WebView2 Runtime through Custom Action,

  1. Clone the repo.
  2. Open ../WebView2Samples.sln with Visual Studio, then open Product.wxs under the WV2DeploymentWiXCustomActionSample project. Edit Product.wxs depending on the workflow you wish to use.
    • For "Download the Evergreen WebView2 Runtime Bootstrapper through link",
      • Under <!-- Step 4: Config Custom Action to download/install Bootstrapper -->, uncomment the <CustomAction Id='DownloadAndInvokeBootstrapper' ...> element below <!-- [Download Bootstrapper] ... -->. Comment out other <Binary> and <CustomAction> elements.
      • Under <!-- Step 5: Config execute sequence of custom action -->, uncomment the <Custom Action='DownloadAndInvokeBootstrapper' ...> element below <!-- [Download Bootstrapper] ...-->. Comment out other <Custom> elements.
    • For "Package the Evergreen WebView2 Runtime Bootstrapper",
      • Under <!-- Step 4: Config Custom Action to download/install Bootstrapper -->, uncomment the <Binary Id="MicrosoftEdgeWebview2Setup.exe" ...> and <CustomAction Id='InvokeBootstrapper' ...> elements below <!-- [Package Bootstrapper] ... -->. Comment out other <Binary> and <CustomAction> elements.
      • Under <!-- Step 5: Config execute sequence of custom action -->, uncomment the <Custom Action='InvokeBootstrapper' ...> element below <!-- [Package Bootstrapper] ...-->. Comment out other <Custom> elements.
    • For "Package the Evergreen WebView2 Runtime Standalone Installer",
      • Under <!-- Step 4: Config Custom Action to download/install Bootstrapper -->, uncomment the <Binary Id="MicrosoftEdgeWebView2RuntimeInstallerX64.exe" ...> and <CustomAction Id='InvokeStandalone' ...> elements below <!-- [Package Standalone Installer] ... -->. Comment out other <Binary> and <CustomAction> elements. If you're targeting non-X64 devices, you may also want to edit the MicrosoftEdgeWebView2RuntimeInstallerX64 filename to reflect the correct architecture.
      • Under <!-- Step 5: Config execute sequence of custom action -->, uncomment the <Custom Action='InvokeStandalone' ...> element below <!-- [Package Standalone Installer] ...-->. Comment out other <Custom> elements.
  3. If you plan to package either the Bootstrapper or the Standalone Installer, download the Bootstrapper or the Standalone Installer and place it under the enclosing SampleApps folder.
  4. Build the WV2DeploymentVSInstallerSample project.