diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 22ab970592..561646a847 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,76 @@ 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 + # 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 + + 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 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" "$@"