CI/AppImage: deploy all dependencies manually

pull/11243/head
Samuel 3 weeks ago committed by GitHub
parent 17d0227d74
commit a6d7fc6cdc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -162,9 +162,9 @@ jobs:
shell: bash shell: bash
if: matrix.build == 'x86_64-linux' if: matrix.build == 'x86_64-linux'
run: | run: |
# Required as of 22.x https://github.com/AppImage/AppImageKit/wiki/FUSE export APPIMAGE_EXTRACT_AND_RUN=1
sudo add-apt-repository universe sudo add-apt-repository universe
sudo apt install libfuse2 sudo apt install desktop-file-utils zsync
mkdir dist mkdir dist
@ -187,34 +187,35 @@ jobs:
rm -rf runtime/grammars/sources rm -rf runtime/grammars/sources
cp -r runtime "$APP.AppDir/usr/lib/helix/runtime" cp -r runtime "$APP.AppDir/usr/lib/helix/runtime"
# Bundle libc and all dependencies
ldd "$APP.AppDir"/usr/bin/hx | awk -F"[> ]" '{print $4}' \
| xargs -I {} cp -vf {} "$APP.AppDir"/usr/lib
cp -v /lib64/ld-linux-x86-64.so.2 "$APP.AppDir"
rm -f "$APP.AppDir"/usr/lib/ld-linux-x86-64.so.2 2>/dev/null || true
cat << 'EOF' > "$APP.AppDir/AppRun" cat << 'EOF' > "$APP.AppDir/AppRun"
#!/bin/sh #!/bin/sh
APPDIR="$(dirname "$(readlink -f "${0}")")" APPDIR="$(dirname "$(readlink -f "${0}")")"
HELIX_RUNTIME="$APPDIR/usr/lib/helix/runtime" exec "$APPDIR/usr/bin/hx" "$@" unset ARGV0
export HELIX_RUNTIME="$APPDIR/usr/lib/helix/runtime"
exec "$APPDIR/ld-linux-x86-64.so.2" \
--library-path "$APPDIR/usr/lib" "$APPDIR/usr/bin/hx" "$@"
EOF EOF
chmod 755 "$APP.AppDir/AppRun" chmod 755 "$APP.AppDir/AppRun"
curl -Lo linuxdeploy-x86_64.AppImage \ cp contrib/Helix.desktop "$APP.AppDir"
https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage cp contrib/helix.png "$APP.AppDir"
chmod +x linuxdeploy-x86_64.AppImage ln -s helix.png "$APP.AppDir"/.DirIcon
./linuxdeploy-x86_64.AppImage \ curl -Lo appimagetool \
--appdir "$APP.AppDir" -d contrib/Helix.desktop \ "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage"
-i contrib/helix.png --output appimage chmod +x appimagetool
# anylinux appimage ./appimagetool -n -u "$UPDATE_INFORMATION" ./"$APP.AppDir" \
APPIMAGETOOL=$(wget -q https://api.github.com/repos/probonopd/go-appimage/releases -O - \ ./"$APP-$VERSION-$ARCH.AppImage"
| sed 's/[()",{} ]/\n/g' | grep -oi 'https.*continuous.*tool.*86_64.*mage$')
wget -q "$APPIMAGETOOL" -O ./appimagetool mv "$APP-$VERSION-$ARCH.AppImage" \
chmod +x ./appimagetool ./*AppImage "$APP-$VERSION-$ARCH.AppImage.zsync" dist
./"$APP-$VERSION-$ARCH.AppImage" --appimage-extract
./appimagetool -s deploy squashfs-root/usr/share/applications/Helix.desktop
sed -i '13i\export HELIX_RUNTIME="${HERE}"/usr/lib/helix/runtime' squashfs-root/AppRun
ARCH=x86_64 VERSION="$VERSION-anylinux" ./appimagetool -s squashfs-root
mv *anylinux*AppImage dist
mv "$APP"-*-"$ARCH".AppImage \
"$APP"-*-"$ARCH".AppImage.zsync dist
- name: Build archive - name: Build archive
shell: bash shell: bash

Loading…
Cancel
Save