From 4da8f8c6fb31d31da29573a2137a66d0f5c65aac Mon Sep 17 00:00:00 2001 From: Marko Bencun Date: Wed, 8 Jan 2025 10:15:35 +0100 Subject: [PATCH] qt/linux: also bundle Wayland platform libs to support Wayland Without these two libraries present, the app will not run natively under Wayland, and only under XWayland (X11 emulator on Wayland). The latter can cause problems, like a slightly blurry app contents. By shipping the libraries, the app should be able to run natively on Wayland. --- .containerversion | 2 +- CHANGELOG.md | 1 + frontends/qt/Makefile | 8 +++++++- scripts/docker_install.sh | 2 ++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.containerversion b/.containerversion index 6f4247a625..f64f5d8d85 100644 --- a/.containerversion +++ b/.containerversion @@ -1 +1 @@ -26 +27 diff --git a/CHANGELOG.md b/CHANGELOG.md index b52a7b171f..16e2ae3812 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Fix address signing fail on screen rotation for Pocket and Bitsurance - Restrict selection to text files when importing notes - Display the hide amount button by default and remove its settings +- Linux: add support for Wayland # 4.46.3 - Fix camera access on linux diff --git a/frontends/qt/Makefile b/frontends/qt/Makefile index 12585f2c8f..82fb5981bf 100644 --- a/frontends/qt/Makefile +++ b/frontends/qt/Makefile @@ -30,7 +30,13 @@ linux: mv build/BitBox build/linux-tmp cp build/assets.rcc build/linux-tmp/ cp server/libserver.so build/linux-tmp - cd build/linux-tmp && /opt/linuxdeployqt-continuous-x86_64.AppImage BitBox -bundle-non-qt-libs -unsupported-allow-new-glibc + cd build/linux-tmp && /opt/linuxdeployqt-continuous-x86_64.AppImage BitBox \ + -bundle-non-qt-libs \ + -unsupported-allow-new-glibc \ + # Add Wayland libs so the app can run natively on Wayland too. + # The linuxdeployqt maintainer unfortunately refuses to support it automatically: https://github.com/probonopd/linuxdeployqt/issues/189 + # The list of related plugins was found by: `find $(qmake -query QT_INSTALL_PLUGINS) | grep wayland` + -extra-plugins=platforms/libqwayland-generic.so,platforms/libqwayland-egl.so,wayland-graphics-integration-client,wayland-decoration-client,wayland-shell-integration cp /usr/lib/x86_64-linux-gnu/nss/* build/linux-tmp/lib cp -aR resources/linux build/tmp-deb cp resources/linux/usr/share/applications/bitbox.desktop build/linux-tmp diff --git a/scripts/docker_install.sh b/scripts/docker_install.sh index e6a513db64..be47ad099b 100755 --- a/scripts/docker_install.sh +++ b/scripts/docker_install.sh @@ -50,6 +50,8 @@ apt-get install -y --no-install-recommends \ libxcb-randr0 \ libxcb-shape0 \ libxcb-xinput0 \ + libwayland-cursor0 \ + libwayland-egl1 \ libcups2 \ libgl1-mesa-dev \ libegl1-mesa-dev \