Skip to content

Commit

Permalink
qt/linux: also bundle Wayland platform libs to support Wayland
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
benma committed Jan 8, 2025
1 parent 3cf3880 commit 4162fd0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions frontends/qt/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ linux:
cp -aR resources/linux build/tmp-deb
cp resources/linux/usr/share/applications/bitbox.desktop build/linux-tmp
cp resources/linux/usr/share/icons/hicolor/128x128/apps/bitbox.png build/linux-tmp
# Add Wayland libs so the app can run natively on Wayland too.
# Use env `QT_QPA_PLATFORM=wayland` to force Wayland.
# linuxdeployqt unfortunately refuses to support it: https://github.com/probonopd/linuxdeployqt/issues/189
cp $(shell qmake -query QT_INSTALL_LIBS)/libQt6WaylandClient.so.6 build/linux-tmp/lib/
cp $(shell qmake -query QT_INSTALL_PLUGINS)/platforms/libqwayland-generic.so build/linux-tmp/plugins/platforms/
chrpath -c -r '$$ORIGIN/../../lib' build/linux-tmp/plugins/platforms/libqwayland-generic.so
# Done with Wayland libs.
mkdir build/tmp-deb/opt/
cp -aR build/linux-tmp build/tmp-deb/opt/bitbox
cd build/linux && fpm --after-install ../../resources/deb-afterinstall.sh -s dir -t deb -n bitbox -v 4.46.3 -C ../tmp-deb/
Expand Down

0 comments on commit 4162fd0

Please sign in to comment.