Skip to content

Commit c734b9e

Browse files
feat(bundler/windows): Update wix to fix vulnerabilities and add arm support (#9861) (#10072)
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
1 parent afb102c commit c734b9e

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

.changes/feat-wix-arm64.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"tauri-bundler": "patch:feat"
3+
"tauri-cli": "patch:feat"
4+
---
5+
6+
Upgraded the WiX version to 3.14 which fixes vulnerability issues and adds support for Arm targets.

tooling/bundler/src/bundle/windows/msi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const WIX_REQUIRED_FILES: &[&str] = &[
2626
/// Returns a vector of PathBuf that shows where the MSI was created.
2727
pub fn bundle_project(settings: &Settings, updater: bool) -> crate::Result<Vec<PathBuf>> {
2828
let mut wix_path = dirs::cache_dir().unwrap();
29-
wix_path.push("tauri/WixTools");
29+
wix_path.push("tauri/WixTools314");
3030

3131
if !wix_path.exists() {
3232
wix::get_and_extract_wix(&wix_path)?;

tooling/bundler/src/bundle/windows/msi/wix.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ use uuid::Uuid;
3131

3232
// URLS for the WIX toolchain. Can be used for cross-platform compilation.
3333
pub const WIX_URL: &str =
34-
"https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311-binaries.zip";
35-
pub const WIX_SHA256: &str = "2c1888d5d1dba377fc7fa14444cf556963747ff9a0a289a3599cf09da03b9e2e";
34+
"https://github.com/wixtoolset/wix3/releases/download/wix3141rtm/wix314-binaries.zip";
35+
pub const WIX_SHA256: &str = "6ac824e1642d6f7277d0ed7ea09411a508f6116ba6fae0aa5f2c7daa2ff43d31";
3636

3737
// For Cross Platform Compilation.
3838

@@ -182,6 +182,7 @@ fn app_installer_output_path(
182182
let arch = match settings.binary_arch() {
183183
"x86" => "x86",
184184
"x86_64" => "x64",
185+
"aarch64" => "arm64",
185186
target => {
186187
return Err(crate::Error::ArchError(format!(
187188
"Unsupported architecture: {}",
@@ -294,6 +295,7 @@ fn run_candle(
294295
let arch = match settings.binary_arch() {
295296
"x86_64" => "x64",
296297
"x86" => "x86",
298+
"aarch64" => "arm64",
297299
target => {
298300
return Err(crate::Error::ArchError(format!(
299301
"unsupported target: {}",
@@ -388,6 +390,7 @@ pub fn build_wix_app_installer(
388390
let arch = match settings.binary_arch() {
389391
"x86_64" => "x64",
390392
"x86" => "x86",
393+
"aarch64" => "arm64",
391394
target => {
392395
return Err(crate::Error::ArchError(format!(
393396
"unsupported target: {}",

tooling/bundler/src/bundle/windows/templates/main.wxs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
<?elseif $(sys.BUILDARCH)="x64"?>
55
<?define Win64 = "yes" ?>
66
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
7+
<?elseif $(sys.BUILDARCH)="arm64"?>
8+
<?define Win64 = "yes" ?>
9+
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
710
<?else?>
811
<?error Unsupported value of sys.BUILDARCH=$(sys.BUILDARCH)?>
912
<?endif?>

0 commit comments

Comments
 (0)