diff --git a/.changes/bundler-appimage-arch-env.md b/.changes/bundler-appimage-arch-env.md new file mode 100644 index 000000000000..c69dc4610bd7 --- /dev/null +++ b/.changes/bundler-appimage-arch-env.md @@ -0,0 +1,5 @@ +--- +tauri-bundler: "patch:bug" +--- + +The bundler now sets the `ARCH` env var to the current build target to prevent potential issues with `appimagetool`'s auto-detection. diff --git a/crates/tauri-bundler/src/bundle/linux/appimage.rs b/crates/tauri-bundler/src/bundle/linux/appimage.rs index 3d039605dfcb..c7dfc6e0363f 100644 --- a/crates/tauri-bundler/src/bundle/linux/appimage.rs +++ b/crates/tauri-bundler/src/bundle/linux/appimage.rs @@ -33,7 +33,12 @@ pub fn bundle_project(settings: &Settings) -> crate::Result> { } }; - let tools_arch = settings.target().split('-').next().unwrap(); + let tools_arch = if settings.binary_arch() == Arch::Armhf { + "armhf" + } else { + settings.target().split('-').next().unwrap() + }; + let output_path = settings.project_out_directory().join("bundle/appimage"); if output_path.exists() { fs::remove_dir_all(&output_path)?; @@ -181,6 +186,7 @@ pub fn bundle_project(settings: &Settings) -> crate::Result> { let mut cmd = Command::new(linuxdeploy_path); cmd.env("OUTPUT", &appimage_path); + cmd.env("ARCH", tools_arch); cmd.args([ "--appimage-extract-and-run", "--verbosity",