[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Automatic Qt bindings for Lua
- From: "Ariel Manzur" <puntob@...>
- Date: Mon, 10 Sep 2007 19:46:18 -0300
On 9/10/07, Mauro Iazzi <mauro.iazzi@gmail.com> wrote:
> Given that much has changed between 4.1 and 4.3, I did not assume it
> could work. The fact is that it is done with tolua++ which is a great
> tool, if you control the source to be bound or it is quite small.
>
> The fact is that it requires some files (pkg) which must describe the
> library code to tolua++. I don't know how those files were obtained
> for Qt 4.1. but (miracles aside) they will not work with Qt 4.3.
> Chances are that they were tweaked by hand (I _really_ don't know) and
> seem not mantained anymore.
As far as I know, the latest code on the SVN does compile with qt4.3
(tested with qt-x11-opensource-src-4.3.0 aparently). Of course the
bulk of the interface is not hand-tweaked (it was something like 15000
methods for the whole thing), but some tweaking is needed to add
convenient things (like transparent qvariants, stuff like that).
But yeah, the API I have is pretty old..
> My code uses gccxml, which is a backend (frontend) of gcc which
> exposes the internal gcc representation of the code as an XML tree.
how much does the parser depend on the 'Expat' library you mention on
the original mail? can it be done using one of the 'pure-lua' parsers
available out there?
Ariel.
> Then my generator processes it and makes the bindings. Ideally, if I
> update to Qt 4.4, I just have to run it again. It would be a forever
> up to date binding. I think it was worth trying whether it was
> feasible.
>
> I'm quite happy of the results. They are almost usable for basic needs.
>
> mauro
>
> On 10/09/2007, Carlos Augusto Teixeira Mendes <cmendes@k2sistemas.com.br> wrote:
> > Have you checked LuaQt by Ariel Manzur?
> >
> > It's pretty complete and works well. Don't know if it has been updated
> > recently. The version we are using is for Qt 4.1.x (latest version is
> > 4.3.x). Beside some small corrections it worked fine for us.
> >
> > cheers,
> > Carlos Augusto.
> >
> > > -----Original Message-----
> > > From: lua-bounces@bazar2.conectiva.com.br
> > > [mailto:lua-bounces@bazar2.conectiva.com.br]On Behalf Of Mauro Iazzi
> > > Sent: Saturday, September 08, 2007 2:46 PM
> > > To: lua@bazar2.conectiva.com.br
> > > Subject: Automatic Qt bindings for Lua
> > >
> > >
> > > Hi all,
> > >
> > > in the past months I used some of my spare time to make Qt bindings
> > > for Lua. I now have a working simple program to show how far I've got,
> > > and a little screencast showing off some capabilities.
> > >
> > > The program is here:
> > > http://linuz.sns.it/~iazzi/lqtutorial.tar.gz
> > >
> > > The screencast is here:
> > > http://linuz.sns.it/~iazzi/tutorial.ogg
> > >
> > > To compile use
> > > qmake
> > > make
> > > ./lqtutorial
> > >
> > > Users of Debian-based systems should be fine using the
> > > lqtutorial.pro.debian file.
> > >
> > > The bindings are autogenerated using the output ogf GCCXML. I included
> > > the bindings for just a few basic classes. I will try and package the
> > > generator in a few days. The generator is written in less than 1000
> > > lines of Lua code, and makes use of the Expat library for parsing XML.
> > >
> > > Among the best hings there is the fact that I did not have to touch
> > > any generated file by hand. They just worked.
> > >
> > > Moreover, they are completely modular, so that I can have the bindings
> > > for only few classes that I actually need. This provides a lot of
> > > modularity, which could be exploited to make very small programs.
> > >
> > > Finally, the generator has only be used on Qt, but is totally generic,
> > > and can be used on any C++ code, although I don't know how well it
> > > would understand some complex features of C++ (as deeply nested local
> > > classes, barbaric use of templates and such).
> > >
> > > I strongly hope that this is of some interest to someone.
> > > Cheers,
> > >
> > > mauro
> > > No virus found in this incoming message.
> > > Checked by AVG.
> > > Version: 7.5.485 / Virus Database: 269.13.13/998 - Release Date:
> > > 9/10/2007 8:48 AM
> > >
> > No virus found in this outgoing message.
> > Checked by AVG.
> > Version: 7.5.485 / Virus Database: 269.13.13/998 - Release Date: 9/10/2007
> > 8:48 AM
> >
> >
>