filled function for pushing copies of values
[lqt.git] / BUILD
blob381e15f0bd15c8e2728b891def9822633640934e
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 == Unpack the tarball and enter the directory ==
15 tar xzf lqt*.tar.gz
16 cd lqt
18 == Build the C++ parser ==
20 cd cpptoxml
21 qmake
22 make
23 cd ..
25 == Create a cpp file including the module ==
27 mkdir ./src
28 echo '#include <QtGui>' > ./src/qtgui.cpp
30 == Create the XML description of the file ==
32 ./cpptoxml/cpptoxml -C cpptoxml/parser/rpp/pp-qt-configuration ./src/qtgui.cpp > src/qtgui.xml
34 Rememebr that you have to set the QTDIR env variable such that
35 $QTDIR/include contains the QtCore, QtGui, etc... directories
37 The same command could be issued directly on the header file
38 e.g.
39 /usr/include/QtGui/QtGui
40 instead of
41 ./src/qtgui.cpp
43 == Create destination directory and generate bindings ==
45 mkdir qtgui_src
46 lua generator/generator.lua src/qtgui.xml -i '<QtGui>' -n qtgui -t generator/types.lua -t generator/qtypes.lua -f generator/qt_internal.lua
48 The options tell the generator which is the name of the
49 module (-n), which type definitions to use (-t), which files
50 must be included in the final binding (-i), how to filter out
51 some classes (-f)
53 Every time you issue this command you will likely end up with
54 different binding file and also a different number of files,
55 even if src/qtgui.xml has not changed. It is probably better
56 to always begin with an empty directory each time, so that
57 there are no leftover files from previous runs.
59 == Copy static files and compile binding ==
61 cp common/lqt_common.?pp qtgui_src/
62 cd qtgui_src/
63 qmake -project -template lib -o qtgui.pro
64 qmake
65 make
67 Then wait. If everything works, you will likely have a
68 working lua module named libqtgui.so.1.0.0 . Rename or
69 link as qtcore.so, and place where require can find it.
71 You may have to tell qmake where to find Lua headers.