From: Francesco M. <f18...@ya...> - 2006-02-02 18:06:02
|
Hi, thinking to implementation of the WXLUASETUP_DIR and WXLUABINDLIB_DIR options, I realized one thing. I.e. if I want to install app X (from sources) which has its own wxLua extensions, then I cannot just compile&install wxLua with a standard "./configure && make && make install" (on win32 "cd wxLua/build/msw && nmake -fmakefile.vc"): app X requires wxLua's build options to be modified (i.e. adding something like WXLUASETUP_DIR=X/luaext WXLUABINDLIB_DIR=X/lualib). Ok, this affects only source builds and it won't be the first case that such thing happens. However I think that if that can be avoided, it would be a Good Thing. One way to avoid that could be providing the app X with a way to recompile the wxLua's wxbind module with its own wxluasetup.h. This means that the custom wxbind module would not be generated when wxLua is compiled but rather when app X is compiled. I'm not sure if you had this same idea when you wrote that WXLUASETUP_DIR and WXLUABINDLIB_DIR options should not be exposed in the configure script :) Anyway, on Unix, it wouldn't be such difficult to provide to the guest app X the required info to recompile wxLua's wxbind module. It would probably be somewhat more difficult on win32, but probably still feasible. What do you think of this approach ? Francesco |
From: klaas.holwerda <kho...@xs...> - 2006-02-02 18:28:56
|
Francesco Montorsi wrote: > Hi, > thinking to implementation of the WXLUASETUP_DIR and > WXLUABINDLIB_DIR options, I realized one thing. > > I.e. if I want to install app X (from sources) which has its own wxLua > extensions, then I cannot just compile&install wxLua with a standard > "./configure && make && make install" (on win32 "cd wxLua/build/msw && > nmake -fmakefile.vc"): app X requires wxLua's build options to be > modified (i.e. adding something like WXLUASETUP_DIR=X/luaext > WXLUABINDLIB_DIR=X/lualib). > > Ok, this affects only source builds and it won't be the first case > that such thing happens. However I think that if that can be avoided, > it would be a Good Thing. Absolutely, wxLua is one fixed thing which can be compiled and installed , recompiling whatever bindings in an App, using binding files from wxLua is another thing. > > One way to avoid that could be providing the app X with a way to > recompile the wxLua's wxbind module with its own wxluasetup.h. Rigth and also the location of the library generated as result. > This means that the custom wxbind module would not be generated when > wxLua is compiled but rather when app X is compiled. Exactly, the app only uses stuff from there. > > I'm not sure if you had this same idea when you wrote that > WXLUASETUP_DIR and WXLUABINDLIB_DIR options should not be exposed in > the configure script :) > At least you got it somehow, but indeed that is what i meant to explain :-) > Anyway, on Unix, it wouldn't be such difficult to provide to the guest > app X the required info to recompile wxLua's wxbind module. > It would probably be somewhat more difficult on win32, but probably > still feasible. I think setting the variables inside the App its makefiles should/could do the job. Why would it be complicated ? If the variabes are set, you the same as with wxbind, but here with different locations. > > > What do you think of this approach ? I think it right, Klaas |
From: Francesco M. <f18...@ya...> - 2006-02-02 19:08:26
|
Hi, klaas.holwerda ha scritto: >> Anyway, on Unix, it wouldn't be such difficult to provide to the guest >> app X the required info to recompile wxLua's wxbind module. >> It would probably be somewhat more difficult on win32, but probably >> still feasible. > > I think setting the variables inside the App its makefiles should/could > do the job. > Why would it be complicated ? If the variabes are set, you the same as > with wxbind, but here with different locations. it is 'complicated' because the app X needs to compile sources located in wxLua. Let's say (on Unix) that the user compiles and installs wxLua and then removes the wxLua directory which he used to compile it. app X is then unable to compile its custom wxbind module since wxbind sources do not exist anymore on that system. This should not be a problem on win32 since if you want to compile app X then you probably won't remove the wxbind's sources of wxLua :) However, let's say that we install wxbind sources somewhere (maybe $(prefix)/share/wxlua/wxbind/src and $(prefix)/share/wxlua/wxbind/include). Then, on Unix, the app X would need to just add to its makefile a call like: MAKEFILE=`pkg-config wxlua --variable=wxbindcustom-makefile-location` make -f $MAKEFILE WXLUASETUP_DIR=/myproject/... WXLUABINDLIB_DIR=myproject/... customwxbind On win32 provided that a WXLUA environment variable exists: nmake -f %WXLUA%/modules/wxbind/build/msw/makefile.vc WXLUASETUP_DIR=/myproject/... WXLUABINDLIB_DIR=myproject/... customwxbind Ok, after all it's not that difficult :) Francesco |
From: Francesco M. <f18...@ya...> - 2006-02-03 17:06:00
|
Hi, Francesco Montorsi ha scritto: > Let's say (on Unix) that the user compiles and installs wxLua and then > removes the wxLua directory which he used to compile it. > app X is then unable to compile its custom wxbind module since wxbind > sources do not exist anymore on that system. > This should not be a problem on win32 since if you want to compile app X > then you probably won't remove the wxbind's sources of wxLua :) now wxbind sources, makefiles and default wxluasetup.h are installed on Unix systems in default paths: frm@genius:~/work/wxLua/gtksud/bin$ l /usr/local/include/wxbind/ totale 1,0K drwxr-xr-x 3 root root 256 2006-02-03 17:46 build/ drwxr-xr-x 2 root root 136 2006-02-03 17:38 include/ drwxr-xr-x 2 root root 80 2006-02-03 17:35 setup/ drwxr-xr-x 2 root root 1,1K 2006-02-03 16:41 src/ and if the user tries to go in /usr/local/include/wxbind/build and types make -f makefile.gnu WXLUASETUP_DIR=/mydir WXLUABINDLIB_DIR=/home the wxbindcustom library is correctly built against the wxluasetup.h found there and goes in /home :)) However I still need to test the wxbindcustom makefiles on win32. Francesco |