Re: Qt Virtualkeyboard example
Thanks, that worked. I forgot to use the whole patch when I tried to run it out of tree on a separate machine. Regards, Johannes Am 14.08.2017 um 16:40 schrieb Christian Prochaska: > Hi Johannes, > > On 14.08.2017 16:03, Johannes Kliemann wrote: >> I finally got the plugin to load. >> What was missing was the correct initialization in QNitpickerIntegration. >> I have added the missing parts to load the QPlatformInputContext [1] and >> it now finds the qtvirtualkeyboardplugin. > > good to hear that! > >> It isn't completely working yet but at least the application shows up. >> What is missing are the dependencies. They require additional shared >> libs. I tried to create the according make fragments with your script >> but after applying qtbase_generated.patch the configure script fails to >> generate qmake with >> >>> You cannot make a shadow build from a source tree containing a previous >>> build. >> on a clean (except that patch) source tree. Do you have any idea about that? > > Did you apply the 'qt5_create_generated_incs_with_preparation.patch' > from a previous mail? The patch reordered the 'series' file, so that > only the following Qt patches would be applied before the Qt > configuration step: > > qtbase_configuration.patch > qtdeclarative_configuration.patch > qttools_configuration.patch > qtwebkit_fixes.patch > qtwebkit_configuration.patch > > Regards, > Christian > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > genode-main mailing list > genode-main@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/genode-main > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Re: Qt Virtualkeyboard example
Hi Johannes, On 14.08.2017 16:03, Johannes Kliemann wrote: > I finally got the plugin to load. > What was missing was the correct initialization in QNitpickerIntegration. > I have added the missing parts to load the QPlatformInputContext [1] and > it now finds the qtvirtualkeyboardplugin. good to hear that! > It isn't completely working yet but at least the application shows up. > What is missing are the dependencies. They require additional shared > libs. I tried to create the according make fragments with your script > but after applying qtbase_generated.patch the configure script fails to > generate qmake with > >> You cannot make a shadow build from a source tree containing a previous >> build. > on a clean (except that patch) source tree. Do you have any idea about that? Did you apply the 'qt5_create_generated_incs_with_preparation.patch' from a previous mail? The patch reordered the 'series' file, so that only the following Qt patches would be applied before the Qt configuration step: qtbase_configuration.patch qtdeclarative_configuration.patch qttools_configuration.patch qtwebkit_fixes.patch qtwebkit_configuration.patch Regards, Christian -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Re: Qt Virtualkeyboard example
Hi Christian, I finally got the plugin to load. What was missing was the correct initialization in QNitpickerIntegration. I have added the missing parts to load the QPlatformInputContext [1] and it now finds the qtvirtualkeyboardplugin. It isn't completely working yet but at least the application shows up. What is missing are the dependencies. They require additional shared libs. I tried to create the according make fragments with your script but after applying qtbase_generated.patch the configure script fails to generate qmake with > You cannot make a shadow build from a source tree containing a previous build. on a clean (except that patch) source tree. Do you have any idea about that? Regards, Johannes [1]: https://github.com/jklmnn/genode/commit/676df58996fe0f9958da49116ee5317edb8226cd Am 09.08.2017 um 09:58 schrieb Johannes Kliemann: > Hi Christian, > > I tried to build the plugin statically but that seems to depend on > static builds of its dependencies (which wouldn't be a big problem) and > the QtQuick2 plugin itself. > > I recreated the directory structure from Linux > (qml/QtQuick/VirtualKeyboard/qmldir) but it still fails to find the > plugin. Even if dynamically loading it is a problem, shouldn't Qt find > the plugin first and then fail to load it? > > Regards, > Johannes > > Am 02.08.2017 um 19:27 schrieb Christian Prochaska: >> Hi Johannes, >> >> On 31.07.2017 15:20, Johannes Kliemann wrote: >>> after applying your commit and fixing the vpaths for the plugin >>> directory it compiles but it still fails to find the >>> qtvirtualkeyboardplugin. >> >> from looking at what gets built and installed with Qt for Linux, it >> seems there are actually multiple plugins involved that need to be >> ported to Genode: one Qt plugin (the one you ported) and multiple >> QtQuick plugins (QtQuick.Layouts, QtQuick.Virtualkeyboard.Styles, >> Qt.labs.folderlistmodel). The layout of the 'qml' directory must >> probably match the one on Linux (/usr/local/Qt-5.8.0/qml), with a >> 'qmldir' file in each sub directory, for the QtQuick plugins to be >> found. The Qt plugin was installed at >> '/usr/local/Qt-5.8.0/plugins/platforminputcontexts/libqtvirtualkeyboardplugin.so' >> on Linux, but I'm not sure if our Qt port can load non-QtQuick plugins >> with 'dlopen()' yet, so I would first try to use it as a static plugin, >> like it is done with the qjpeg plugin. This usually means adding an >> extra file to register the plugin at program start (see >> 'repos/libports/src/lib/qt5/qtbase/src/plugins/imageformats/jpeg/import_plugin.cc'). >> >> Regards, >> Christian >> >> >> -- >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> ___ >> genode-main mailing list >> genode-main@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/genode-main >> > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > genode-main mailing list > genode-main@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/genode-main > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Re: Qt Virtualkeyboard example
Hi Christian, I tried to build the plugin statically but that seems to depend on static builds of its dependencies (which wouldn't be a big problem) and the QtQuick2 plugin itself. I recreated the directory structure from Linux (qml/QtQuick/VirtualKeyboard/qmldir) but it still fails to find the plugin. Even if dynamically loading it is a problem, shouldn't Qt find the plugin first and then fail to load it? Regards, Johannes Am 02.08.2017 um 19:27 schrieb Christian Prochaska: > Hi Johannes, > > On 31.07.2017 15:20, Johannes Kliemann wrote: >> after applying your commit and fixing the vpaths for the plugin >> directory it compiles but it still fails to find the >> qtvirtualkeyboardplugin. > > from looking at what gets built and installed with Qt for Linux, it > seems there are actually multiple plugins involved that need to be > ported to Genode: one Qt plugin (the one you ported) and multiple > QtQuick plugins (QtQuick.Layouts, QtQuick.Virtualkeyboard.Styles, > Qt.labs.folderlistmodel). The layout of the 'qml' directory must > probably match the one on Linux (/usr/local/Qt-5.8.0/qml), with a > 'qmldir' file in each sub directory, for the QtQuick plugins to be > found. The Qt plugin was installed at > '/usr/local/Qt-5.8.0/plugins/platforminputcontexts/libqtvirtualkeyboardplugin.so' > on Linux, but I'm not sure if our Qt port can load non-QtQuick plugins > with 'dlopen()' yet, so I would first try to use it as a static plugin, > like it is done with the qjpeg plugin. This usually means adding an > extra file to register the plugin at program start (see > 'repos/libports/src/lib/qt5/qtbase/src/plugins/imageformats/jpeg/import_plugin.cc'). > > Regards, > Christian > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > genode-main mailing list > genode-main@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/genode-main > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Re: Qt Virtualkeyboard example
Hi Johannes, On 31.07.2017 15:20, Johannes Kliemann wrote: > after applying your commit and fixing the vpaths for the plugin > directory it compiles but it still fails to find the > qtvirtualkeyboardplugin. from looking at what gets built and installed with Qt for Linux, it seems there are actually multiple plugins involved that need to be ported to Genode: one Qt plugin (the one you ported) and multiple QtQuick plugins (QtQuick.Layouts, QtQuick.Virtualkeyboard.Styles, Qt.labs.folderlistmodel). The layout of the 'qml' directory must probably match the one on Linux (/usr/local/Qt-5.8.0/qml), with a 'qmldir' file in each sub directory, for the QtQuick plugins to be found. The Qt plugin was installed at '/usr/local/Qt-5.8.0/plugins/platforminputcontexts/libqtvirtualkeyboardplugin.so' on Linux, but I'm not sure if our Qt port can load non-QtQuick plugins with 'dlopen()' yet, so I would first try to use it as a static plugin, like it is done with the qjpeg plugin. This usually means adding an extra file to register the plugin at program start (see 'repos/libports/src/lib/qt5/qtbase/src/plugins/imageformats/jpeg/import_plugin.cc'). Regards, Christian -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Re: Qt Virtualkeyboard example
Hi Christian, after applying your commit and fixing the vpaths for the plugin directory it compiles but it still fails to find the qtvirtualkeyboardplugin. > qrc:/Basic.qml:31:1: module "QtQuick.VirtualKeyboard" is not installed I can't find the problem at this point. The tar archive seems to be complete and the QtQuick2 plugin which also is in the archive is found correctly. > ./qt/qml/ > ./qt/qml/QtQuick.2/ > ./qt/qml/QtQuick.2/qt5_qtquick2plugin.lib.so > ./qt/qml/QtQuick.2/qmldir > ./qt/qml/QtQuick.VirtualKeyboard/ > ./qt/qml/QtQuick.VirtualKeyboard/qt5_qtvirtualkeyboardplugin.lib.so > ./qt/qml/QtQuick.VirtualKeyboard/qmldir > ./qt/qml/QtQuick.VirtualKeyboard.2/ > ./qt/qml/QtQuick.VirtualKeyboard.2/qt5_qtvirtualkeyboardplugin.lib.so > ./qt/qml/QtQuick.VirtualKeyboard.2/qmldir (I tried both variants of the virtual keyboard directory but none of the worked.) My current state is under [1]. Thanks and regards, Johannes [1]: https://github.com/jklmnn/genode/commit/ae3425c0ff2bbab0502f4216af8f89b172285139 Am 28.07.2017 um 13:26 schrieb Christian Prochaska: > Hi Johannes, > > On 27.07.2017 16:52, Johannes Kliemann wrote: >> Thanks! >> >> I added the QtQuick dependencies and created build files for the QtQuick >> VirtualKeyboard. Currently it fails to build with >> >>> In file included from >>> ../../../../../contrib/qt5-bd7410b31ae57d778d9da6599c0a4e887fa44fa8/src/lib/qt5/qt-everywhere-opensource-src-5.8.0/qtvirtualkeyboard/src/virtualkeyboard/plugin.h:33:0, >>> from moc_plugin.cpp:9: >>> /media/jkliemann/40f41e9a-0a52-48f2-8434-36a2711b6c79/componolit/genode/contrib/qt5-bd7410b31ae57d778d9da6599c0a4e887fa44fa8/src/lib/qt5/qt-everywhere-opensource-src-5.8.0/qtdeclarative/include/QtQml/QtQml:3:30: >>> fatal error: QtQml/QtQmlDepends: Datei oder Verzeichnis nicht gefunden >>> #include >> This file seems to be autogenerated by the MOC but I cannot see what >> causes it to fail. > > These dependency header files are generated together with the > 'qt5_*_generated.inc' files and need to be patched into the source tree > when preparing the port. For some reason they are currently missing in > the patch for the 'qtdeclarative' module. I've added them in [1], > together with the QtSvgDepends header file. > > [1] > https://github.com/cproc/genode/commit/12d865a742fbd4b55879a48dcefcacdc59ade6d7 > > Regards, > Christian > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > genode-main mailing list > genode-main@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/genode-main > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Re: Qt Virtualkeyboard example
Hi Johannes, On 27.07.2017 13:50, Johannes Kliemann wrote: > How can I add QtQuick dependencies on Genode, is there already some code > example? there are two QtQuick examples in the libports repository: qt5_quicktest.run and qt5_samegame.run. Regards, Christian -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Re: Qt Virtualkeyboard example
Hi Christian, thanks for your help, I was able to build the virtualkeyboard example for Genode [1]. Currently it fails run due to missing QtQuick dependencies. Beside that some called functions are not yet implemented but I think the missing dependencies make it fail in the first place. > [init -> basic] Warning: geteuid: geteuid not implemented > [init -> basic] Warning: getuid: getuid not implemented > [init -> basic] read_rtc: rtc not configured, returning 0 > [init -> basic] Warning: getpid: getpid not implemented > [init -> basic] read_rtc: rtc not configured, returning 0 > [init -> basic] JIT is disabled for QML. Property bindings and animations > will be very slow. Visit https://wiki.qt.io/V4 to learn about possible > solutions for your platform. > [init -> basic] Error: no plugin found for mmap(-1) > [init -> basic] Warning: mmap not supported for file descriptor -1 > [init -> basic] Error: no plugin found for mmap(-1) > [init -> basic] Warning: mmap not supported for file descriptor -1 > [init -> basic] Warning: issetugid called, not yet implemented, returning 1 > [init -> basic] Warning: issetugid called, not yet implemented, returning 1 > [init -> basic] Warning: issetugid called, not yet implemented, returning 1 > [init -> basic] Warning: issetugid called, not yet implemented, returning 1 > [init -> basic] qrc:/Basic.qml:30:1: module "QtQuick" is not installed > [init -> basic] qrc:/Basic.qml:31:1: module "QtQuick.VirtualKeyboard" is not > installed > [init -> basic] qrc:/Basic.qml:30:1: module "QtQuick" is not installed > [init -> basic] qrc:/Basic.qml:31:1: module "QtQuick.VirtualKeyboard" is not > installed > [init -> basic] QThread: Destroyed while thread is still running > [init -> basic] Warning: getpid: getpid not implemented > [init -> basic] Warning: kill: kill not implemented > [init -> basic] Warning: _sigaction: _sigaction not implemented > [init -> basic] Warning: getpid: getpid not implemented > [init -> basic] Warning: kill: kill not implemented > [init -> basic] Warning: 4 dangling allocations at allocator destruction time > [init -> basic] Warning: 10 dangling allocations at allocator destruction time > [init] child "basic" exited with exit value 1 How can I add QtQuick dependencies on Genode, is there already some code example? Thanks and regards, Johannes [1]: https://github.com/jklmnn/genode/tree/qt_virtualkeyboard Am 27.07.2017 um 00:18 schrieb Christian Prochaska: > 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 > > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > > ___ > genode-main mailing list > genode-main@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/genode-main > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___
Re: Qt Virtualkeyboard example
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 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=0x05 -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 = \ 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 \