diff --git a/.changes/appimage-plugin.md b/.changes/appimage-plugin.md new file mode 100644 index 000000000..9a7e9bad2 --- /dev/null +++ b/.changes/appimage-plugin.md @@ -0,0 +1,7 @@ +--- +tauri-bundler: "patch:enhance" +tauri-cli: "patch:enhance" +"@tauri-apps/cli": "patch:enhance" +--- + +The bundler now pulls the latest AppImage linuxdeploy plugin instead of using the built-in one. This should remove the libfuse requirement. diff --git a/crates/tauri-bundler/src/bundle/linux/appimage.rs b/crates/tauri-bundler/src/bundle/linux/appimage.rs index 0ca812031..33ca30831 100644 --- a/crates/tauri-bundler/src/bundle/linux/appimage.rs +++ b/crates/tauri-bundler/src/bundle/linux/appimage.rs @@ -52,7 +52,11 @@ pub fn bundle_project(settings: &Settings) -> crate::Result> { fs::create_dir_all(&tools_path)?; - let linuxdeploy_path = prepare_tools(&tools_path, tools_arch)?; + let linuxdeploy_path = prepare_tools( + &tools_path, + tools_arch, + settings.log_level() != log::Level::Error, + )?; let package_dir = settings.project_out_directory().join("bundle/appimage_deb"); @@ -217,7 +221,7 @@ pub fn bundle_project(settings: &Settings) -> crate::Result> { } // returns the linuxdeploy path to keep linuxdeploy_arch contained -fn prepare_tools(tools_path: &Path, arch: &str) -> crate::Result { +fn prepare_tools(tools_path: &Path, arch: &str, verbose: bool) -> crate::Result { let apprun = tools_path.join(format!("AppRun-{arch}")); if !apprun.exists() { let data = download(&format!( @@ -245,6 +249,21 @@ fn prepare_tools(tools_path: &Path, arch: &str) -> crate::Result { write_and_make_executable(&gstreamer, data)?; } + let appimage = tools_path.join("linuxdeploy-plugin-appimage.AppImage"); + if !appimage.exists() { + // This is optional, linuxdeploy will fall back to its built-in version if the download failed. + let data = download(&format!("https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-{arch}.AppImage")); + match data { + Ok(data) => write_and_make_executable(&appimage, data)?, + Err(err) => { + log::error!("Download of AppImage plugin failed. Using older built-in version instead."); + if verbose { + log::debug!("{err:?}"); + } + } + } + } + // This should prevent linuxdeploy to be detected by appimage integration tools let _ = Command::new("dd") .args([