mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-05-18 23:50:16 +00:00
Switch to linuxdeploy for AppImages
This commit is contained in:
@@ -143,11 +143,12 @@ jobs:
|
|||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
sudo make install
|
sudo make install
|
||||||
|
|
||||||
- name: Install linuxdeployqt
|
- name: Install linuxdeploy
|
||||||
working-directory: dep_root/bin
|
working-directory: dep_root/bin
|
||||||
run: |
|
run: |
|
||||||
wget -O linuxdeployqt https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage
|
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
|
||||||
chmod a+x linuxdeployqt
|
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
|
||||||
|
chmod +x linuxdeploy*.AppImage
|
||||||
|
|
||||||
- name: Build Binaries
|
- name: Build Binaries
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
+10
-11
@@ -12,6 +12,8 @@ BUILD_FOLDER=$BUILD_ROOT/build-$BUILD_CONFIG
|
|||||||
DEPLOY_FOLDER=$BUILD_ROOT/deploy-$BUILD_CONFIG
|
DEPLOY_FOLDER=$BUILD_ROOT/deploy-$BUILD_CONFIG
|
||||||
INSTALLER_FOLDER=$BUILD_ROOT/installer-$BUILD_CONFIG
|
INSTALLER_FOLDER=$BUILD_ROOT/installer-$BUILD_CONFIG
|
||||||
|
|
||||||
|
LINUXDEPLOY=linuxdeploy-$(uname -m).AppImage
|
||||||
|
|
||||||
if [ -n "$CI_VERSION" ]; then
|
if [ -n "$CI_VERSION" ]; then
|
||||||
VERSION=$CI_VERSION
|
VERSION=$CI_VERSION
|
||||||
else
|
else
|
||||||
@@ -19,7 +21,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
command -v qmake6 >/dev/null 2>&1 || fail "Unable to find 'qmake6' in your PATH!"
|
command -v qmake6 >/dev/null 2>&1 || fail "Unable to find 'qmake6' in your PATH!"
|
||||||
command -v linuxdeployqt >/dev/null 2>&1 || fail "Unable to find 'linuxdeployqt' in your PATH!"
|
command -v $LINUXDEPLOY >/dev/null 2>&1 || fail "Unable to find '$LINUXDEPLOY' in your PATH!"
|
||||||
|
|
||||||
echo Cleaning output directories
|
echo Cleaning output directories
|
||||||
rm -rf $BUILD_FOLDER
|
rm -rf $BUILD_FOLDER
|
||||||
@@ -32,13 +34,13 @@ mkdir $INSTALLER_FOLDER
|
|||||||
|
|
||||||
echo Configuring the project
|
echo Configuring the project
|
||||||
pushd $BUILD_FOLDER
|
pushd $BUILD_FOLDER
|
||||||
# Building with Wayland support will cause linuxdeployqt to include libwayland-client.so in the AppImage.
|
# Building with Wayland support will cause linuxdeploy 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
|
# 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
|
# 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
|
# 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.
|
# work even in X11. To avoid this, we will disable Wayland support for the AppImage.
|
||||||
#
|
#
|
||||||
# We disable DRM support because linuxdeployqt doesn't bundle the appropriate libraries for Qt EGLFS.
|
# We disable DRM support because linuxdeploy doesn't bundle the appropriate libraries for Qt EGLFS.
|
||||||
qmake6 $SOURCE_ROOT/moonlight-qt.pro CONFIG+=disable-wayland CONFIG+=disable-libdrm PREFIX=$DEPLOY_FOLDER/usr DEFINES+=APP_IMAGE || fail "Qmake failed!"
|
qmake6 $SOURCE_ROOT/moonlight-qt.pro CONFIG+=disable-wayland CONFIG+=disable-libdrm PREFIX=$DEPLOY_FOLDER/usr DEFINES+=APP_IMAGE || fail "Qmake failed!"
|
||||||
popd
|
popd
|
||||||
|
|
||||||
@@ -52,17 +54,14 @@ pushd $BUILD_FOLDER
|
|||||||
make install || fail "Make install failed!"
|
make install || fail "Make install failed!"
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# We need to manually place SDL3 in our AppImage, since linuxdeployqt
|
export QML_SOURCES_PATHS=$SOURCE_ROOT/app/gui
|
||||||
# cannot see the dependency via ldd when it looks at SDL2-compat.
|
export QMAKE=qmake6
|
||||||
echo Staging SDL3 library
|
|
||||||
mkdir -p $DEPLOY_FOLDER/usr/lib
|
|
||||||
cp /usr/local/lib/libSDL3.so.0 $DEPLOY_FOLDER/usr/lib/
|
|
||||||
|
|
||||||
echo Creating AppImage
|
echo Creating AppImage
|
||||||
pushd $INSTALLER_FOLDER
|
pushd $INSTALLER_FOLDER
|
||||||
VERSION=$VERSION linuxdeployqt $DEPLOY_FOLDER/usr/share/applications/com.moonlight_stream.Moonlight.desktop \
|
VERSION=$VERSION $LINUXDEPLOY --appdir $DEPLOY_FOLDER \
|
||||||
-qmake=qmake6 -qmldir=$SOURCE_ROOT/app/gui -appimage -extra-plugins=tls \
|
--library=/usr/local/lib/libSDL3.so.0 \
|
||||||
-executable=$DEPLOY_FOLDER/usr/lib/libSDL3.so.0 || fail "linuxdeployqt failed!"
|
--plugin qt --output appimage || fail "linuxdeploy failed!"
|
||||||
popd
|
popd
|
||||||
|
|
||||||
echo Build successful
|
echo Build successful
|
||||||
Reference in New Issue
Block a user