lua-users home
lua-l archive

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


Hi again list,

after a couple of days trying to build Lua5.2 from Steve's Luabild, and fail horribly (still, thanks Steve!), Im back with LfW. But things are getting better (I think):

Ive glued soar with srlua (after gluing ml.lua first). Maybe by luck, but it works, or so i think, since it prints the options in the cmd.

But now I am trying to use soar to put "lfs" and project.lua in a single file (because is that what it does, or not? I may be a bit confused with the documentation).

What i get is:
C:\Users\Salva\Desktop\srlua\Release>soar project.lua
soar ---------- running project.lua --------------
soar ---------- analysis over -------------
_main   project.lua
---- binary dependencies ---

And get error: "[...]:100:attempt to concatenate local 'lua' (a nil value)"

Also tried putting args at the end (STANDALONE_LUA seemed the one for what ive read at the code(?)), nothing happened.

Do I have to put the "lfs" .h ||.c somewhere? Or any other file?

Sorry for bothering with such simple thing,but seriously dont know how to pull this one out.

Thanks again,


2012/5/9 Salvador Balaguer <s.b.macia@gmail.com>
Hi Steve and many many thanks for the quick answer! Going to try working it out with that and will share how it went as soon as i get something.

Thanks again!


2012/5/9 steve donovan <steve.j.donovan@gmail.com>
On Wed, May 9, 2012 at 3:42 PM, Salvador Balaguer <s.b.macia@gmail.com> wrote:
> list for how to make an exe, and found some indications, as using Luiz's
> luac, and it worked with other lua files. But then comes the 'require "lfs"

Yes, that's exactly the problem!  Luiz has a tool called srlua, which
will 'glue' a Lua executable to a Lua script. This works for simple
cases, straightforward. But there are two problems:

 - you have a binary module (here lfs) which the executable does not contain
 - you have a group of files that you need to make into one script

That is what luabuild (https://github.com/stevedonovan/luabuild) tries
to solve;  it uses soar (which Jay Carlson wrote because he found
Squish too complicated) to do the 'packing' into one script, and uses
srlua to attach this to an executable.  It includes Lua 5.2 and makes
a custom build that contains the external libraries you need.

It does not have very friendly documentation but I am happy to assist;
it works fine on Windows, both MS cl and mingw gcc. (which is what
DevC uses)

steve d.




--
Salvador Balaguer Macia




--
Salvador Balaguer Macia