Skip to content

Commit 290e366

Browse files
authored
fix(build): Copy wv2 runtime in dev, fixes #7373 (#7419)
1 parent c982733 commit 290e366

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'tauri-build': 'patch:bug'
3+
---
4+
5+
Correctly copy the WebView2 runtime in development when `webviewInstallMode` is used instead of `webviewFixedRuntimePath`.

core/tauri-build/src/lib.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use cargo_toml::Manifest;
99
use heck::AsShoutySnakeCase;
1010

1111
use tauri_utils::{
12-
config::Config,
12+
config::{Config, WebviewInstallMode},
1313
resources::{external_binaries, resource_relpath, ResourcePaths},
1414
};
1515

@@ -347,7 +347,13 @@ pub fn try_build(attributes: Attributes) -> Result<()> {
347347
let mut resources = config.tauri.bundle.resources.clone().unwrap_or_default();
348348
if target_triple.contains("windows") {
349349
if let Some(fixed_webview2_runtime_path) =
350-
&config.tauri.bundle.windows.webview_fixed_runtime_path
350+
match &config.tauri.bundle.windows.webview_fixed_runtime_path {
351+
Some(path) => Some(path),
352+
None => match &config.tauri.bundle.windows.webview_install_mode {
353+
WebviewInstallMode::FixedRuntime { path } => Some(path),
354+
_ => None,
355+
},
356+
}
351357
{
352358
resources.push(fixed_webview2_runtime_path.display().to_string());
353359
}

0 commit comments

Comments
 (0)