lua-users home
lua-l archive

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

Ty again Steve! Not working yet, but i guess it is close. Going to use the mails and the documentation and try to figure it out for a couple of days.

Will be back.


2012/5/11 steve donovan <>
On Fri, May 11, 2012 at 12:52 PM, steve donovan
<> wrote:
> gluing step. I can reproduce this with a glued soar.exe and yes it is
> a bug.

Although I think it really is an odd case; arg[-1] only really makes
sense for Lua programs.

One fix (around line 477 of soar.lua)


   if not scriptname then usage("no scriptname provided") end
   local lua = arg[-1]


   if not scriptname then usage("no scriptname provided") end
   local lua = arg[-1] or 'lua'

Another approach is to use the packaged soar, just as a Lua script:

D:\dev\lua\luabuild>lua tools\soar.lua -s -o soar tools\soar.lua
_main   tools\soar.lua
ml      C:\Program Files\Lua\5.1\lua\ml.lua
---- binary dependencies ---
batch file written to: soar.bat
output written to: soar-all.lua

That is, you can then use soar.bat to do the same job.

Actually, if your project.lua does not any other Lua modules, then you
can glue it directly.

D:\dev\lua\luabuild>copy con test.lua
local lfs = require 'lfs'
       1 file(s) copied.

D:\dev\lua\luabuild>set PATH=d:\dev\lua\luabuild\bin;%PATH%

D:\dev\lua\luabuild>srlua -m lfs test.lua
d:\dev\lua\luabuild\bin\srluab\lua-lfs.exe test.lua test.exe

Note the '-m lfs' tells srlua to include LuaFileSystem

steve d.

Salvador Balaguer Macia