Skip to content

Deploy dependencies in AppImage #8562

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 63 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,9 @@ jobs:
run: |
npm install
sudo apt-get update
sudo apt-get -y install libfuse2 desktop-file-utils appstream
sudo apt-get -y install wget ffmpeg dconf-gsettings-backend p11-kit-modules libgtk-3-0t64 \
libgdk-pixbuf-2.0-0 libasound2t64 libasound2-plugins libegl1 libpulse0 libegl-mesa0 tar \
libxcb-dri3-0 libxcb-dri2-0 libxcursor1 libxinerama1 libxcb-glx0 libxcb-icccm4 libpci3 zsync

- name: Download Linux build
uses: actions/download-artifact@v4
Expand All @@ -412,21 +414,74 @@ jobs:

APPDIR=build/AppDir
tar -xvf *.tar.* && rm -rf *.tar.*
mv zen/* $APPDIR/
wget "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage"
wget "https://github.com/VHSgunzo/uruntime/releases/latest/download/uruntime-appimage-squashfs-lite-$ARCH"
chmod +x *.AppImage
chmod +x ./uruntime-appimage-squashfs-lite-"$ARCH"
mkdir -p $APPDIR/bin
mv zen/* $APPDIR/bin

# deploy deps so that the appimage can work on musl systems as well as super old distros:
SYSLIBS="/usr/lib/$ARCH-linux-gnu"
cd $APPDIR
wget "https://github.com/VHSgunzo/sharun/releases/latest/download/sharun-$ARCH-aio" -O ./sharun-aio
chmod +x ./sharun-aio
./sharun-aio l -p -v -s -k \
./bin/zen* \
./bin/glxtest \
./bin/vaapitest \
./bin/pingsender \
./bin/lib* \
"$SYSLIBS"/lib*GL* \
"$SYSLIBS"/dri/* \
"$SYSLIBS"/libpci.so* \
"$SYSLIBS"/libxcb-* \
"$SYSLIBS"/libXcursor.so* \
"$SYSLIBS"/libXinerama* \
"$SYSLIBS"/libwayland* \
"$SYSLIBS"/libnss* \
"$SYSLIBS"/libsoftokn3.so \
"$SYSLIBS"/libfreeblpriv3.so \
"$SYSLIBS"/libgtk* \
"$SYSLIBS"/libgdk* \
"$SYSLIBS"/libcanberra* \
"$SYSLIBS"/gdk-pixbuf-*/*/loaders/* \
"$SYSLIBS"/libcloudproviders* \
"$SYSLIBS"/gconv/* \
"$SYSLIBS"/pkcs11/* \
"$SYSLIBS"/gvfs/* \
"$SYSLIBS"/libcanberra*/* \
"$SYSLIBS"/gio/modules/* \
"$SYSLIBS"/pulseaudio/* \
"$SYSLIBS"/alsa-lib/*
rm -f ./sharun-aio
./sharun -g
cd -

wget "https://github.com/VHSgunzo/uruntime/releases/latest/download/uruntime-appimage-dwarfs-$ARCH" -O ./uruntime

chmod +x ./uruntime
chmod +x ./build/AppDir/AppRun

# keep the uruntime mountpoint (massively speeds up launch time)
sed -i 's|URUNTIME_MOUNT=[0-9]|URUNTIME_MOUNT=0|' ./uruntime-appimage-squashfs-lite-"$ARCH"
sed -i 's|URUNTIME_MOUNT=[0-9]|URUNTIME_MOUNT=0|' ./uruntime

# add zsync delta update info
./uruntime --appimage-addupdinfo "$UPINFO"

echo "AppDir: $APPDIR"
ls -al
find .
ls -al "$APPDIR"
./appimagetool-x86_64.AppImage -u "$UPINFO" "$APPDIR" zen-"$ARCH".AppImage --runtime-file ./uruntime-appimage-squashfs-lite-"$ARCH"

echo "Generating AppImage..."
./uruntime --appimage-mkdwarfs -f \
--set-owner 0 --set-group 0 \
--no-history --no-create-timestamp \
--compression zstd:level=22 -S26 -B8 \
--header uruntime \
-i "$APPDIR" -o zen-"$ARCH".AppImage

# make zsync file
echo "Generating zsync file..."
zsyncmake ./zen-"$ARCH".AppImage -u ./zen-"$ARCH".AppImage

mkdir dist
mv zen*AppImage* dist/.
unset ARCH
Expand Down
3 changes: 1 addition & 2 deletions build/AppDir/AppRun
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/sh
CURRENTDIR="$(dirname "$(readlink -f "$0")")"
export PATH="${CURRENTDIR}:${PATH}"
export MOZ_LEGACY_PROFILES=1 # Prevent per installation profiles
export MOZ_APP_LAUNCHER="${APPIMAGE}" # Allows setting as default browser
exec "${CURRENTDIR}/zen" "$@"
exec "${CURRENTDIR}/bin/zen" "$@"