Qt Virtualkeyboard example

Christian Prochaska christian.prochaska at ...1...
Thu Jul 27 00:18:56 CEST 2017


Hi Johannes,

On 26.07.2017 14:42, Johannes Kliemann wrote:
> Hi,
>
> I tried to build the Qt Virtualkeyboard example.
> I adapted the target.mk of the calculatorform example to point to the
> correct project file.
> Make fails at the project file at line 6 with missing separator. This
> part contains the following:
>
> static {
>     QT += svg
>     QTPLUGIN += qtvirtualkeyboardplugin
> }
>
>
> Is there an additional flag required? Manually running qmake && make
> works fine.

the Genode build system does not run qmake, but includes the qmake project file as if it were a Makefile. This works well for simple
project files, but if the project file uses qmake-specific syntax and these parts are relevant, they must be replaced with something
that GNU make understands. In your case it would probably suffice to just delete the 'static {' line and the '}' line.

The 'QT' variable gets evaluated in [1] and there's no svg support right now. A port of the Qt5Svg library would include the
following new files:

- repos/libports/lib/import/import-qt5_svg.mk
- repos/libports/lib/mk/qt5_svg.mk
- repos/libports/lib/mk/qt5_svg_generated.inc

The 'QTPLUGIN' variable does not get evaluated in the 'target_final.inc' file right now. To do that, I think you would need to add
each part of the variable content to the LIBS variable (prefixed with 'qt5_'), resulting in 'LIBS += qt5_qtvirtualkeyboardplugin' in
your case, and then build the plugin as a shared library, similar to the 'qt5_qjpeg' library.

I've attached the generated include files and a patch with the script used to generate the files, in case you need to change the
configuration and regenerate them.

Regards,
Christian

[1] https://github.com/genodelabs/genode/blob/master/repos/libports/src/app/qt5/tmpl/target_final.inc

-------------- next part --------------
QT_DEFINES += -DQT_NO_FOREACH -DQT_NO_USING_NAMESPACE -DQT_BUILD_SVG_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB

QT_INCPATH += \
  qtsvg/src/svg \
  qtsvg/include \
  qtsvg/include/QtSvg \
  qtsvg/include/QtSvg/5.8.0 \
  qtsvg/include/QtSvg/5.8.0/QtSvg \
  qtbase/include/QtWidgets/5.8.0 \
  qtbase/include/QtWidgets/5.8.0/QtWidgets \
  qtbase/include/QtGui/5.8.0 \
  qtbase/include/QtGui/5.8.0/QtGui \
  qtbase/include/QtCore/5.8.0 \
  qtbase/include/QtCore/5.8.0/QtCore \
  qtbase/include \
  qtbase/include/QtWidgets \
  qtbase/include/QtGui \
  qtbase/include/QtCore \
  qtbase/mkspecs/genode-g++

QT_SOURCES += \
  qsvggraphics.cpp \
  qsvghandler.cpp \
  qsvgnode.cpp \
  qsvgstructure.cpp \
  qsvgstyle.cpp \
  qsvgfont.cpp \
  qsvgtinydocument.cpp \
  qsvgrenderer.cpp \
  qsvgwidget.cpp \
  qgraphicssvgitem.cpp \
  qsvggenerator.cpp \
  moc_qsvgwidget.cpp

QT_VPATH += \
  qtsvg/src/svg \

# some source files need to be generated by moc from other source/header files before
# they get #included again by the original source file in the compiling stage

# source files generated from existing header files ('moc_%.cpp: %.h' rule in import-qt5.inc)
# extracted from 'compiler_moc_header_make_all' target

COMPILER_MOC_HEADER_MAKE_ALL_FILES = \
  moc_qsvgrenderer.cpp \
  moc_qsvgwidget.cpp \
  moc_qgraphicssvgitem.cpp

# source files generated from existing source files ('%.moc: %.cpp' rule in import-qt5.inc)
# extracted from 'compiler_moc_source_make_all' rule

COMPILER_MOC_SOURCE_MAKE_ALL_FILES = \
 

