Skip to content

Commit 6830a73

Browse files
authored
fix(bundler): use binary arch on appimage bundle script (#4194)
1 parent 43daeaf commit 6830a73

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

.changes/fix-appimage-bundle-arch.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri-bundler": patch
3+
---
4+
5+
Use binary arch instead of `x86_64` on the AppImage bundle script.

tooling/bundler/src/bundle/linux/appimage.rs

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ pub fn bundle_project(settings: &Settings) -> crate::Result<Vec<PathBuf>> {
5151

5252
// setup data to insert into shell script
5353
let mut sh_map = BTreeMap::new();
54+
sh_map.insert("arch", settings.target().split('-').next().unwrap());
5455
sh_map.insert("app_name", settings.main_binary_name());
5556
sh_map.insert("app_name_uppercase", &upcase_app_name);
5657
sh_map.insert("appimage_filename", &appimage_filename);

tooling/bundler/src/bundle/linux/templates/appimage

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
set -euxo pipefail
77

8-
export ARCH=x86_64
8+
export ARCH={{arch}}
99

1010
mkdir -p "{{app_name}}.AppDir"
1111
cp -r ../appimage_deb/data/usr "{{app_name}}.AppDir"
@@ -17,7 +17,7 @@ find /usr/lib* -name WebKitNetworkProcess -exec mkdir -p "$(dirname '{}')" \; -e
1717
find /usr/lib* -name WebKitWebProcess -exec mkdir -p "$(dirname '{}')" \; -exec cp --parents '{}' "." \; || true
1818
find /usr/lib* -name libwebkit2gtkinjectedbundle.so -exec mkdir -p "$(dirname '{}')" \; -exec cp --parents '{}' "." \; || true
1919

20-
wget -q -4 -O AppRun https://github.com/AppImage/AppImageKit/releases/download/continuous/AppRun-x86_64 || wget -q -4 -O AppRun https://github.com/AppImage/AppImageKit/releases/download/12/AppRun-aarch64
20+
wget -q -4 -O AppRun https://github.com/AppImage/AppImageKit/releases/download/continuous/AppRun-${ARCH} || wget -q -4 -O AppRun https://github.com/AppImage/AppImageKit/releases/download/12/AppRun-${ARCH}
2121
chmod +x AppRun
2222

2323
cp "{{icon_path}}" .DirIcon
@@ -28,9 +28,9 @@ ln -s "usr/share/applications/{{app_name}}.desktop" "{{app_name}}.desktop"
2828
cd ..
2929

3030
wget -q -4 -O linuxdeploy-plugin-gtk.sh "https://raw.githubusercontent.com/tauri-apps/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh"
31-
wget -q -4 -O linuxdeploy-x86_64.AppImage https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
31+
wget -q -4 -O linuxdeploy-${ARCH}.AppImage https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-${ARCH}.AppImage
3232

3333
chmod +x linuxdeploy-plugin-gtk.sh
34-
chmod +x linuxdeploy-x86_64.AppImage
34+
chmod +x linuxdeploy-${ARCH}.AppImage
3535

36-
OUTPUT="{{appimage_filename}}" ./linuxdeploy-x86_64.AppImage --appimage-extract-and-run --appdir "{{app_name}}.AppDir" --plugin gtk --output appimage
36+
OUTPUT="{{appimage_filename}}" ./linuxdeploy-${ARCH}.AppImage --appimage-extract-and-run --appdir "{{app_name}}.AppDir" --plugin gtk --output appimage

0 commit comments

Comments
 (0)