qt: X11 support
PATCH v2 1/1 qt: X11 support
Also reworked the QT_QMAKE_SET macro, to make it work on all qmakespecs.
--- package/qt/Config.in | 22 ++++++++++++++++++++++ package/qt/qt.mk | 12 +++++++++--- 2 files changed, 31 insertions(+), 3 deletions(-)
package/qt/Config.in +22 -0
@@ -85,6 +85,26 @@ config BR2_PACKAGE_QT_GUI_MODULE video output, or you don't require Qt GUI, say n. if BR2_PACKAGE_QT_GUI_MODULE + +choice + prompt "GUI Backend" + help + Select the graphic system, used to arbitrate screen access. + +config BR2_PACKAGE_QT_GUI_QWS + bool "QWS" + default y if !BR2_PACKAGE_XORG7 + help + QWS is a compact and efficient windowing system. Using it, Qt-based + applications write directly to the Linux framebuffer, eliminating the + need for the X Window System. + +config BR2_PACKAGE_QT_GUI_X11 + depends on BR2_PACKAGE_XORG7 + bool "X Window System" + default y if BR2_PACKAGE_XORG7 +endchoice + menu "Pixel depths" comment "Deselecting each option leads to Qt's default (8,16,32)"
@@ -255,9 +275,11 @@ endchoice source "package/qt/Config.sql.in" if BR2_PACKAGE_QT_GUI_MODULE +if BR2_PACKAGE_QT_GUI_QWS source "package/qt/Config.gfx.in" source "package/qt/Config.mouse.in" source "package/qt/Config.keyboard.in" +endif config BR2_PACKAGE_QT_PHONON bool "Phonon Module"
package/qt/qt.mk +9 -3
@@ -220,7 +220,14 @@ else QT_EMB_PLATFORM = generic endif +ifeq ($(BR2_PACKAGE_QT_GUI_X11),y) +QT_SPEC = linux-g++ +QT_CONFIGURE_OPTS += -xplatform linux-g++ -arch $(QT_EMB_PLATFORM) +else +QT_SPEC = qws/linux-$(QT_EMB_PLATFORM)-g++ QT_CONFIGURE_OPTS += -embedded $(QT_EMB_PLATFORM) +endif + ifneq ($(BR2_PACKAGE_QT_GUI_MODULE),y) QT_CONFIGURE_OPTS += -no-gui
@@ -433,7 +440,7 @@ endif # End of workaround. # Variable for other Qt applications to use -QT_QMAKE:=$(HOST_DIR)/usr/bin/qmake -spec qws/linux-$(QT_EMB_PLATFORM)-g++ +QT_QMAKE:=$(HOST_DIR)/usr/bin/qmake -spec $(QT_SPEC) ################################################################################ # QT_QMAKE_SET -- helper macro to set <variable> = <value> in
@@ -448,8 +455,7 @@ QT_QMAKE:=$(HOST_DIR)/usr/bin/qmake -spec qws/linux-$(QT_EMB_PLATFORM)-g++ # $(call QT_QMAKE_SET,variable,value,directory) ################################################################################ define QT_QMAKE_SET - $(SED) '/$(1)/d' $(3)/mkspecs/qws/linux-$(QT_EMB_PLATFORM)-g++/qmake.conf - $(SED) '/include.*qws.conf/a$(1) = $(2)' $(3)/mkspecs/qws/linux-$(QT_EMB_PLATFORM)-g++/qmake.conf + $(SED) '/$(1)/d;/^load(qt_config)/i$(1) = $(2)' $(3)/mkspecs/$(QT_SPEC)/qmake.conf endef ifneq ($(BR2_INET_IPV6),y)
Signature · 1 line
1.7.9.1
PATCH v2 1/1 qt: X11 support
Quoted 3 lines · On Sunday 04 March 2012 04:06:41 Ismael Luceno wrote:
Also reworked the
QT_QMAKE_SETmacro, to make it work on all qmakespecs.Signed-off-by Ismael Luceno <[email protected]>
Sorry, I tried your patch and it doesn't work...
Quoted 8 lines
package/qt/Config.in +8
-0+choice + prompt "GUI Backend" + help + Select the graphic system, used to arbitrate screen access. + +config BR2_PACKAGE_QT_GUI_QWS + bool "QWS" + default y if !BR2_PACKAGE_XORG7
package/qt/Config.in config BR2_PACKAGE_QT_GUI_MODULE · line 106
Quoted 10 lines
package/qt/Config.in +10
-0+ help + QWS is a compact and efficient windowing system. Using it, Qt-based + applications write directly to the Linux framebuffer, eliminating the + need for the X Window System. + +config BR2_PACKAGE_QT_GUI_X11 + depends on BR2_PACKAGE_XORG7 + bool "X Window System" + default y if BR2_PACKAGE_XORG7 +endchoice
It looks like this default construct isn't allowed for choices. So it has
to become:
choice
prompt "GUI Backend"
default BR2_PACKAGE_QT_GUI_QWS if !BR2_PACKAGE_XORG7 default BR2_PACKAGE_QT_GUI_X11 if BR2_PACKAGE_XORG7
...
Note that I didn't test this, so please check if it does work (i.e. that
you see what you expect when you enable resp. disable XORG7).
[snip]
package/qt/qt.mk else · line 225
Quoted 11 lines
package/qt/qt.mk +3
-0@@ -220,7 +220,14 @@ else QT_EMB_PLATFORM = generic endif +ifeq ($(BR2_PACKAGE_QT_GUI_X11),y) +QT_SPEC = linux-g++ +QT_CONFIGURE_OPTS += -xplatform linux-g++ -arch $(QT_EMB_PLATFORM)
You will need to add dependencies here. At least libX11 is required, but
I see a lot more in build/qt-4.8.0/config.tests/x11.
You have to test this with a clean build of a minimal config, e.g.
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PACKAGE_QT=y
BR2_PACKAGE_QT_LICENSE_APPROVED=y
# BR2_PACKAGE_QT_XML is not set
# BR2_PACKAGE_QT_SCRIPT is not set
BR2_PACKAGE_XORG7=y
(again, I haven't tested if this config actually works).
And if you want to be sure you have the dependencies right in the .mk
file, run 'make qt' rather than plain 'make'.
[snip]
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286540 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F