added QtConcurent class to list of ignored classes
[lqt.git] / BUILD
blob3249d88d49877700e990fef688352a2e85549d84
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 QTDIR env variable such that
40 $QTDIR 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 The options tell the generator which is the name of the
54 module (-n), which type definitions to use (-t), which files
55 must be included in the final binding (-i), how to filter out
56 some classes (-f)
58 Every time you issue this command you will likely end up with
59 different binding file and also a different number of files,
60 even if src/qtgui.xml has not changed. It is probably better
61 to always begin with an empty directory each time, so that
62 there are no leftover files from previous runs.
64 == Copy static files and compile binding ==
66 cp common/lqt_common.?pp qtgui_src/
67 cd qtgui_src/
68 qmake -project -template lib -o qtgui.pro
69 qmake
70 make
72 Then wait. If everything works, you will likely have a
73 working lua module named libqtgui.so.1.0.0 . Rename or
74 link as qtcore.so, and place where require can find it.
76 You may have to tell qmake where to find Lua headers.