From 27069a120400088add38f5aa69df38740aaa6079 Mon Sep 17 00:00:00 2001 From: AnthonyNGarcia Date: Wed, 29 May 2024 18:31:44 -0700 Subject: [PATCH] fix: Use current directory for Windows bundling tools (fix: 9895) --- tooling/bundler/src/bundle/windows/msi.rs | 5 ++--- tooling/bundler/src/bundle/windows/nsis.rs | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tooling/bundler/src/bundle/windows/msi.rs b/tooling/bundler/src/bundle/windows/msi.rs index 844ecbaf9ece..364b8ffc3320 100644 --- a/tooling/bundler/src/bundle/windows/msi.rs +++ b/tooling/bundler/src/bundle/windows/msi.rs @@ -26,9 +26,8 @@ const WIX_REQUIRED_FILES: &[&str] = &[ /// Runs all of the commands to build the MSI installer. /// Returns a vector of PathBuf that shows where the MSI was created. pub fn bundle_project(settings: &Settings, updater: bool) -> crate::Result> { - let mut wix_path = dirs_next::cache_dir().unwrap(); - wix_path.push("tauri/WixTools314"); - + let tauri_tools_path = std::env::current_dir().unwrap().join("target/tools"); + let wix_path = tauri_tools_path.join("Wix"); if !wix_path.exists() { wix::get_and_extract_wix(&wix_path)?; } else if WIX_REQUIRED_FILES diff --git a/tooling/bundler/src/bundle/windows/nsis.rs b/tooling/bundler/src/bundle/windows/nsis.rs index 350b7cb65da3..586d31ad4f6a 100644 --- a/tooling/bundler/src/bundle/windows/nsis.rs +++ b/tooling/bundler/src/bundle/windows/nsis.rs @@ -64,7 +64,7 @@ const NSIS_REQUIRED_FILES_HASH: &[(&str, &str, &str, HashAlgorithm)] = &[( /// Runs all of the commands to build the NSIS installer. /// Returns a vector of PathBuf that shows where the NSIS installer was created. pub fn bundle_project(settings: &Settings, updater: bool) -> crate::Result> { - let tauri_tools_path = dirs_next::cache_dir().unwrap().join("tauri"); + let tauri_tools_path = std::env::current_dir().unwrap().join("target/tools"); let nsis_toolset_path = tauri_tools_path.join("NSIS"); if !nsis_toolset_path.exists() {