Skip to content

Commit c44d0eb

Browse files
committed
fix(bundler): set ARCH env var for appimagetool
1 parent 85b1912 commit c44d0eb

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
tauri-bundler: "patch:bug"
3+
---
4+
5+
The bundler now sets the `ARCH` env var to the current build target to prevent potential issues with `appimagetool`'s auto-detection.

crates/tauri-bundler/src/bundle/linux/appimage.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ pub fn bundle_project(settings: &Settings) -> crate::Result<Vec<PathBuf>> {
3333
}
3434
};
3535

36-
let tools_arch = settings.target().split('-').next().unwrap();
36+
let tools_arch = if settings.binary_arch() == Arch::Armhf {
37+
"armhf"
38+
} else {
39+
settings.target().split('-').next().unwrap()
40+
};
41+
3742
let output_path = settings.project_out_directory().join("bundle/appimage");
3843
if output_path.exists() {
3944
fs::remove_dir_all(&output_path)?;
@@ -181,6 +186,7 @@ pub fn bundle_project(settings: &Settings) -> crate::Result<Vec<PathBuf>> {
181186

182187
let mut cmd = Command::new(linuxdeploy_path);
183188
cmd.env("OUTPUT", &appimage_path);
189+
cmd.env("ARCH", tools_arch);
184190
cmd.args([
185191
"--appimage-extract-and-run",
186192
"--verbosity",

0 commit comments

Comments
 (0)