closed brace for qt_metacall function
[lqt.git] / BUILD
blob7b437ad2cab3af694ab101308c96ddde45f0b97d
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
11 of the Qt4 series.
13 The generator has been tested only with
14  * gcc 4.3.1
15  * lua 5.1.3
16  * qt 4.3.3-5 and 4.4.0
18 == Unpack the tarball and enter the directory ==
20 tar xzf lqt*.tar.gz
21 cd lqt
23 == Build the C++ parser ==
25 cd cpptoxml
26 qmake
27 make
28 cd ..
30 == Create a cpp file including the module ==
32 mkdir ./src
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
43 e.g.
44 /usr/include/QtGui/QtGui
45 instead of
46 ./src/qtgui.cpp
48 == Create destination directory and generate bindings ==
50 mkdir qtgui_src
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
60 some classes (-f)
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/
71 cd qtgui_src/
72 qmake -project -template lib -o qtgui.pro
73 qmake
74 make
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.