mirror of
https://github.com/jellyfin/jellyfin-desktop.git
synced 2026-10-27 00:56:07 +00:00
Three fixes for cross-distro compatibility: - Keep libvdpau.so in the bundle. It's a dispatcher library, not a GPU driver. The backend drivers in /usr/lib/vdpau/ are still excluded. Without the dispatcher, the AppImage fails to start on distros where libvdpau isn't installed by default (e.g. Ubuntu 24.04). - Replace the QtWebEngineProcess bash wrapper with a statically-linked C binary. The bash wrapper was crashing on Ubuntu because the host's /bin/bash was loaded by the host's dynamic linker, which then picked up the bundled Arch glibc via LD_LIBRARY_PATH — an ABI mismatch that segfaults. A static binary has no shared library dependencies, so LD_LIBRARY_PATH is irrelevant to it. - Improve APPDIR derivation in the wrapper. Instead of relying solely on the APPDIR environment variable (which may not be inherited by subprocesses), derive it from the binary's own path via /proc/self/exe.
17 lines
565 B
Bash
17 lines
565 B
Bash
#!/bin/bash
|
|
SELF="$(readlink -f "$0")"
|
|
|
|
# Derive APPDIR from script location if not inherited from AppRun.
|
|
# The script is always under $APPDIR/usr/lib/..., so stripping from
|
|
# /usr/lib/ onward gives us the AppDir root.
|
|
: "${APPDIR:="${SELF%%/usr/lib/*}"}"
|
|
|
|
LIBRARY_PATH="${APPDIR}/usr/lib"
|
|
LIBRARY_PATH="${LIBRARY_PATH}:/usr/lib64:/usr/lib:/lib64:/lib"
|
|
LIBRARY_PATH="${LIBRARY_PATH}:/usr/lib/x86_64-linux-gnu:/lib/x86_64-linux-gnu"
|
|
|
|
exec "$APPDIR/usr/lib/ld-linux-x86-64.so.2" \
|
|
--inhibit-cache \
|
|
--library-path "${LIBRARY_PATH}" \
|
|
"${SELF}.real" "$@"
|