Skip to content

Commit 86479cb

Browse files
Merge pull request #27 from darkmattercoder/xcb-test
Add working xcb config Even though the xcb config flag was passed to configure, the xcb plugin was not installed. This adds a test to the build pipeline which checks for the presence of the xcb plugin after the build. This required some additional packages to satisfy the build configuration.
2 parents 5119895 + 8b382eb commit 86479cb

File tree

6 files changed

+37
-2
lines changed

6 files changed

+37
-2
lines changed

Diff for: .gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@ Makefile
1919
run-tests.sh
2020
tests.pro
2121
/.qmake.stash
22+
tests/build-*
23+
*.pro.user*

Diff for: Dockerfile

+10
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,16 @@ RUN apt-get update && apt-get -y dist-upgrade && apt-get -y --no-install-recomme
5252
libx11-xcb-dev \
5353
libxcb-glx0-dev \
5454
libxkbcommon-x11-dev \
55+
libxcb-shm0-dev \
56+
libxcb-icccm4-dev \
57+
libxcb-image0-dev \
58+
libxcb-keysyms1-dev \
59+
libxcb-render-util0-dev \
60+
libxcb-xinerama0-dev \
61+
x11proto-record-dev \
62+
libxtst-dev \
63+
libatspi2.0-dev \
64+
libatk-bridge2.0-dev \
5565
# bash needed for argument substitution in entrypoint
5666
bash \
5767
# since 5.14.0 we apparently need libdbus-1-dev and libnss3-dev

Diff for: buildconfig/configure-5.15.0.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/sh
22
sed -i -e 's/"-lgds"/"-lfbclient"/' ../qtbase/src/plugins/sqldrivers/configure.json
3-
../configure -prefix $QT_PREFIX -opensource -confirm-license -nomake examples -nomake tests -skip qtwebengine
3+
../configure -prefix $QT_PREFIX -opensource -confirm-license -nomake examples -nomake tests -skip qtwebengine -xcb -bundled-xcb-xinput

Diff for: buildconfig/configure-5.15.1.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/sh
22
sed -i -e 's/"-lgds"/"-lfbclient"/' ../qtbase/src/plugins/sqldrivers/configure.json
3-
../configure -prefix $QT_PREFIX -opensource -confirm-license -nomake examples -nomake tests -skip qtwebengine
3+
../configure -prefix $QT_PREFIX -opensource -confirm-license -nomake examples -nomake tests -skip qtwebengine -xcb -bundled-xcb-xinput

Diff for: tests/xcb-plugin/main.cpp

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#include <QDebug>
2+
#include <QDir>
3+
//#define PLUGIN_DIR "plugindir"
4+
int main() {
5+
QString platformDir = QString(PLUGIN_DIR) + "/platforms";
6+
qDebug() << "searching plugin in directory " << platformDir;
7+
QDir pluginDir(platformDir);
8+
QStringList platformPlugins = pluginDir.entryList();
9+
qDebug() << "plugins found in file system: " << platformPlugins;
10+
if (platformPlugins.contains("libqxcb.so")) {
11+
qDebug() << "xcb plugin found";
12+
return 0;
13+
}
14+
qDebug() << "xcb plugin not found";
15+
return 1;
16+
}

Diff for: tests/xcb-plugin/xcb-plugin.pro

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
QT += core
2+
QT -= gui
3+
TARGET = xcb-plugin
4+
CONFIG += console
5+
TEMPLATE = app
6+
SOURCES += main.cpp
7+
DEFINES += PLUGIN_DIR=\\\"$$[QT_INSTALL_PLUGINS]\\\"

0 commit comments

Comments
 (0)