Skip to content

Commit

Permalink
fix(bundler/nsis): Include WebView2Loader.dll if found to match msi b…
Browse files Browse the repository at this point in the history
…ehavior
  • Loading branch information
FabianLars committed Jan 9, 2025
1 parent b0d7527 commit 4c4d0d7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changes/fix-nsis-webviewloaderdll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
tauri-bundler: 'fix:bug'
---

Fixed an issue leading to NSIS based installers to not contain the `WebView2Loader.dll` file when targetting `windows-gnu`.
11 changes: 11 additions & 0 deletions crates/tauri-bundler/src/bundle/windows/nsis/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,17 @@ fn generate_resource_data(settings: &Settings) -> crate::Result<ResourcesMap> {

let mut added_resources = Vec::new();

// Adding WebViewer2Loader.dll in case windows-gnu toolchain is used
let loader_path =
dunce::simplified(&settings.project_out_directory().join("WebView2Loader.dll")).to_path_buf();
if loader_path.exists() {
added_resources.push(loader_path.clone());
resources.insert(
loader_path,
(PathBuf::new(), PathBuf::from("WebView2Loader.dll")),
);
}

for resource in settings.resource_files().iter() {
let resource = resource?;

Expand Down

0 comments on commit 4c4d0d7

Please sign in to comment.