@@ -46,18 +46,6 @@ declare -a MANUAL_LIBS=(
4646 " libspirv-cross-c-shared.so.0"
4747)
4848
49- declare -a MANUAL_QT_PLUGINS=(
50- " wayland-decoration-client"
51- " wayland-graphics-integration-client"
52- " wayland-shell-integration"
53- )
54-
55- declare -a REMOVE_LIBS=(
56- ' libwayland-client.so*'
57- ' libwayland-cursor.so*'
58- ' libwayland-egl.so*'
59- )
60-
6149set -e
6250
6351DEPSDIR=$( realpath " $SCRIPTDIR /../../dep/prebuilt/linux-x64" )
@@ -68,17 +56,17 @@ APPIMAGERUNTIME=./runtime-x86_64
6856PATCHELF=patchelf
6957
7058if [ ! -f " $LINUXDEPLOY " ]; then
71- retry_command wget -O " $LINUXDEPLOY " https://github.com/stenzek/ duckstation-ext-qt-minimal/ releases/download/linux /linuxdeploy-x86_64.AppImage
59+ retry_command wget -O " $LINUXDEPLOY " https://github.com/duckstation/dependencies/ releases/download/appimage-tools /linuxdeploy-x86_64.AppImage
7260 chmod +x " $LINUXDEPLOY "
7361fi
7462
7563if [ ! -f " $LINUXDEPLOY_PLUGIN_QT " ]; then
76- retry_command wget -O " $LINUXDEPLOY_PLUGIN_QT " https://github.com/stenzek/ duckstation-ext-qt-minimal/ releases/download/linux /linuxdeploy-plugin-qt-x86_64.AppImage
64+ retry_command wget -O " $LINUXDEPLOY_PLUGIN_QT " https://github.com/duckstation/dependencies/ releases/download/appimage-tools /linuxdeploy-plugin-qt-x86_64.AppImage
7765 chmod +x " $LINUXDEPLOY_PLUGIN_QT "
7866fi
7967
8068if [ ! -f " $APPIMAGETOOL " ]; then
81- retry_command wget -O " $APPIMAGETOOL " https://github.com/stenzek/ duckstation-ext-qt-minimal/ releases/download/linux /appimagetool-x86_64.AppImage
69+ retry_command wget -O " $APPIMAGETOOL " https://github.com/duckstation/dependencies/ releases/download/appimage-tools /appimagetool-x86_64.AppImage
8270 chmod +x " $APPIMAGETOOL "
8371fi
8472
@@ -119,9 +107,10 @@ for i in $(find "$DEPSDIR" -iname '*.so'); do
119107done
120108
121109echo " Running linuxdeploy to create AppDir..."
122- EXTRA_QT_PLUGINS =" core;gui;svg;waylandclient; widgets;xcbqpa" \
110+ EXTRA_QT_MODULES =" core;gui;svg;widgets;xcbqpa;waylandcompositor " \
123111EXTRA_PLATFORM_PLUGINS=" libqwayland.so" \
124112DEPLOY_PLATFORM_THEMES=" 1" \
113+ LINUXDEPLOY_EXCLUDED_LIBRARIES=" libwayland-cursor*;libwayland-egl*" \
125114QMAKE=" $DEPSDIR /bin/qmake" \
126115NO_STRIP=" 1" \
127116$LINUXDEPLOY --plugin qt --appdir=" $OUTDIR " --executable=" $BUILDDIR /bin/duckstation-qt" ${EXTRA_LIBS_ARGS[@]} \
@@ -131,34 +120,6 @@ $LINUXDEPLOY --plugin qt --appdir="$OUTDIR" --executable="$BUILDDIR/bin/duckstat
131120echo " Copying resources into AppDir..."
132121cp -a " $BUILDDIR /bin/resources" " $OUTDIR /usr/bin"
133122
134- # LinuxDeploy's Qt plugin doesn't include Wayland support. So manually copy in the additional Wayland libraries.
135- echo " Copying Qt Wayland plugins..."
136- for GROUP in " ${MANUAL_QT_PLUGINS[@]} " ; do
137- srcpath=" $DEPSDIR /plugins/$GROUP "
138- dstpath=" $OUTDIR /usr/plugins/$GROUP "
139- echo " $srcpath -> $dstpath "
140- mkdir -p " $dstpath "
141-
142- for srcsopath in $( find " $DEPSDIR /plugins/$GROUP " -iname ' *.so' ) ; do
143- # This is ../../ because it's usually plugins/group/name.so
144- soname=$( basename " $srcsopath " )
145- dstsopath=" $dstpath /$soname "
146- echo " $srcsopath -> $dstsopath "
147- cp " $srcsopath " " $dstsopath "
148- $PATCHELF --set-rpath ' $ORIGIN/../../lib:$ORIGIN' " $dstsopath "
149- done
150- done
151-
152- # Why do we have to manually remove these libs? Because the linuxdeploy Qt plugin
153- # copies them, not the "main" linuxdeploy binary, and plugins don't inherit the
154- # include list...
155- for lib in " ${REMOVE_LIBS[@]} " ; do
156- for libpath in $( find " $OUTDIR /usr/lib" -name " $lib " ) ; do
157- echo " Removing problematic library ${libpath} ."
158- rm -f " $libpath "
159- done
160- done
161-
162123# Restore unstripped deps (for cache).
163124rm -fr " $DEPSDIR "
164125mv " $DEPSDIR .bak" " $DEPSDIR "
0 commit comments