feather/contrib/AppImage/build-appimage.sh

34 lines
1.1 KiB
Bash
Raw Permalink Normal View History

2022-12-21 15:15:22 +00:00
#!/bin/bash
set -e
unset SOURCE_DATE_EPOCH
2023-03-24 13:22:59 +00:00
# Manually create the AppImage (reproducibly) since linuxdeployqt is not able to create cross-compiled AppImages
2022-12-21 15:15:22 +00:00
APPDIR="$PWD/feather.AppDir"
mkdir -p "$APPDIR"
mkdir -p "$APPDIR/usr/share/applications/"
mkdir -p "$APPDIR/usr/bin"
cp "src/assets/feather.desktop" "$APPDIR/usr/share/applications/feather.desktop"
2023-03-24 13:22:59 +00:00
cp "src/assets/feather.desktop" "$APPDIR/feather.desktop"
2022-12-21 15:15:22 +00:00
cp "src/assets/images/appicons/64x64.png" "$APPDIR/feather.png"
cp "build/bin/feather" "$APPDIR/usr/bin/feather"
chmod +x "$APPDIR/usr/bin/feather"
cp "contrib/AppImage/AppRun" "$APPDIR/"
chmod +x "$APPDIR/AppRun"
find feather.AppDir/ -exec touch -h -a -m -t 202101010100.00 {} \;
mksquashfs feather.AppDir feather.squashfs -comp zstd -info -root-owned -no-xattrs -noappend -fstime 0
2022-12-21 15:15:22 +00:00
# mksquashfs writes a timestamp to the header
printf '\x00\x00\x00\x00' | dd conv=notrunc of=feather.squashfs bs=1 seek=$((0x8))
rm -f feather.AppImage
2022-12-23 15:43:34 +00:00
cat /feather/contrib/depends/${HOST}/runtime >> feather.AppImage
2022-12-21 15:15:22 +00:00
cat feather.squashfs >> feather.AppImage
chmod a+x feather.AppImage