|
From: klaas.holwerda <ng...@kl...> - 2010-04-29 07:54:33
|
John, What do you plan to do? I did an attempt to get it compiled, and although many things were rather easy to solve. (event declaration and bindings to lua for those events) But i am stuck near the end, at least i think it is near end :-) Also i am not always sure if what i made of it is correct. I did only change things to get it working for 2.9, not to keep it working for 2.8. Anyway it looks feasible to have the current wxLua working with wx2.9. If you want, i could sent you what i did sofar?? Or do you think you will find time to change the whole binding stuff to XML/doxygen based. Maybe just get it working for 2.9 for the moment, is less a problem?? Regards, Klaas |
|
From: John L. <jla...@gm...> - 2010-04-29 17:57:55
|
On Thu, Apr 29, 2010 at 3:54 AM, klaas.holwerda <ng...@kl...> wrote:
> John,
>
> What do you plan to do?
Try to not be so lazy? Seriously though, I have written a parser in
Lua for the XML output from the wxWidgets Doxygen documentation. It
can read in all 1000+ files and generate a Lua table with all the
pertinent data saved in a nice orderly manner. It is complete in that
it understands everything in the files and gives warning messages if
there is anything in the XML file that is not understood.
What has to be done is :
1) Create a new repository in SF using SVN to separate 2.8 from 2.9+
2) Separate the XML files into the different wxWidgets libs. I wonder
if I can concat the wxWidgets interface files together by lib (base,
core, adv...) then run Doxygen on them to generate fewer XML files.
This will make it WAY easier to update in the future since I won't
have to diff 1000+ interface files to see what changed.
3) Write the C code generation for the bindings. (this is actually not
the hard part)
4) Have a way to exclude various parts of wxWidgets from wxLua. Not
all functions/classes are useful, but I don't want to edit the
original wxWidgets interface files since comparing and updating them
against newer versions from wxWidgets would be very difficult. I guess
this info will go into the "rules" files, which used to be very
simple, but now they have have to carry all this extra information.
5) The wxWidgets interface files do not have #if wxUSE_WXFEATURE/CLASS
so I will have to add them, probably by sending patches to wxWidgets.
This can be implemented later.
6) Redo all the build files. (this is the hard part)
7) Test and see what's new vs. what is missing from the old interface
files and send patches to wxWidgets as appropriate.
This is a massive undertaking for me, but yes I still plan to do it.
> I did an attempt to get it compiled, and although many things were
> rather easy to solve.
> (event declaration and bindings to lua for those events)
> But i am stuck near the end, at least i think it is near end :-)
> Also i am not always sure if what i made of it is correct. I did only
> change things to get it working for 2.9, not to keep it working for 2.8.
>From the looks of it, making 2.8 and 2.9 work together would be
impossible. You can freely hack away at the generated C binding files
on stuff that you don't care about. For example, if some class
function changed or disappeared, just rem out the code inside these
functions to make them like the code below. Obviously, that
feature/function won't work, but if you don't plan to use it it's a
quick and easy way to get wxLua to compile again.
static int wxLua_wxClass_FunctionName(lua_State* L) { return 1; }
> Anyway it looks feasible to have the current wxLua working with wx2.9.
> If you want, i could sent you what i did sofar??
Nah, not just now.
> Or do you think you will find time to change the whole binding stuff to
> XML/doxygen based.
> Maybe just get it working for 2.9 for the moment, is less a problem??
I haven't tried, but I don't think it should be too hard to get 2.9
working with the current bindings, but then again, maybe a lot more
has changed than I remember. The hardest part is maintaining the class
heirarchy, because that will cause serious problems.
Regards,
John
|
|
From: klaas.holwerda <ng...@kl...> - 2010-04-29 21:31:13
|
John Labenski wrote:
>
>
> Try to not be so lazy?
I already don't understand how you managed to do what wxLua is right
now, more like overly active i would say :-)
> Seriously though, I have written a parser in
> Lua for the XML output from the wxWidgets Doxygen documentation. It
> can read in all 1000+ files and generate a Lua table with all the
> pertinent data saved in a nice orderly manner. It is complete in that
> it understands everything in the files and gives warning messages if
> there is anything in the XML file that is not understood.
>
Oke, that sounds promising.
> 6) Redo all the build files. (this is the hard part)
>
I assume you mean the bakefile stuff.
I am not a fan of bakefile, never appealed to me.
But Premake would fit wxlua perfectly ;-)
I am using Cmake, and only because i can understand it, and it is well
documented etc.
And what i like is that it is possible to generate the binding during
the build process.
With 2.9 all is unicode, and also other things have become more simple.
> This is a massive undertaking for me, but yes I still plan to do it.
>
Indeed, will read it a few time more to understand it :-)
> >From the looks of it, making 2.8 and 2.9 work together would be
> impossible.
I am not aware so much changed. But you must be right. With wxArt2D i
had to change not to much.
But that was easy, wxLua has to deal with all changes.
> You can freely hack away at the generated C binding files
> on stuff that you don't care about. For example, if some class
> function changed or disappeared, just rem out the code inside these
> functions to make them like the code below. Obviously, that
> feature/function won't work, but if you don't plan to use it it's a
> quick and easy way to get wxLua to compile again.
> static int wxLua_wxClass_FunctionName(lua_State* L) { return 1; }
>
Maybe i will try once more. The main thing is that users are asking for
2.9, and i can only offer them half.
But then again, i never had a question on the use of wxLua within
wxArt2D, so i guess most user don't enable the option :-(
To bad, since it makes so much possible.
>> Or do you think you will find time to change the whole binding stuff to
>> XML/doxygen based.
>> Maybe just get it working for 2.9 for the moment, is less a problem??
>>
>
> I haven't tried, but I don't think it should be too hard to get 2.9
> working with the current bindings, but then again, maybe a lot more
> has changed than I remember. The hardest part is maintaining the class
> heirarchy, because that will cause serious problems.
>
Oke i remember that.
And if i can be of help somehow, let me know.
At least i can test ;-)
Klaas
|