From: John L. <jla...@gm...> - 2006-05-09 02:39:15
|
On 5/8/06, Steve Kieu <ha...@ya...> wrote: > > OK now I got it working with ugly hack :-) > > I undo all changes in loadlib.c and luaconf.h to its original. AND I > manually edit the $WXLUAROOTDIR/modules/Makefile and add > > -DLUA_USE_LINUX to CFLAGS > and > -Wl,-E -ldl -lreadline -lhistory -lncurses to LDFLAGS > > (Just copy from the lua Makefile distribution the linux section) > and everything works as expected :-) > I hope you guys find where it is wrong in the build system and fix it > 'officially', I am sorry I do not know enough about it to help. Ohhh, I see now, you're using configure? It doesn't give the right flags to build lua for unix systems. Francesco, where would you add some checks for configure's system determination to add lua's flags? In wxLua/configure or somewhere in bakefile? See modules/lua/Makefile PLATS=3D aix ansi bsd generic linux macosx mingw posix solaris and modules/lua/src/Makefile where it translates these into the cflags and libs. eg. linux: $(MAKE) all MYCFLAGS=3D-DLUA_USE_LINUX MYLIBS=3D"-Wl,-E -ldl -lreadline -lhistory -lncurses" Maybe it's possible to just translate configure's system to lua's system and just call lua's Makefile as $(MAKE) platform? Though I think the install would be broken then? ----------------------------------------------------------- Steve, for now try to use the Makefiles in the src dirs. If you want to build everything, just go into apps/wxlua/src and type make and you'll get all the libs, though this uses the wx-config script from wxWidgets so it puts the libs along with the wxWidgets libs so that must be a writeable dir, eg. probably not installed to usr/local or wherever. Regards, John Labenski |
From: Francesco M. <f18...@ya...> - 2006-05-10 09:22:37
|
Hi, sorry for late reply: I'm busy with some wx patches currently John Labenski ha scritto: > On 5/8/06, Steve Kieu <ha...@ya...> > wrote: >> >> OK now I got it working with ugly hack :-) >> >> I undo all changes in loadlib.c and luaconf.h to its original. AND I >> manually edit the $WXLUAROOTDIR/modules/Makefile and add >> >> -DLUA_USE_LINUX to CFLAGS >> and >> -Wl,-E -ldl -lreadline -lhistory -lncurses to LDFLAGS >> >> (Just copy from the lua Makefile distribution the linux section) >> and everything works as expected :-) >> I hope you guys find where it is wrong in the build system and fix it >> 'officially', I am sorry I do not know enough about it to help. > > Ohhh, I see now, you're using configure? It doesn't give the right > flags to build lua for unix systems. > > Francesco, where would you add some checks for configure's system > determination to add lua's flags? In wxLua/configure or somewhere in > bakefile? I could do everything in bakefiles if the platforms supported by Lua were one of: PLATFORM_UNIX UNIX variant PLATFORM_WIN32 32bit Windows PLATFORM_MSDOS MS-DOS PLATFORM_MAC Mac OS X or Mac Classic PLATFORM_MACOSX Mac OS X PLATFORM_OS2 OS/2 PLATFORM_BEOS BeOS PLATFORM_SYMBIAN Symbian OS since they do distinctions inside the Unix family, I'll need to put these checks in configure.ac. Unfortunately they will require checks for platforms where I won't be able to test the configure script on... > See modules/lua/Makefile > PLATS= aix ansi bsd generic linux macosx mingw posix solaris > > and modules/lua/src/Makefile where it translates these into the cflags > and libs. eg. > linux: > $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl > -lreadline -lhistory -lncurses" > > Maybe it's possible to just translate configure's system to lua's > system and just call lua's Makefile as $(MAKE) platform? Though I > think the install would be broken then? you're right: it would be easy to just call Lua's Makefile (when using mingw or autoconf); make install would still work however the executable would be named 'lua' and not, as it currently is in wxLua, 'wxlua-lua'. Thus other installations of lua could be overwritten by our version (which I think is not the vanilla version since there's a WXLUA_CODE block - right ?)... Last big problem is that currently doing "make linux" using lua's makefile I get: gcc -O2 -Wall -DLUA_USE_LINUX -c -o lua.o lua.c In file included from lua.h:16, from lua.c:15: luaconf.h:263:31: error: readline/readline.h: No such file or directory luaconf.h:264:30: error: readline/history.h: No such file or directory and in fact, these files are not in my system... installing the "libreadline5-dev" package solved the problem but I think it's just a bad thing to suppose that these readline files are always there. I see that modules/lua/src/Makefile basically just defines the LUA_USE_* symbols and then adds to linker dlopen, readline, history. (it also adds "-Wl,-E" option to the linker). That is, it will be easy to reproduce this behaviour in wxlua bakefiles. Also, since bakefiles would still have to contain lua modules for generating makefiles for MSVC, borland, etc. I think it's best to maintain all lua building stuff in a single place: wxlua bakefiles and avoid calling lua makefile. Thus, in conclusion, if you agree I will do these changes: configure.ac will NOT check for platforms (which is against autoconf-philosophy of "check for features rather than for platforms"), but rather will check & define symbols for - readline => LUA_USE_READLINE - dl => LUA_USE_DLOPEN or LUA_DL_DYLD - mkstemp => LUA_USE_MKSTEMP - isatty => LUA_USE_ISATTY - popen => LUA_USE_POPEN - ulongjmp => LUA_USE_ULONGJMP Francesco |
From: John L. <jla...@gm...> - 2006-05-10 19:06:51
|
On 5/10/06, Francesco Montorsi <f18...@ya...> wrote: > > Ohhh, I see now, you're using configure? It doesn't give the right > > flags to build lua for unix systems. > > > > Francesco, where would you add some checks for configure's system > > determination to add lua's flags? In wxLua/configure or somewhere in > > bakefile? > I could do everything in bakefiles if the platforms supported by Lua > were one of: > > PLATFORM_UNIX UNIX variant > PLATFORM_WIN32 32bit Windows > PLATFORM_MSDOS MS-DOS > PLATFORM_MAC Mac OS X or Mac Classic > PLATFORM_MACOSX Mac OS X > PLATFORM_OS2 OS/2 > PLATFORM_BEOS BeOS > PLATFORM_SYMBIAN Symbian OS > > since they do distinctions inside the Unix family, I'll need to put > these checks in configure.ac. Unfortunately they will require checks for > platforms where I won't be able to test the configure script on... Can we use configure --build=3DBUILD? If it can't be guessed then the user can force it to be whatever they like? > > See modules/lua/Makefile > > PLATS=3D aix ansi bsd generic linux macosx mingw posix solaris > > > > and modules/lua/src/Makefile where it translates these into the cflags > > and libs. eg. > > linux: > > $(MAKE) all MYCFLAGS=3D-DLUA_USE_LINUX MYLIBS=3D"-Wl,-E -ldl > > -lreadline -lhistory -lncurses" > > > > Maybe it's possible to just translate configure's system to lua's > > system and just call lua's Makefile as $(MAKE) platform? Though I > > think the install would be broken then? > you're right: it would be easy to just call Lua's Makefile (when using > mingw or autoconf); make install would still work however the executable > would be named 'lua' and not, as it currently is in wxLua, 'wxlua-lua'. > Thus other installations of lua could be overwritten by our version > (which I think is not the vanilla version since there's a WXLUA_CODE > block - right ?)... Ummm, not anymore, I always define it since the code does nothing unless you actually call it from C. However, for people using rpm systems (like me) I wouldn't want to overwrite the rpm's lua executable. I just read that Fedora now has lua5.1 as a package. > Last big problem is that currently doing "make linux" using lua's > makefile I get: > > gcc -O2 -Wall -DLUA_USE_LINUX -c -o lua.o lua.c > In file included from lua.h:16, > from lua.c:15: > luaconf.h:263:31: error: readline/readline.h: No such file or directory > luaconf.h:264:30: error: readline/history.h: No such file or directory > > and in fact, these files are not in my system... installing the > "libreadline5-dev" package solved the problem but I think it's just a > bad thing to suppose that these readline files are always there. libreadline is used fairly often I think. Is it easy to have configure check for it? They don't use pgk-config, but can you just look for the lib libreadline.so? I think that lua's command prompt interface is much nicer with it, though I don't use it myself. > I see that modules/lua/src/Makefile basically just defines the LUA_USE_* > symbols and then adds to linker dlopen, readline, history. > (it also adds "-Wl,-E" option to the linker). That is, it will be easy > to reproduce this behaviour in wxlua bakefiles. Great. Just note that even for bsd vs. linux we need to have at least -ldl for dynamic library loading, which was the problem in the first place. bsd: $(MAKE) all MYCFLAGS=3D"-DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS=3D= "-Wl,-E" linux: $(MAKE) all MYCFLAGS=3D-DLUA_USE_LINUX MYLIBS=3D"-Wl,-E -ldl -lreadline -lhistory -lncurses" > Also, since bakefiles would still have to contain lua modules for > generating makefiles for MSVC, borland, etc. I think it's best to > maintain all lua building stuff in a single place: wxlua bakefiles and > avoid calling lua makefile. Ok. > Thus, in conclusion, if you agree I will do these changes: > configure.ac will NOT check for platforms (which is against > autoconf-philosophy of "check for features rather than for platforms"), > but rather will check & define symbols for > > - readline =3D> LUA_USE_READLINE > - dl =3D> LUA_USE_DLOPEN or LUA_DL_DYLD > - mkstemp =3D> LUA_USE_MKSTEMP > - isatty =3D> LUA_USE_ISATTY > - popen =3D> LUA_USE_POPEN > - ulongjmp =3D> LUA_USE_ULONGJMP Sounds good. Thanks, John Labenski |
From: Francesco M. <f18...@ya...> - 2006-05-11 11:44:25
|
John Labenski ha scritto: > On 5/10/06, Francesco Montorsi > <f18...@ya...> wrote: >> > Ohhh, I see now, you're using configure? It doesn't give the right >> > flags to build lua for unix systems. >> > >> > Francesco, where would you add some checks for configure's system >> > determination to add lua's flags? In wxLua/configure or somewhere in >> > bakefile? >> I could do everything in bakefiles if the platforms supported by Lua >> were one of: >> >> PLATFORM_UNIX UNIX variant >> PLATFORM_WIN32 32bit Windows >> PLATFORM_MSDOS MS-DOS >> PLATFORM_MAC Mac OS X or Mac Classic >> PLATFORM_MACOSX Mac OS X >> PLATFORM_OS2 OS/2 >> PLATFORM_BEOS BeOS >> PLATFORM_SYMBIAN Symbian OS >> >> since they do distinctions inside the Unix family, I'll need to put >> these checks in configure.ac. Unfortunately they will require checks for >> platforms where I won't be able to test the configure script on... > > Can we use configure --build=BUILD? If it can't be guessed then the > user can force it to be whatever they like? yes, in fact I thought to use exactly that: it's 99.9% times guessed correctly AFAIK with latest autoconf suites (the value guessed is taken by config.guess). But still I won't be able to test configure on platforms != linux. > >> > See modules/lua/Makefile >> > PLATS= aix ansi bsd generic linux macosx mingw posix solaris >> > >> > and modules/lua/src/Makefile where it translates these into the cflags >> > and libs. eg. >> > linux: >> > $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl >> > -lreadline -lhistory -lncurses" >> > >> > Maybe it's possible to just translate configure's system to lua's >> > system and just call lua's Makefile as $(MAKE) platform? Though I >> > think the install would be broken then? >> you're right: it would be easy to just call Lua's Makefile (when using >> mingw or autoconf); make install would still work however the executable >> would be named 'lua' and not, as it currently is in wxLua, 'wxlua-lua'. >> Thus other installations of lua could be overwritten by our version >> (which I think is not the vanilla version since there's a WXLUA_CODE >> block - right ?)... > > Ummm, not anymore, I always define it since the code does nothing > unless you actually call it from C. However, for people using rpm > systems (like me) I wouldn't want to overwrite the rpm's lua > executable. I just read that Fedora now has lua5.1 as a package. > >> Last big problem is that currently doing "make linux" using lua's >> makefile I get: >> >> gcc -O2 -Wall -DLUA_USE_LINUX -c -o lua.o lua.c >> In file included from lua.h:16, >> from lua.c:15: >> luaconf.h:263:31: error: readline/readline.h: No such file or directory >> luaconf.h:264:30: error: readline/history.h: No such file or directory >> >> and in fact, these files are not in my system... installing the >> "libreadline5-dev" package solved the problem but I think it's just a >> bad thing to suppose that these readline files are always there. > > libreadline is used fairly often I think. Is it easy to have configure > check for it? yes, the check is easy... > They don't use pgk-config, but can you just look for the > lib libreadline.so? there's a more detailed test which I find googling a bit - it will do the work ;) > I think that lua's command prompt interface is > much nicer with it, though I don't use it myself. yes, sure > >> I see that modules/lua/src/Makefile basically just defines the LUA_USE_* >> symbols and then adds to linker dlopen, readline, history. >> (it also adds "-Wl,-E" option to the linker). That is, it will be easy >> to reproduce this behaviour in wxlua bakefiles. > > Great. Just note that even for bsd vs. linux we need to have at least > -ldl for dynamic library loading, which was the problem in the first > place. > > bsd: > $(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" > MYLIBS="-Wl,-E" > linux: > $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl > -lreadline -lhistory -lncurses" sorry, I don't understand what you mean... isn't checking for dlopen() enough (if it's present, we just define LUA_USE_DLOPEN). >> - readline => LUA_USE_READLINE >> - dl => LUA_USE_DLOPEN or LUA_DL_DYLD >> - mkstemp => LUA_USE_MKSTEMP >> - isatty => LUA_USE_ISATTY >> - popen => LUA_USE_POPEN >> - ulongjmp => LUA_USE_ULONGJMP > > Sounds good. I've done all changes and they work well. Unfortunately I cannot commit them since SF server is down. Again. :( Francesco |
From: John L. <jla...@gm...> - 2006-05-13 15:57:11
|
On 5/11/06, Francesco Montorsi <f18...@ya...> wrote: > > Great. Just note that even for bsd vs. linux we need to have at least > > -ldl for dynamic library loading, which was the problem in the first > > place. > > > > bsd: > > $(MAKE) all MYCFLAGS=3D"-DLUA_USE_POSIX -DLUA_USE_DLOPEN" > > MYLIBS=3D"-Wl,-E" > > linux: > > $(MAKE) all MYCFLAGS=3D-DLUA_USE_LINUX MYLIBS=3D"-Wl,-E -ldl > > -lreadline -lhistory -lncurses" > sorry, I don't understand what you mean... isn't checking for dlopen() > enough (if it's present, we just define LUA_USE_DLOPEN). You're probably right, I didn't connect dlopen() with -ldl. :) > >> - readline =3D> LUA_USE_READLINE > >> - dl =3D> LUA_USE_DLOPEN or LUA_DL_DYLD > >> - mkstemp =3D> LUA_USE_MKSTEMP > >> - isatty =3D> LUA_USE_ISATTY > >> - popen =3D> LUA_USE_POPEN > >> - ulongjmp =3D> LUA_USE_ULONGJMP > > > > Sounds good. > I've done all changes and they work well. Unfortunately I cannot commit > them since SF server is down. Again. :( Finally back up! But the server has changed to wxlua.cvs.sourceforge.net also the updatesite.sh script fails trying to get the CVS. Do you know what name of the new server to use is? $ export CVSROOT=3D:pserver:anonymous@cvs1:/cvsroot/wxlua $ cvs login Logging in to :pserver:anonymous@cvs1:2401/cvsroot/wxlua CVS password: cvs [login aborted]: connect to cvs1(10.5.1.7):2401 failed: Connection refu= sed ---------------------------------- Finally, if you've modified your cvs and have problems committing things, try this. Copy one of your CVS/Root files to R in the base path of your last wxLua checkout and edit it to look like this. (just add wxlua.cvs.... and change it to your name) :ext:jr...@wx...:/cvsroot/wxlua Then run this to replace all the CVS/Root files with the new one and you don't have to do a new checkout and loose any changes you've made. for f in `find . |grep Root|grep CVS`; do cp -f R $f; done Regards, John Labenski |
From: Steve K. <ha...@ya...> - 2006-05-13 10:38:30
|
Hi all, I need to implement some sort of server and client ; and thinking about using wxLuaSocket but find no sample code to get started. Quick reading the doxygen output let me think most of the method in wxSocket has been overwriten so it is not (I think) possible using it in wxSocket style. I am thinking about using luasocket (kepler project) as well but their uses of coroutine (copas) make me a bit uncomfortable :-). And me think wxLua already provide wxLuaSocket why not using it (even it is not easy to not link with it anyway) I am not quite sure if some body can give me an advice which way to go; wxLuaSocket or luasocket? and if possible provive some sample code with wxLuaSocket to get started. My requirement is: A server listning to one TCP port and serves many client at the same time; for each client spawn a wxClientSocket to initiate the data transfer. (like the wxSocketServer and wxSocketClient model) Thank you in advance. Cheers, S.KIEU --------------------------------- On Yahoo!7 360°: Your own space to share what you want with who you want! |
From: John L. <jla...@gm...> - 2006-05-13 16:10:14
|
On 5/13/06, Steve Kieu <ha...@ya...> wrote: > I need to implement some sort of server and client ; and thinking about > using wxLuaSocket but find no sample code to get started. Quick reading t= he > doxygen output let me think most of the method in wxSocket has been > overwriten so it is not (I think) possible using it in wxSocket style. I = am wxLuaSocket is a C++ class for the wxLua app to communicate with a spawned wxLua process for debugging. It is not a generic socket class, nor is it wrapped for use in lua. Here's the interface file for the socket classes of wxWidgets that wxLua wraps. You use them in wxLua as you would in C++, but I have to admit that I've never tried them. See the wxWidgets documentation. http://wxlua.sourceforge.net/wxLua/bindings/wxwidgets/socket.i > thinking about using luasocket (kepler project) as well but their uses = of > coroutine (copas) make me a bit uncomfortable :-). And me think wxLua Sorry never tried this either. > already provide wxLuaSocket why not using it (even it is not easy to not > link with it anyway) I don't know know what you mean by this? > I am not quite sure if some body can give me an advice which way to go; > > wxLuaSocket or luasocket? > > and if possible provive some sample code with wxLuaSocket to get started. > > My requirement is: > > A server listning to one TCP port and serves many client at the same time= ; > for each client spawn a wxClientSocket > to initiate the data transfer. (like the wxSocketServer and wxSocketClien= t > model) You're probably best off just searching for C++ examples of this and translating them to wxLua. Maybe there's some on the wxWidgets wiki? Good luck, John Labenski |
From: Steve K. <ha...@ya...> - 2006-05-13 21:52:14
|
wxLuaSocket is a C++ class for the wxLua app to communicate with a spawned wxLua process for debugging. It is not a generic socket class, nor is it wrapped for use in lua. Ah ok I understand it now, Thanks Here's the interface file for the socket classes of wxWidgets that wxLua wraps. You use them in wxLua as you would in C++, but I have to admit that I've never tried them. See the wxWidgets documentation. Great ; I will try this way http://wxlua.sourceforge.net/wxLua/bindings/wxwidgets/socket.i > thinking about using luasocket (kepler project) as well but their uses of > coroutine (copas) make me a bit uncomfortable :-). And me think wxLua Sorry never tried this either. couroutine in lua IMHO is not really a replacement for thread. But I think using it in wxLua is convinient enough to overcome the limitation; as if I have a lua_interp = new wxLuaState(NULL, wxID_ANY); and whenever I do a int retval=lua_interp->RunFile(lua_file); wxApp will spawn a new thread (?) to run the lua file and control return immediately. If this is correct then I can spawn several lua_file in OnInit() without blocking the GUI; and the lua_file might be for the server process, the GUI. Correct me if I am wrong please. > already provide wxLuaSocket why not using it (even it is not easy to not > link with it anyway) I don't know know what you mean by this? :-). If you enable wxLuaDebug then you need to enable wxLuaSocket and have to link your application with it even not using it, that is what I mean. But I can build the library only without debug and socket and wxlua, which is fine, just save about 400Kb of size though. Thank you very much. Cheers S.KIEU --------------------------------- On Yahoo!7 Answers: Real people ask and answer questions on any topic. |
From: John L. <jla...@gm...> - 2006-05-14 03:05:11
|
On 5/13/06, Steve Kieu <ha...@ya...> wrote: > > thinking about using luasocket (kepler project) as well but their uses = of > > coroutine (copas) make me a bit uncomfortable :-). And me think wxLua > > Sorry never tried this either. > couroutine in lua IMHO is not really a replacement for thread. But I thin= k > using it in wxLua is convinient enough to overcome the limitation; as if = I > have a > lua_interp =3D new wxLuaState(NULL, wxID_ANY); > and whenever I do a > > int retval=3Dlua_interp->RunFile(lua_file); > > wxApp will spawn a new thread (?) to run the lua file and control return > immediately. If this is correct then I can spawn several lua_file in > OnInit() without blocking the GUI; and the lua_file might be for the serv= er > process, the GUI. > > Correct me if I am wrong please. The wxApp will not spawn a new thread. wxLua runs the lua code in the main thread since it may create GUI elements and therefore *has* to be in the main thread. However the wxWidgets sockets use events so that you can make them non blocking. In this way you can create as many wxLuaStates creating as many wxSockets as you like with each wxLuaState's lua program handling the wxSocketEvents appropriately. > > already provide wxLuaSocket why not using it (even it is not easy to no= t > > link with it anyway) > > I don't know know what you mean by this? > :-). If you enable wxLuaDebug then you need to enable wxLuaSocket and ha= ve > to link your application with it even not using it, that is what I mean. = But > I can build the library only without debug and socket and wxlua, which is > fine, just save about 400Kb of size though. Ok, yes this is probably not clear, I will try to write a little about it in the docs. But to be sure, wxLuaDebug is just some simple debugging code for wxLua and wxLuaSocket is socket code for wxLua to communicate with another wxLua program for debugging. To turn them off set in modules/wxbind/setup/wxluasetup.h #define wxLUA_USE_wxLuaDebugServer 0 otherwise the bindings will have the wxLuaDebugServer which the wxlua app uses to debug programs and therefore you have to link to the wxLuaSocket module. Regards, John Labenski |
From: Steve K. <ha...@ya...> - 2006-05-15 21:46:51
|
Hi everyone, I just hit a small suprise :-); when I tried to use wxWizard and not available in wxLua, then find most of code in dialog.i relating to wxWzard is commented out. this makes me ask, what more widgets that wxLua has **not** wrap wxWidgets? anybody has some sort of table or list, etc.. for faster information. I think this kind of list is good; just imagine somebody when look at the wxluasetup.h and find nearly all there define as 1, he/she is happy to code all wizardary thingy, long long program takes several days and later found out that his code does not work as actual binding not exists yet. (no not for me, I am wise enough to write just 4 lines to test :-) ) Cheers, S.KIEU --------------------------------- The LOST Ninja blog: Exclusive clues, clips and gossip. |
From: John L. <jla...@gm...> - 2006-05-15 22:52:45
|
On 5/15/06, Steve Kieu <ha...@ya...> wrote: > I just hit a small suprise :-); when I tried to use wxWizard and not > available in wxLua, then find most of code in dialog.i relating to wxWzar= d > is commented out. Heh, how do you like that? :) I'm not sure why it is, I probably did it though. There are so many little bits to wxWidgets that we can't possible use them all, so classes like that suffer. I've added it back and hopefully you can use the wxWizardPageSimple... You cannot override the virtual functions currently. You'll need to get the CVS version and recompile. > this makes me ask, what more widgets that wxLua has **not** wrap wxWidget= s? > anybody has some sort of table or list, etc.. for faster information. I > think this kind of list is good; just imagine somebody when look at the > wxluasetup.h and find nearly all there define as 1, he/she is happy to co= de > all wizardary thingy, long long program takes several days and later fou= nd > out that his code does not work as actual binding not exists yet. Well for now every .i file that says "Updated to 2.6.3" has every function for the classes defined in the .i files available to wxLua, unless marked. However, as you've found some classes may be missing altogether, but these are probabgly only ones added in 2.6.x. I have thought about writing a parser for the .i files to turn them into HTML, someday... > (no not for me, I am wise enough to write just 4 lines to test :-) ) You can also just concatenate all the .i files together and use an editor with a nice find dialog to search. Regards, John Labenski |
From: Steve K. <ha...@ya...> - 2006-05-16 21:33:13
|
Heh, how do you like that? :) Still nice to use wxLua :-) currently. You'll need to get the CVS version and recompile. Well for now I must stick with the release version as it is based on lua5.0 and luasql work fine with them. luasql does not work with lua-5.1 in windows (crash) but it is fine in Linux. I probably switch over by the end of the project which I hope luasql will be usesable in win32. (The Kepler team is a bit slow ?) And I do not like wxWirzard at all :-). It is not flexible enough for me; and use wxLua, normal dialog and have finished a 10 pages of wirzard just in 3 hours and can set everything I want, can control every flow I wish. So no need for me to use wxWirzard anymore. However if you want me to test I will try sometime this evening to play with it and let you know later. Another thing about wxSocket on another post; I decided to use luasocket with copas instead of using wxSocket as it support more protocol (have UDP, SMTP support as well ; remind me one unpleasant time I had to write a SMTP class for my previous project in wxWidgets c++ because the current wxSMTP in wiki is really messy and unuseable; and write the low level of SMTP protocol like this makes me nut :-), esp. dealing with email server picky like qmail ! ) and proves quite stable, programming interface is simpler. So it might be somtime to test these function in wxLua ; if I have spare in some evenings. Cheers, thank you very much for your reply. All the best. S.KIEU --------------------------------- On Yahoo!7 Socceroos Central: Latest news, schedule, blogs and videos. |
From: Josh T. <zen...@ya...> - 2006-05-16 13:04:06
|
Is it possible that there will be a binary release that uses shared libraries based on the lua binaries project? I can't use any of my C library bindings with wxLua anymore because everything is statically linked. I can with the old 2.4 release because it uses shared libraries. I've tried building it myself but it seems a pretty large undertaking, at least on Windows. --------------------------------- New Yahoo! Messenger with Voice. Call regular phones from your PC and save big. |
From: Steve K. <ha...@ya...> - 2006-05-16 21:39:41
|
shared libraries. I've tried building it myself but it seems a pretty large undertaking, at least on Windows. Building wxLua in windows is very easy, I did with VC -2003 even I am so awkward in win32 environment and VC ; not require any tricks at all; just edit some Makefile.vc in the build directory to agree with wx-2.6.3 config as well and some time to spend, VC compiles fast. Cheers, --------------------------------- New Yahoo! Messenger with Voice. Call regular phones from your PC and save big. S.KIEU --------------------------------- The LOST Ninja blog: Exclusive clues, clips and gossip. |
From: John L. <jla...@gm...> - 2006-05-16 22:19:56
|
On 5/16/06, Steve Kieu <ha...@ya...> wrote: > > shared libraries. I've tried building it myself but it seems a pretty la= rge > undertaking, at least on Windows. > > Building wxLua in windows is very easy, I did with VC -2003 even I am so > awkward in win32 environment and VC ; not require any tricks at all; just > edit some Makefile.vc in the build directory to agree with wx-2.6.3 confi= g > as well and some time to spend, VC compiles fast. A little tip, you can specify things on the nmake command like like WX_VERSION=3D27 if you happen to use wxWidgets CVS head. This might save some editing if you make a little batch file. These days just go to wxLua/build/msw and you should find a build file for just about any compiler that wxWidgets can use. Basicly, if you can compile wxWidgets you should be able to get wxLua going as well. -John Labenski |
From: Steve K. <ha...@ya...> - 2006-05-14 04:28:37
|
Here's the interface file for the socket classes of wxWidgets that wxLua wraps. You use them in wxLua as you would in C++, but I have to admit that I've never tried them. See the wxWidgets documentation. http://wxlua.sourceforge.net/wxLua/bindings/wxwidgets/socket.i Hi there, just started to port a sample server from wxWidgets c++ to wxLua but it seems that the support for wxSocket in wxLua is not quite useable yet. please correct if I am wrong. First I did not see any wxSocketEventFlags exported to lua; the socket.i has only one comment line // %enum wxSocketEventFlags %endenum And the method. SetEventHandler of wxSocket is not exported yet so I have no way to set a SOCKET_ID for a socket created in wxLua . Any idea to work around it? S.KIEU --------------------------------- Do you Yahoo!? Yahoo! Personals: It's free to check out our great singles! |
From: John L. <jla...@gm...> - 2006-05-14 07:08:11
|
On 5/14/06, Steve Kieu <ha...@ya...> wrote: > http://wxlua.sourceforge.net/wxLua/bindings/wxwidgets/socket.i > Hi there, just started to port a sample server from wxWidgets c++ to wxLu= a > but it seems that the support for wxSocket in wxLua is not quite useable > yet. please correct if I am wrong. > > First I did not see any wxSocketEventFlags exported to lua; the socket.i > has only one comment line > > // %enum wxSocketEventFlags %endenum These are actually not enums at all, they're actually typedefs in C++. We just treat them as enums. They're added as of this afternoon. > And the method. SetEventHandler of wxSocket is not exported yet so I ha= ve > no way to set a SOCKET_ID for a socket created in wxLua . > > Any idea to work around it? Get the current CVS HEAD, I had just updated all of socket.i earlier today. Let me know if anything is still missing or doesn't work since I just used the docs and the headers to do it. Regards, John Labenski |