diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 5d6439c..45d039d 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -19,7 +19,7 @@ jobs: if: always() run: | pacman -Syu --noconfirm base-devel curl desktop-file-utils git wget \ - base-devel patchelf gtk3 strace gimp ffmpeg ghostscript + base-devel patchelf gtk3 strace gimp ffmpeg ghostscript llvm # Artix repos don't have zsyc wget https://london.mirror.pkgbuild.com/extra/os/x86_64/zsync-0.6.2-5-x86_64.pkg.tar.zst diff --git a/gimp-appimage.sh b/gimp-appimage.sh index 326c446..5b92f19 100644 --- a/gimp-appimage.sh +++ b/gimp-appimage.sh @@ -8,11 +8,12 @@ ICON=gimp.png export ARCH="$(uname -m)" export APPIMAGE_EXTRACT_AND_RUN=1 -export VERSION=$(pacman -Q $PACKAGE | awk 'NR==1 {print $2; exit}') +export VERSION="$(pacman -Q $PACKAGE | awk 'NR==1 {print $2; exit}')" -APPIMAGETOOL="https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-$ARCH.AppImage" UPINFO="gh-releases-zsync|$(echo $GITHUB_REPOSITORY | tr '/' '|')|continuous|*$ARCH.AppImage.zsync" LIB4BN="https://raw.githubusercontent.com/VHSgunzo/sharun/refs/heads/main/lib4bin" +URUNTIME="$(wget -q https://api.github.com/repos/VHSgunzo/uruntime/releases -O - \ + | sed 's/[()",{} ]/\n/g' | grep -oi "https.*appimage.*dwarfs.*$ARCH$" | head -1)" # Prepare AppDir mkdir -p ./"$PACKAGE"/AppDir/shared/lib \ @@ -117,14 +118,28 @@ cp ./sharun ./shared/lib/gimp/2.0 ln -s ../../../ ./shared/lib/gimp/2.0/shared/lib ./sharun -g -# MAKE APPIAMGE WITH FUSE3 COMPATIBLE APPIMAGETOOL +# MAKE APPIMAGE WITH URUNTIME cd .. -wget -q "$APPIMAGETOOL" -O ./appimagetool -chmod +x ./appimagetool - -./appimagetool --comp zstd \ - --mksquashfs-opt -Xcompression-level --mksquashfs-opt 22 \ - -n -u "$UPINFO" "$PWD"/AppDir "$PWD"/"$PACKAGE"-"$VERSION"-"$ARCH".AppImage +wget -q "$URUNTIME" -O ./uruntime +chmod +x ./uruntime + +#Add udpate info to runtime +echo "Adding update information \"$UPINFO\" to runtime..." +printf "$UPINFO" > data.upd_info +llvm-objcopy --update-section=.upd_info=data.upd_info \ + --set-section-flags=.upd_info=noload,readonly ./uruntime +printf 'AI\x02' | dd of=./uruntime bs=1 count=3 seek=8 conv=notrunc + +echo "Generating AppImage..." +./uruntime --appimage-mkdwarfs -f \ + --set-owner 0 --set-group 0 \ + --no-history --no-create-timestamp \ + --compression zstd:level=22 -S26 -B16 \ + --header uruntime \ + -i ./AppDir -o "$PACKAGE"-"$VERSION"-"$ARCH"-anylinux.AppImage + +echo "Generating zsync file..." +zsyncmake *.AppImage -u *.AppImage mv ./*.AppImage* ../ cd ..