[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: tweaking luac to compile all required .lua files
- From: Petite Abeille <petite.abeille@...>
- Date: Mon, 28 Oct 2013 22:36:15 +0100
On Oct 28, 2013, at 10:18 PM, allanpfalzgraf@eaton.com wrote:
> We would like to compile Lua scripts and all their 'required' .lua files into a single output file that would have no dependencies other than .dll files.
> Any thoughts?
Sure. 'luac' supports multiple files as input.
E.g.
$ luac -o all-in-one.luac module1.lua module2.lua module3.lua ...
Now ' all-in-one.luac' is a compiled aggregation of all the individual lua source files.
Two things to watch out for:
(1) Make sure that your modules are indeed, hmmm, modular
(2) Handle dependencies order somehow
Just a small matter of programming :)