@@ -45,17 +45,38 @@ AIK_ARCH="$ARCH"
45
45
46
46
bash " $REPO_ROOT " /ci/build-bundle.sh
47
47
48
- mv linuxdeploy-plugin-appimage-bundle AppDir
48
+ mv linuxdeploy-plugin-appimage-bundle AppDir/
49
+
50
+ # cannot use a simple symlink because the AppRun script in appimagetool does not use bash and cannot use $BASH_SOURCE
51
+ # therefore, a symlink would alter $0, causing the script to detect the wrong path
52
+ # we use a similar script here to avoid this AppImage from depending on bash
53
+ cat > AppDir/usr/bin/appimagetool << \EOF
54
+ #! /bin/bash
55
+ set -euo pipefail
56
+
57
+ this_dir="$( readlink -f " $( dirname " $0 " ) " ) "
58
+
59
+ # make appimagetool prefer the bundled mksquashfs
60
+ export PATH="$this_dir "/usr/bin:"$PATH "
61
+
62
+ exec "$this_dir "/../../linuxdeploy-plugin-appimage-bundle/usr/bin/appimagetool "$@ "
63
+
64
+ EOF
65
+ chmod +x AppDir/usr/bin/appimagetool
49
66
50
67
wget https://github.com/TheAssassin/linuxdeploy/releases/download/continuous/linuxdeploy-" $ARCH " .AppImage
51
68
chmod +x linuxdeploy-" $ARCH " .AppImage
52
69
70
+ # qemu is not happy about the AppImage type 2 magic bytes, so we need to "fix" that
71
+ dd if=/dev/zero bs=1 count=3 seek=8 conv=notrunc of=linuxdeploy-" $ARCH " .AppImage
72
+
53
73
export UPD_INFO=" gh-releases-zsync|linuxdeploy|linuxdeploy-plugin-appimage|continuous|linuxdeploy-plugin-appimage-$ARCH .AppImage"
54
74
55
75
# deploy linuxdeploy-plugin-appimage
56
76
./linuxdeploy-" $ARCH " .AppImage --appimage-extract-and-run \
57
77
--appdir AppDir -d " $REPO_ROOT " /resources/linuxdeploy-plugin-appimage.desktop \
58
78
-i " $REPO_ROOT " /resources/linuxdeploy-plugin-appimage.svg
79
+ find AppDir
59
80
60
81
AppDir/AppRun --appdir AppDir
61
82
0 commit comments