|
16 | 16 | linuxdeploy_arch="$ARCH"
|
17 | 17 | fi
|
18 | 18 |
|
19 |
| -OUTDIR="${PWD}" |
20 |
| - |
21 |
| -cd "{{tauri_tools_path}}" |
22 |
| - |
23 |
| -# remove the folder if it exists - the rest of the script fails if it does |
24 |
| -rm -rf "{{app_name}}.AppDir" |
25 | 19 | mkdir -p "{{app_name}}.AppDir"
|
26 |
| -cp -r "${OUTDIR}/../appimage_deb/data/usr" "{{app_name}}.AppDir" |
| 20 | +cp -r ../appimage_deb/data/usr "{{app_name}}.AppDir" |
27 | 21 |
|
28 | 22 | cd "{{app_name}}.AppDir"
|
29 | 23 | mkdir -p "usr/bin"
|
@@ -53,8 +47,12 @@ find /usr/lib* -name WebKitNetworkProcess -exec mkdir -p "$(dirname '{}')" \; -e
|
53 | 47 | find /usr/lib* -name WebKitWebProcess -exec mkdir -p "$(dirname '{}')" \; -exec cp --parents '{}' "." \; || true
|
54 | 48 | find /usr/lib* -name libwebkit2gtkinjectedbundle.so -exec mkdir -p "$(dirname '{}')" \; -exec cp --parents '{}' "." \; || true
|
55 | 49 |
|
56 |
| -wget -q -4 -N -O AppRun https://github.com/AppImage/AppImageKit/releases/download/continuous/AppRun-${ARCH} || wget -q -4 -N -O AppRun https://github.com/AppImage/AppImageKit/releases/download/12/AppRun-${ARCH} |
57 |
| -chmod +x AppRun |
| 50 | +wget -q -4 -N -O "{{tauri_tools_path}}/AppRun" https://github.com/AppImage/AppImageKit/releases/download/continuous/AppRun-${ARCH} || wget -q -4 -N -O "{{tauri_tools_path}}/AppRun" https://github.com/AppImage/AppImageKit/releases/download/12/AppRun-${ARCH} |
| 51 | +chmod +x "{{tauri_tools_path}}/AppRun" |
| 52 | + |
| 53 | +# We need AppRun to be installed as {{app_name}}.AppDir/AppRun. |
| 54 | +# Otherwise the linuxdeploy scripts will default to symlinking our main bin instead and will crash on trying to launch. |
| 55 | +cp "{{tauri_tools_path}}/AppRun" . |
58 | 56 |
|
59 | 57 | cp "{{icon_path}}" .DirIcon
|
60 | 58 | ln -s "{{icon_path}}" "{{app_name}}.png"
|
|
71 | 69 | gst_plugin=""
|
72 | 70 | fi
|
73 | 71 |
|
74 |
| -wget -q -4 -N -O linuxdeploy-plugin-gtk.sh https://raw.githubusercontent.com/tauri-apps/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh |
75 |
| -wget -q -4 -N -O linuxdeploy-${ARCH}.AppImage https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-${linuxdeploy_arch}.AppImage |
| 72 | +wget -q -4 -N -O "{{tauri_tools_path}}/linuxdeploy-plugin-gtk.sh" https://raw.githubusercontent.com/tauri-apps/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh |
| 73 | +wget -q -4 -N -O "{{tauri_tools_path}}/linuxdeploy-${ARCH}.AppImage" https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-${linuxdeploy_arch}.AppImage |
76 | 74 |
|
77 |
| -chmod +x linuxdeploy-plugin-gtk.sh |
78 |
| -chmod +x linuxdeploy-${ARCH}.AppImage |
| 75 | +chmod +x "{{tauri_tools_path}}/linuxdeploy-plugin-gtk.sh" |
| 76 | +chmod +x "{{tauri_tools_path}}/linuxdeploy-${ARCH}.AppImage" |
79 | 77 |
|
80 |
| -dd if=/dev/zero bs=1 count=3 seek=8 conv=notrunc of=linuxdeploy-${ARCH}.AppImage |
| 78 | +dd if=/dev/zero bs=1 count=3 seek=8 conv=notrunc of="{{tauri_tools_path}}/linuxdeploy-${ARCH}.AppImage" |
81 | 79 |
|
82 |
| -OUTPUT="{{appimage_filename}}" ./linuxdeploy-${ARCH}.AppImage --appimage-extract-and-run --appdir "{{app_name}}.AppDir" --plugin gtk ${gst_plugin} --output appimage |
83 |
| -rm -r "{{app_name}}.AppDir" |
84 |
| -mv "{{appimage_filename}}" "$OUTDIR" |
| 80 | +OUTPUT="{{appimage_filename}}" "{{tauri_tools_path}}/linuxdeploy-${ARCH}.AppImage" --appimage-extract-and-run --appdir "{{app_name}}.AppDir" --plugin gtk ${gst_plugin} --output appimage |
0 commit comments