From b8b65038e0745146dfea4a207b122fbf30870ecd Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Fri, 23 May 2025 18:02:19 -0400 Subject: [PATCH 1/6] deploy dependencies in appimage to allow working on all linux systems Signed-off-by: Samuel <36420837+Samueru-sama@users.noreply.github.com> --- .github/workflows/build.yml | 67 ++++++++++++++++++++++++++++++++----- 1 file changed, 59 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 22ab970592..24700a70b2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 @@ -412,21 +414,70 @@ 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 + ) + + 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 + mkdir dist mv zen*AppImage* dist/. unset ARCH From 5165d7a63a3de678adf35deb6f6f50eb16aa117b Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Fri, 23 May 2025 18:04:21 -0400 Subject: [PATCH 2/6] update `AppRun` for sharun sharun automatically sets `PATH` to include the `bin` dir. Zen binary is now in `bin/zen` instead of the top level of the AppDir Signed-off-by: Samuel <36420837+Samueru-sama@users.noreply.github.com> --- build/AppDir/AppRun | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build/AppDir/AppRun b/build/AppDir/AppRun index 105e0801a3..1590d2d910 100644 --- a/build/AppDir/AppRun +++ b/build/AppDir/AppRun @@ -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" "$@" From e1c69f2ea09adf0fc35272c5227f7a2e110dc313 Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Fri, 23 May 2025 18:13:47 -0400 Subject: [PATCH 3/6] make `.zsync` file Signed-off-by: Samuel <36420837+Samueru-sama@users.noreply.github.com> --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 24700a70b2..17073c45f8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -478,6 +478,10 @@ jobs: --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 From 5752cb0683d2a891f0af744ec2ceef3c28eee63a Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Fri, 23 May 2025 19:10:30 -0400 Subject: [PATCH 4/6] remove subshell Signed-off-by: Samuel <36420837+Samueru-sama@users.noreply.github.com> --- .github/workflows/build.yml | 68 ++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 17073c45f8..a4b9beb04d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -419,40 +419,40 @@ jobs: # 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 $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 From a1774610d3bb1cb2fb4c8baab32358896d0b6630 Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Fri, 23 May 2025 20:15:04 -0400 Subject: [PATCH 5/6] `npm run pretty` Signed-off-by: Samuel <36420837+Samueru-sama@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a4b9beb04d..1caf9b12e0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -391,7 +391,7 @@ jobs: sudo apt-get update 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 + libxcb-dri3-0 libxcb-dri2-0 libxcursor1 libxinerama1 libxcb-glx0 libxcb-icccm4 libpci3 zsync - name: Download Linux build uses: actions/download-artifact@v4 From e7a9a79bcbb3d640180f11752a76c3741749ce02 Mon Sep 17 00:00:00 2001 From: Samuel <36420837+Samueru-sama@users.noreply.github.com> Date: Sat, 24 May 2025 19:19:09 -0400 Subject: [PATCH 6/6] fix Zen not finding all bundled libs Signed-off-by: Samuel <36420837+Samueru-sama@users.noreply.github.com> --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1caf9b12e0..561646a847 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -452,6 +452,8 @@ jobs: "$SYSLIBS"/alsa-lib/* rm -f ./sharun-aio ./sharun -g + # It seems Zen has built in code to load shared libs that bypasses --library-path, this fixes it + ln -sr ./lib/lib* ./bin || true cd - wget "https://github.com/VHSgunzo/uruntime/releases/latest/download/uruntime-appimage-dwarfs-$ARCH" -O ./uruntime