From 7dea8d90434cce0f0c56574a94969a76e3c0fa78 Mon Sep 17 00:00:00 2001 From: BailShamber Date: Sun, 28 Nov 2021 09:55:41 +0200 Subject: [PATCH 1/2] Make appimage respect "QT_QPA_PLATFORM" env var. --- scripts/generate_appimages.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/generate_appimages.sh b/scripts/generate_appimages.sh index d7bc71d26..51135b8d6 100755 --- a/scripts/generate_appimages.sh +++ b/scripts/generate_appimages.sh @@ -95,11 +95,11 @@ cp /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so ${BUILD_DIR}/duckstation-qt.AppDi cp -r /usr/lib/x86_64-linux-gnu/qt5/plugins/{xcbglintegrations,platforms,wayland-graphics-integration-client,wayland-decoration-client,wayland-shell-integration} ${BUILD_DIR}/duckstation-qt.AppDir/usr/plugins cat <<'EOF'>> ${BUILD_DIR}/duckstation-qt.AppDir/apprun-hooks/linuxdeploy-plugin-qt-hook.sh -case "${WAYLAND_DISPLAY}" in - *wayland*) +if [ ! -z "${WAYLAND_DISPLAY}" ]; then + if [ -z ${QT_QPA_PLATFORM} ]; then export QT_QPA_PLATFORM=wayland - ;; -esac + fi +fi EOF UPDATE_INFORMATION="zsync|https://github.com/stenzek/duckstation/releases/download/latest/duckstation-qt-x64.AppImage.zsync" \ From 14a7ac78acd9b64c66ab3888060de8415d1d14ba Mon Sep 17 00:00:00 2001 From: BailShamber <49800926+BailShamber@users.noreply.github.com> Date: Sun, 28 Nov 2021 11:27:29 +0200 Subject: [PATCH 2/2] Makes it safe if somehow the WAYLAND_DISPLAY env var is set but incorrectly. Inspired by qurious' solution. --- scripts/generate_appimages.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/generate_appimages.sh b/scripts/generate_appimages.sh index 51135b8d6..726cec7f4 100755 --- a/scripts/generate_appimages.sh +++ b/scripts/generate_appimages.sh @@ -95,7 +95,7 @@ cp /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so ${BUILD_DIR}/duckstation-qt.AppDi cp -r /usr/lib/x86_64-linux-gnu/qt5/plugins/{xcbglintegrations,platforms,wayland-graphics-integration-client,wayland-decoration-client,wayland-shell-integration} ${BUILD_DIR}/duckstation-qt.AppDir/usr/plugins cat <<'EOF'>> ${BUILD_DIR}/duckstation-qt.AppDir/apprun-hooks/linuxdeploy-plugin-qt-hook.sh -if [ ! -z "${WAYLAND_DISPLAY}" ]; then +if [[ "${WAYLAND_DISPLAY}" == "wayland"* ]]; then if [ -z ${QT_QPA_PLATFORM} ]; then export QT_QPA_PLATFORM=wayland fi