mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-01 10:01:07 +02:00
5
.changes/tauri-build-copy-webview2-runtime.md
Normal file
5
.changes/tauri-build-copy-webview2-runtime.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'tauri-build': 'patch:bug'
|
||||
---
|
||||
|
||||
Correctly copy the WebView2 runtime in development when `webviewInstallMode` is used instead of `webviewFixedRuntimePath`.
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user