lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


This is not a proposal. I just add my opinion and my Lua packaging experience. 
It would be helpful if somebody else share his experience on Lua usage.

I prefer the different file types to be separated in different directories. (this is just my personal opinion)

-- Binaries --
Under Windows I have bin/Debug and bin/Release places where all binaries
are stored after compilations, including 3rd party libraries, Lua modules and programs.
My 3rd parties are in libs/ (lua/ curl/ zlib/ ..)
In this way it is very easy to setup a new library or Lua binding using Visual Studio.
For example:
./win32/vc7/lua<binder>.vcproj (of any 3rd party project name)
output dir = ../../bin/$(ConfigurationName)/*.dll
import dir = $(OutDir)/$(TargetName).lib
(ConfigurationName is replaced by Debug or Release)
include paths = ../../libs/curl/include and ../../libs/lua/include
and with only lib path = $(OutDir)

except the include paths this configuration is the same for all my 22 VC projects which number will continue growing

Under Linux the binaries goes to ../../bin/lib*.so
using simple configs+Makefiles similar to Lua 

-- Sources --

-- Sources/Modules --

modules/c/..dir tree like db/luasql/*.c|mak...
 or io/net/luasocket/*.c|mak...

modules/lua/*.lua + ..dir tree as socket/, luaunit/, copas/, ..
modules/java/ <java like packaging>
modules/c#/ ...
modules/cobol/ ...
modules/ada/ ... : )

-- Sources/Framework --
framework/<dirs/subdirs with Lua class defs>

-- Sources/Projects --
projects/<project_name>/<dirs/subdirs with Lua class defs>

then the lua env config looks like:
package.cpath -> %HOME%/bin/$(ConfigurationName)
package.luapath -> %HOME%/modules/lua;%HOME%/projects

where only $(ConfigurationName) is missing under Linux

To be complete I will mention the directory
./config (*.lua cmake/ make/ )
./config/Config.lua -> (ConfigUnix.lua ConfigWindows.lua )

I don't pretent my approach to be the most flexible.
For example it has to be slightly changed when socket.lua start looking its dyn. library luasocket into subdirectories and the same happens with the others. I expect this one day to happen, but for now this works fine for Linux and Windows.

please, somebody tell me about more Lua like working environment.

Regards,
alek


_____________________________________________________________
Get your free email at http://www.crazyland.com