fix(build): Copy wv2 runtime in dev, fixes #7373 (#7419)

This commit is contained in:
Fabian-Lars
2023-07-13 19:34:31 +02:00
committed by GitHub
parent c98273387c
commit 290e366ae9
2 changed files with 13 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
---
'tauri-build': 'patch:bug'
---
Correctly copy the WebView2 runtime in development when `webviewInstallMode` is used instead of `webviewFixedRuntimePath`.

View File

@@ -9,7 +9,7 @@ use cargo_toml::Manifest;
use heck::AsShoutySnakeCase;
use tauri_utils::{
config::Config,
config::{Config, WebviewInstallMode},
resources::{external_binaries, resource_relpath, ResourcePaths},
};
@@ -347,7 +347,13 @@ pub fn try_build(attributes: Attributes) -> Result<()> {
let mut resources = config.tauri.bundle.resources.clone().unwrap_or_default();
if target_triple.contains("windows") {
if let Some(fixed_webview2_runtime_path) =
&config.tauri.bundle.windows.webview_fixed_runtime_path
match &config.tauri.bundle.windows.webview_fixed_runtime_path {
Some(path) => Some(path),
None => match &config.tauri.bundle.windows.webview_install_mode {
WebviewInstallMode::FixedRuntime { path } => Some(path),
_ => None,
},
}
{
resources.push(fixed_webview2_runtime_path.display().to_string());
}