Skip to content

Commit c21affd

Browse files
committed
Switch to linuxdeploy for AppImages
1 parent 7de4e74 commit c21affd

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

.github/workflows/build-appimage.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,12 @@ jobs:
143143
make -j$(nproc)
144144
sudo make install
145145
146-
- name: Install linuxdeployqt
146+
- name: Install linuxdeploy
147147
working-directory: dep_root/bin
148148
run: |
149-
wget -O linuxdeployqt https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage
150-
chmod a+x linuxdeployqt
149+
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
150+
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
151+
chmod +x linuxdeploy*.AppImage
151152
152153
- name: Build Binaries
153154
run: |

scripts/build-appimage.sh

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,16 @@ BUILD_FOLDER=$BUILD_ROOT/build-$BUILD_CONFIG
1212
DEPLOY_FOLDER=$BUILD_ROOT/deploy-$BUILD_CONFIG
1313
INSTALLER_FOLDER=$BUILD_ROOT/installer-$BUILD_CONFIG
1414

15+
LINUXDEPLOY=linuxdeploy-$(uname -m).AppImage
16+
1517
if [ -n "$CI_VERSION" ]; then
1618
VERSION=$CI_VERSION
1719
else
1820
VERSION=`cat $SOURCE_ROOT/app/version.txt`
1921
fi
2022

2123
command -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

2426
echo Cleaning output directories
2527
rm -rf $BUILD_FOLDER
@@ -32,13 +34,13 @@ mkdir $INSTALLER_FOLDER
3234

3335
echo Configuring the project
3436
pushd $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.
4244
qmake6 $SOURCE_ROOT/moonlight-qt.pro CONFIG+=disable-wayland CONFIG+=disable-libdrm PREFIX=$DEPLOY_FOLDER/usr DEFINES+=APP_IMAGE || fail "Qmake failed!"
4345
popd
4446

@@ -52,17 +54,14 @@ pushd $BUILD_FOLDER
5254
make install || fail "Make install failed!"
5355
popd
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

6160
echo Creating AppImage
6261
pushd $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!"
6665
popd
6766

6867
echo Build successful

0 commit comments

Comments
 (0)