fix: use --appimage-extract instead of unsquashfs to unpack linuxdeploy
The squashfs magic was not found at any 512-byte boundary because Tauri's linuxdeploy build uses a non-standard layout. Using the AppImage's own --appimage-extract flag extracts squashfs internally without FUSE or needing to locate the offset manually. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -163,18 +163,18 @@ jobs:
|
||||
|
||||
- name: Stage AppRun and linuxdeploy for AppImage bundler
|
||||
run: |
|
||||
set -ex
|
||||
set -e
|
||||
mkdir -p ~/.cache/tauri
|
||||
ls tools/
|
||||
cp tools/AppRun-x86_64 ~/.cache/tauri/AppRun-x86_64
|
||||
chmod +x ~/.cache/tauri/AppRun-x86_64
|
||||
|
||||
wget \
|
||||
wget -q \
|
||||
"https://github.com/tauri-apps/binary-releases/releases/download/linuxdeploy/linuxdeploy-x86_64.AppImage" \
|
||||
-O /tmp/linuxdeploy.AppImage
|
||||
chmod +x /tmp/linuxdeploy.AppImage
|
||||
|
||||
OFFSET=$(python3 -c "d=open('/tmp/linuxdeploy.AppImage','rb').read();o=[i for i in range(0,len(d),512) if d[i:i+4] in (b'hsqs',b'sqsh')];print(o[0]) if o else exit(1)")
|
||||
unsquashfs -d /tmp/linuxdeploy-root -offset "$OFFSET" /tmp/linuxdeploy.AppImage
|
||||
(cd /tmp && /tmp/linuxdeploy.AppImage --appimage-extract)
|
||||
mv /tmp/squashfs-root /tmp/linuxdeploy-root
|
||||
|
||||
gcc -o ~/.cache/tauri/linuxdeploy-x86_64.AppImage tools/ld_wrapper.c
|
||||
chmod +x ~/.cache/tauri/linuxdeploy-x86_64.AppImage
|
||||
|
||||
Reference in New Issue
Block a user