fix(linux): fix KWin script startup crash and embed type-2 ELF runtime in AppImage

This commit is contained in:
2026-10-02 17:25:29 +03:00
parent 08fa97da8f
commit f0107dbef8
4 changed files with 23 additions and 13 deletions
+15 -2
View File
@@ -26,11 +26,24 @@ cp "$PKG_DIR/blocker.svg" "$APPDIR/blocker.svg"
cp "$PKG_DIR/blocker.svg" "$APPDIR/usr/share/icons/hicolor/scalable/apps/"
chmod +x "$APPDIR/AppRun"
SQUASHFS_IMG="$DIST_DIR/appdir.squashfs"
OUTPUT_APPIMAGE="$DIST_DIR/Blocker-x86_64.AppImage"
rm -f "$OUTPUT_APPIMAGE"
RUNTIME_BIN="$PKG_DIR/bin/runtime-x86_64"
rm -f "$OUTPUT_APPIMAGE" "$SQUASHFS_IMG"
echo "Creating AppImage with mksquashfs..."
mksquashfs "$APPDIR" "$OUTPUT_APPIMAGE" -root-owned -noappend -comp xz
mksquashfs "$APPDIR" "$SQUASHFS_IMG" -root-owned -noappend -comp xz
if [ -f "$RUNTIME_BIN" ]; then
echo "Embedding AppImage Type 2 ELF runtime..."
cat "$RUNTIME_BIN" "$SQUASHFS_IMG" > "$OUTPUT_APPIMAGE"
printf '\x41\x49\x02' | dd of="$OUTPUT_APPIMAGE" bs=1 seek=8 count=3 conv=notrunc 2>/dev/null
rm -f "$SQUASHFS_IMG"
else
mv "$SQUASHFS_IMG" "$OUTPUT_APPIMAGE"
fi
chmod +x "$OUTPUT_APPIMAGE"
echo "Built AppImage: $OUTPUT_APPIMAGE"
ls -lh "$OUTPUT_APPIMAGE"