From 6f710faa8e00932e783e8322439d19cc60943889 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Thu, 5 Oct 2023 23:05:07 -0500 Subject: [PATCH] Fix EGL loading in the AppImage --- scripts/build-appimage.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/build-appimage.sh b/scripts/build-appimage.sh index cb76bb4d..f3668652 100755 --- a/scripts/build-appimage.sh +++ b/scripts/build-appimage.sh @@ -27,7 +27,12 @@ mkdir $INSTALLER_FOLDER echo Configuring the project pushd $BUILD_FOLDER -qmake $SOURCE_ROOT/moonlight-qt.pro PREFIX=$DEPLOY_FOLDER/usr DEFINES+=APP_IMAGE || fail "Qmake failed!" +# Building with Wayland support will cause linuxdeployqt to include libwayland-client.so in the AppImage. +# Since we always use the host implementation of EGL, this can cause libEGL_mesa.so to fail to load due +# to missing symbols from the host's version of libwayland-client.so that aren't present in the older +# version of libwayland-client.so from our AppImage build environment. When this happens, EGL fails to +# work even in X11. To avoid this, we will disable Wayland support for the AppImage. +qmake $SOURCE_ROOT/moonlight-qt.pro CONFIG+=disable-wayland PREFIX=$DEPLOY_FOLDER/usr DEFINES+=APP_IMAGE || fail "Qmake failed!" popd echo Compiling Moonlight in $BUILD_CONFIG configuration