@@ -12,14 +12,16 @@ BUILD_FOLDER=$BUILD_ROOT/build-$BUILD_CONFIG
1212DEPLOY_FOLDER=$BUILD_ROOT /deploy-$BUILD_CONFIG
1313INSTALLER_FOLDER=$BUILD_ROOT /installer-$BUILD_CONFIG
1414
15+ LINUXDEPLOY=linuxdeploy-$( uname -m) .AppImage
16+
1517if [ -n " $CI_VERSION " ]; then
1618 VERSION=$CI_VERSION
1719else
1820 VERSION=` cat $SOURCE_ROOT /app/version.txt`
1921fi
2022
2123command -v qmake6 > /dev/null 2>&1 || fail " Unable to find 'qmake6' in your PATH!"
22- command -v linuxdeployqt > /dev/null 2>&1 || fail " Unable to find 'linuxdeployqt ' in your PATH!"
24+ command -v $LINUXDEPLOY > /dev/null 2>&1 || fail " Unable to find '$LINUXDEPLOY ' in your PATH!"
2325
2426echo Cleaning output directories
2527rm -rf $BUILD_FOLDER
@@ -32,13 +34,13 @@ mkdir $INSTALLER_FOLDER
3234
3335echo Configuring the project
3436pushd $BUILD_FOLDER
35- # Building with Wayland support will cause linuxdeployqt to include libwayland-client.so in the AppImage.
37+ # Building with Wayland support will cause linuxdeploy to include libwayland-client.so in the AppImage.
3638# Since we always use the host implementation of EGL, this can cause libEGL_mesa.so to fail to load due
3739# to missing symbols from the host's version of libwayland-client.so that aren't present in the older
3840# version of libwayland-client.so from our AppImage build environment. When this happens, EGL fails to
3941# work even in X11. To avoid this, we will disable Wayland support for the AppImage.
4042#
41- # We disable DRM support because linuxdeployqt doesn't bundle the appropriate libraries for Qt EGLFS.
43+ # We disable DRM support because linuxdeploy doesn't bundle the appropriate libraries for Qt EGLFS.
4244qmake6 $SOURCE_ROOT /moonlight-qt.pro CONFIG+=disable-wayland CONFIG+=disable-libdrm PREFIX=$DEPLOY_FOLDER /usr DEFINES+=APP_IMAGE || fail " Qmake failed!"
4345popd
4446
@@ -52,17 +54,14 @@ pushd $BUILD_FOLDER
5254make install || fail " Make install failed!"
5355popd
5456
55- # We need to manually place SDL3 in our AppImage, since linuxdeployqt
56- # cannot see the dependency via ldd when it looks at SDL2-compat.
57- echo Staging SDL3 library
58- mkdir -p $DEPLOY_FOLDER /usr/lib
59- cp /usr/local/lib/libSDL3.so.0 $DEPLOY_FOLDER /usr/lib/
57+ export QML_SOURCES_PATHS=$SOURCE_ROOT /app/gui
58+ export QMAKE=qmake6
6059
6160echo Creating AppImage
6261pushd $INSTALLER_FOLDER
63- VERSION=$VERSION linuxdeployqt $DEPLOY_FOLDER /usr/share/applications/com.moonlight_stream.Moonlight.desktop \
64- -qmake=qmake6 -qmldir= $SOURCE_ROOT /app/gui -appimage -extra-plugins=tls \
65- -executable= $DEPLOY_FOLDER /usr/lib/libSDL3.so.0 || fail " linuxdeployqt failed!"
62+ VERSION=$VERSION $LINUXDEPLOY --appdir $DEPLOY_FOLDER \
63+ --library=/usr/local/lib/libSDL3.so.0 \
64+ --plugin qt --output appimage || fail " linuxdeploy failed!"
6665popd
6766
6867echo Build successful
0 commit comments