2 === Build Instructions ===
4 The lqt bindings have currently no simple build method.
5 They could be used to bind many different libraries and
6 toolkits, but you will have to modify the following commands
7 according to your needs.
9 Here there is a simple and quick method for obtaining the
10 bindings to the QtGui module of (auspicably) any Qt release
13 The generator has been tested only with
16 * qt 4.3.3-5 and 4.4.0
18 == Unpack the tarball and enter the directory ==
23 == Build the C++ parser ==
30 == Create a cpp file including the module ==
33 echo '#include <QtGui>' > ./src/qtgui.cpp
35 == Create the XML description of the file ==
37 ./cpptoxml/cpptoxml -C cpptoxml/parser/rpp/pp-qt-configuration ./src/qtgui.cpp > src/qtgui.xml
39 Rememebr that you have to set the QT_INCLUDE env variable such that
40 $QT_INCLUDE contains the QtCore, QtGui, etc... directories
42 The same command could be issued directly on the header file
44 /usr/include/QtGui/QtGui
48 == Create destination directory and generate bindings ==
51 lua generator/generator.lua src/qtgui.xml -i '<QtGui>' -n qtgui -t generator/types.lua -t generator/qtypes.lua -f generator/qt_internal.lua
53 on windows use the command:
54 lua generator\generator.lua src\qtgui.xml -i '<QtGui>' -n qtgui -t generator\types.lua -t generator\qtypes.lua -f generator\qt_internal.lua
57 The options tell the generator which is the name of the
58 module (-n), which type definitions to use (-t), which files
59 must be included in the final binding (-i), how to filter out
62 Every time you issue this command you will likely end up with
63 different binding file and also a different number of files,
64 even if src/qtgui.xml has not changed. It is probably better
65 to always begin with an empty directory each time, so that
66 there are no leftover files from previous runs.
68 == Copy static files and compile binding ==
70 cp common/lqt_common.?pp qtgui_src/
72 qmake -project -template lib -o qtgui.pro
76 Then wait. If everything works, you will likely have a
77 working lua module named libqtgui.so.1.0.0 . Rename or
78 link as qtcore.so, and place where require can find it.
80 You may have to tell qmake where to find Lua headers.