From: John L. <jla...@gm...> - 2005-11-20 04:59:36
|
wxLua now compiles and works completely in Linux. All you need to do is $cd wxLua/apps/wxlua/src $make bindings # generate cpp files from .i files in modules/wxbind $make # compile EVERYTHING needed for wxLua The "make bindings" will eventually become unnecessary since the bindings have all the appropropriate #ifdefs to compile on any platform and version of wxWidgets, but I'd like to test a little more. The previous problem was with the lines %win %class wxMessageDialog, wxDialog FIXME THIS DOES NOT WORK CURRENTLY %gtk|%mac %class %noclassinfo wxMessageDialog, wxDialog ... in dialogs.i that caused a problem in generating the wrappers. I will try my hand with the bakefiles and get it going in MSW in the next few days. ************************************** wxLua devs, I am going to switch to using the SF version of wxLua exclusively, so lets try to keep the CVS always in a working state (accidents and little oops aside, we're human after all). I don't mind if any changes are made, even if they're significant and not backwards compatible, just write to the list before committing any changes so we'll know how to update own own stuff. If no one responds in a couple days, just ensure that the wxLua sample app works completely, including the samples and assume that no one minds. Remember, nothing is set in stone since the user group of wxLua (at least from the c++ end) is pretty small, I think the lua side should probably remain the same as much as possible. TODO: 1) Create wxLuaState with is a C++ wrapper around the C lua_State with all the functions in internals.cpp as members. This will be a lower level class than the wxLuaInterpreter which will be changed to have a wxLuaState as a member and add the events and whatnot. The wxLuaState will contain all the variables in wxLuaStateVariables (which will be removed) and provide an easy way to do lookups for the state variables from the lua_State. I think the wrappers can benefit from this immensely as well as anybody using wxLua from C++. 2) Preface wxLua to everything in C++, for consistency and clarity. 3) We might as well try to take advantage of the wxPython docs (eg. the little notes in the wxWidgets C++ docs stating how things are different). This will make it easier for wxLua users to know all the differences because we don't overload functions (though we could). This can happen as you come across them and definitely for any newly added classes. For example in C++ wxWindow::ConvertPixelsToDialog wxPoint ConvertPixelsToDialog(const wxPoint& pt) wxSize ConvertPixelsToDialog(const wxSize& sz) wxPython note: In place of a single overloaded method name, wxPython implements the following methods: ConvertDialogPointToPixels(point) Accepts and returns a wxPoint ConvertDialogSizeToPixels(size) Accepts and returns a wxSize 4) Really get the debugging to work much better and get good backtraces when "terror" is called in C. 5) I have some lua code that makes writing lua programs much easier, string manipulation and whatnot. Pretty basic stuff, but I think it's a huge timesaver. I'll add it somewhere and feel free to add your own. We can have both lua code to do stuff and our own non-wxWidgets bindings to make lua a little more powerful. You can use the program bin2c.c or the bin2c.lua that I've just added to turn lua code into a unsigned char array to be compiled. ************************************** For a reference on what to compile and link to, look at apps/wxlua/src/Makefile and Makefile_import. Regards, John Labenski ps. Sorry about taking so long to get the SF version of wxLua going. |