From c734b9e3cd6e5a22dfd84ec8a779c2ee9591751b Mon Sep 17 00:00:00 2001 From: Fabian-Lars Date: Mon, 8 Jul 2024 14:51:26 +0200 Subject: [PATCH] feat(bundler/windows): Update wix to fix vulnerabilities and add arm support (#9861) (#10072) Co-authored-by: Lucas Nogueira --- .changes/feat-wix-arm64.md | 6 ++++++ tooling/bundler/src/bundle/windows/msi.rs | 2 +- tooling/bundler/src/bundle/windows/msi/wix.rs | 7 +++++-- tooling/bundler/src/bundle/windows/templates/main.wxs | 3 +++ 4 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 .changes/feat-wix-arm64.md diff --git a/.changes/feat-wix-arm64.md b/.changes/feat-wix-arm64.md new file mode 100644 index 000000000..4571337f5 --- /dev/null +++ b/.changes/feat-wix-arm64.md @@ -0,0 +1,6 @@ +--- +"tauri-bundler": "patch:feat" +"tauri-cli": "patch:feat" +--- + +Upgraded the WiX version to 3.14 which fixes vulnerability issues and adds support for Arm targets. diff --git a/tooling/bundler/src/bundle/windows/msi.rs b/tooling/bundler/src/bundle/windows/msi.rs index b24bef152..ced704182 100644 --- a/tooling/bundler/src/bundle/windows/msi.rs +++ b/tooling/bundler/src/bundle/windows/msi.rs @@ -26,7 +26,7 @@ const WIX_REQUIRED_FILES: &[&str] = &[ /// 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::cache_dir().unwrap(); - wix_path.push("tauri/WixTools"); + wix_path.push("tauri/WixTools314"); if !wix_path.exists() { wix::get_and_extract_wix(&wix_path)?; diff --git a/tooling/bundler/src/bundle/windows/msi/wix.rs b/tooling/bundler/src/bundle/windows/msi/wix.rs index 52c8d137c..9a3e19543 100644 --- a/tooling/bundler/src/bundle/windows/msi/wix.rs +++ b/tooling/bundler/src/bundle/windows/msi/wix.rs @@ -31,8 +31,8 @@ use uuid::Uuid; // URLS for the WIX toolchain. Can be used for cross-platform compilation. pub const WIX_URL: &str = - "https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311-binaries.zip"; -pub const WIX_SHA256: &str = "2c1888d5d1dba377fc7fa14444cf556963747ff9a0a289a3599cf09da03b9e2e"; + "https://github.com/wixtoolset/wix3/releases/download/wix3141rtm/wix314-binaries.zip"; +pub const WIX_SHA256: &str = "6ac824e1642d6f7277d0ed7ea09411a508f6116ba6fae0aa5f2c7daa2ff43d31"; // For Cross Platform Compilation. @@ -182,6 +182,7 @@ fn app_installer_output_path( let arch = match settings.binary_arch() { "x86" => "x86", "x86_64" => "x64", + "aarch64" => "arm64", target => { return Err(crate::Error::ArchError(format!( "Unsupported architecture: {}", @@ -294,6 +295,7 @@ fn run_candle( let arch = match settings.binary_arch() { "x86_64" => "x64", "x86" => "x86", + "aarch64" => "arm64", target => { return Err(crate::Error::ArchError(format!( "unsupported target: {}", @@ -388,6 +390,7 @@ pub fn build_wix_app_installer( let arch = match settings.binary_arch() { "x86_64" => "x64", "x86" => "x86", + "aarch64" => "arm64", target => { return Err(crate::Error::ArchError(format!( "unsupported target: {}", diff --git a/tooling/bundler/src/bundle/windows/templates/main.wxs b/tooling/bundler/src/bundle/windows/templates/main.wxs index fbbc0d669..047b0926e 100644 --- a/tooling/bundler/src/bundle/windows/templates/main.wxs +++ b/tooling/bundler/src/bundle/windows/templates/main.wxs @@ -4,6 +4,9 @@ + + +