[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: A guide to building Lua modules .. and what about standalone programs?
- From: Thijs Schreijer <thijs@...>
- Date: Tue, 15 Apr 2014 07:37:53 +0000
> -----Original Message-----
> From: lua-l-bounces@lists.lua.org [mailto:lua-l-bounces@lists.lua.org] On
> Behalf Of Christian Thaeter
> Sent: dinsdag 15 april 2014 3:40
> To: lua-l@lists.lua.org
> Subject: Re: A guide to building Lua modules .. and what about standalone
> programs?
>
> Am Mon, 14 Apr 2014 23:43:44 +0100
> schrieb Kevin Martin <kev82@khn.org.uk>:
>
> >
> > On 14 Apr 2014, at 18:36, Christian Thaeter <ct@pipapo.org> wrote:
> >
> > > Its prolly doable with Rocks, but I haven't seen anyone using rocks
> > > for this purpose. Are there any other installation/deployment
> > > schemes common for lua programs?
> >
> > We have a system to do this, where the application i.e. Lua code/C
> > modules/read only data are packaged in an SQLite3 database, and we
> > have a specially built 'runner' program that knows how to load code
> > from these databases to handle being executed from command line, or
> > CGI. An application deployment is then simply a script like:
> >
> > #!/path/to/runner
> > --Lua Code
> > --Code to configure application including how to find/create code DB
> >
> > The main reasons we haven't open sourced it are:
> >
> > o It's POSIX only, and most POSIX people seem happy with srlua or
> > similar - i.e. no interest. o It requires /dev/shm to be mounted with
> > execute permissions - disabled by default on most systems (this is to
> > extract the c libraries so we can dlopen them) o We don't have the
> > time to write any decent documentation.
> >
> > If you're interested in how it works, or you think it sounds useful,
> > I'm happy to go into more detail.
>
> Interesting approach. I am currently doing something small for POSIX
> only but would like to port it to windows eventually.
>
> But back to my initial question. I a more interested in how people
> package lua programs so that they could be installed in a portable
> way. Not necessary shipping their own lua interpreter but figure out
> whats installed on the system (lua, luajit, picking a suitable
> version) figure out where the scripts and other resources/config files
> need to be installed, maybe install rocks dependencies and so on. Of
> course one could hack Makefiles or other build systems ('make install')
> to do such or build packages for each target (.deb, .rpm, ...). I am
> just wondering if there is a more lua'ish portable way to deploy lua
> programs.
>
> Thanks
> Christian
>
LuaDist and LuaRocks can both be embedded I think. But if you do so, it would require a platform specific installer to get them on a system in the first place. Catch 22.
If the commandline is available as an option to tell the user to install something, then both can be used to install an application, except for the part of integrating it in the UI subsystem (shortcuts on the Windows startmenu or desktop for example). Recently TekUI was added as a rock in LuaRocks so that makes for a crossplatform UI rock available. LuaDist has other UI libraries available.
So basically there is no complete cross platform deployment option available.
Thijs