-------------- next part --------------
QT_DEFINES += -DQT_VIRTUALKEYBOARD_DEFAULT_STYLE=\"default\" -DQT_VIRTUALKEYBOARD_DESKTOP -DQT_VIRTUALKEYBOARD_HAVE_XCB -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NO_QML_DEBUGGER -DQT_NETWORK_LIB -DQT_CORE_LIB

QT_INCPATH += \
  qtvirtualkeyboard/src/virtualkeyboard \
  qtdeclarative/include \
  qtdeclarative/include/QtQuick \
  qtbase/include/QtGui/5.8.0 \
  qtbase/include/QtGui/5.8.0/QtGui \
  qtbase/include \
  qtbase/include/QtGui \
  qtdeclarative/include/QtQml \
  qtbase/include/QtNetwork \
  qtbase/include/QtCore/5.8.0 \
  qtbase/include/QtCore/5.8.0/QtCore \
  qtbase/include/QtCore \
  qtbase/mkspecs/genode-g++

QT_SOURCES += \
  platforminputcontext.cpp \
  inputcontext.cpp \
  abstractinputmethod.cpp \
  plaininputmethod.cpp \
  inputengine.cpp \
  shifthandler.cpp \
  plugin.cpp \
  inputmethod.cpp \
  selectionlistmodel.cpp \
  defaultinputmethod.cpp \
  abstractinputpanel.cpp \
  enterkeyaction.cpp \
  enterkeyactionattachedtype.cpp \
  settings.cpp \
  virtualkeyboardsettings.cpp \
  trace.cpp \
  desktopinputpanel.cpp \
  inputview.cpp \
  appinputpanel.cpp \
  qrc_default_style.cpp \
  qrc_retro_style.cpp \
  qrc_content.cpp \
  qrc_layouts.cpp \
  moc_platforminputcontext.cpp \
  moc_inputcontext.cpp \
  moc_abstractinputmethod.cpp \
  moc_plaininputmethod.cpp \
  moc_inputengine.cpp \
  moc_shifthandler.cpp \
  moc_inputmethod.cpp \
  moc_selectionlistmodel.cpp \
  moc_defaultinputmethod.cpp \
  moc_abstractinputpanel.cpp \
  moc_enterkeyaction.cpp \
  moc_enterkeyactionattachedtype.cpp \
  moc_settings.cpp \
  moc_virtualkeyboardsettings.cpp \
  moc_plugin.cpp \
  moc_trace.cpp \
  moc_desktopinputpanel.cpp \
  moc_inputview.cpp \
  moc_appinputpanel.cpp

QT_VPATH += \
  qtvirtualkeyboard/src/virtualkeyboard \

# some source files need to be generated by moc from other source/header files before
# they get #included again by the original source file in the compiling stage

# source files generated from existing header files ('moc_%.cpp: %.h' rule in import-qt5.inc)
# extracted from 'compiler_moc_header_make_all' target

COMPILER_MOC_HEADER_MAKE_ALL_FILES = \
  moc_platforminputcontext.cpp \
  moc_inputcontext.cpp \
  moc_abstractinputmethod.cpp \
  moc_plaininputmethod.cpp \
  moc_inputengine.cpp \
  moc_shifthandler.cpp \
  moc_inputmethod.cpp \
  moc_selectionlistmodel.cpp \
  moc_defaultinputmethod.cpp \
  moc_abstractinputpanel.cpp \
  moc_enterkeyaction.cpp \
  moc_enterkeyactionattachedtype.cpp \
  moc_settings.cpp \
  moc_virtualkeyboardsettings.cpp \
  moc_plugin.cpp \
  moc_trace.cpp \
  moc_desktopinputpanel.cpp \
  moc_inputview.cpp \
  moc_appinputpanel.cpp

# source files generated from existing source files ('%.moc: %.cpp' rule in import-qt5.inc)
# extracted from 'compiler_moc_source_make_all' rule

COMPILER_MOC_SOURCE_MAKE_ALL_FILES = \
 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: qt5_create_generated_incs_with_preparation.patch
Type: text/x-patch
Size: 5612 bytes
Desc: not available
URL: <http://lists.genode.org/pipermail/users/attachments/20170727/49f88fb8/attachment.bin>


More information about the users mailing list