diff options
Diffstat (limited to 'src/ivicore/doc/src/examples-qface-tutorial.qdoc')
-rw-r--r-- | src/ivicore/doc/src/examples-qface-tutorial.qdoc | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/ivicore/doc/src/examples-qface-tutorial.qdoc b/src/ivicore/doc/src/examples-qface-tutorial.qdoc index 4fe5726..394fef2 100644 --- a/src/ivicore/doc/src/examples-qface-tutorial.qdoc +++ b/src/ivicore/doc/src/examples-qface-tutorial.qdoc @@ -115,7 +115,7 @@ \section2 Autogeneration Now that our first version of the IDL file is ready, it's time to autogenerate API from it, - using the \l{Qt IVI Autogenerator}{IVI Generator tool}. Similar to + using the \l{Qt IVI Generator}{IVI Generator tool}. Similar to \l{https://doc.qt.io/qt-5/moc.html}{moc}, this autogeneration process is integrated into the qmake Build System and is done on compile time. @@ -393,6 +393,19 @@ function or using the \c QT_PLUGIN_PATH environment variable. For more information, see \l{https://doc.qt.io/qt-5/plugins-howto.html}{How to create Qt Plugins}. + Now everything is in place, but because our plugin links against the frontend library, we need + to make sure the library can be found by the dynamic linker. This can be achieved by + setting the \c LD_LIBRARY_PATH environment variable to our library folder. But this results + in the problem, that every user would need to set this variable to be able to use our + application. + To make things easier for the user, we rather use a relative RPATH instead and annotate our + plugin with the information for the linker, where it might find the needed libraries, relative + to the plugin's location: + + \quotefromfile ivicore/qface-tutorial/chapter3-simulation-backend/backend_simulator/backend_simulator.pro + \skipto INCLUDEPATH + \printuntil QMAKE_RPATHDIR + \section2 Export the QML Types in a QML Plugin In the first chapter, we extended our \c main.cpp to register all types of our autogenerated @@ -429,7 +442,7 @@ search for it and is still using the old hardcoded registration. So, we can now remove the linking step in the \c instrument-cluster.pro file and change our main file accordingly: - \quotefromfile ivicore/qface-tutorial/chapter1-basics/instrument-cluster/main.cpp + \quotefromfile ivicore/qface-tutorial/chapter3-simulation-backend/instrument-cluster/main.cpp \skipto #include \printuntil } @@ -612,7 +625,7 @@ part can also be autogenerated using the IVI Generator in a similar fashion: \quotefromfile ivicore/qface-tutorial/chapter5-ipc/simulation_server/simulation_server.pro - \printto target.path + \printto RESOURCES Because we'd like to generate a server binary, the \c TEMPLATE needs to be set to "app" instead of "lib". Similar to the plugin, the server also needs to link against our library to give it @@ -704,7 +717,7 @@ \quotefromfile ivicore/qface-tutorial/chapter6-own-backend/backend_dbus/instrumentclusterplugin.cpp \skipto #include - \printuntil eof + \printto In \c interfaces() we use the IID which is defined in \c{instrumentclusterbackendinterface.h} from our autogenerated library. In \c insterfaceInstance() we check for the correct string and |