lua-users home
lua-l archive

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


> I suppose it makes packaging a lot easier.  Although do they allow
> separate extensions?

Yep. Not on ios obviously, but for say, a pc or android game using one
of those engines the only reason you cant have a standalone extension
is that it doesnt work against their statically linked copy of lua; a
technical, rather than legal or TOS restriction.

Things like the sqlite bindings, etc. that dont modify the lua runtime work.

Binding everything up and statically linking the extension to the
binary does seem to be the only way to make it work properly.
Obviously this makes the link-time for compiling and testing your
extension huge, as it has to link the entire static binary in the last
step.

Deeply frustrating to work with.

~
Doug.

On Sat, Aug 4, 2012 at 4:11 PM, steve donovan <steve.j.donovan@gmail.com> wrote:
> On Sat, Aug 4, 2012 at 9:56 AM, Doug <douglas.linder@gmail.com> wrote:
>> Specifically with corona and moai, both statically link lua; perhaps
>> because they target ios they feel they have to do this with all their
>> builds for consistency's sake. Don't know.
>
> I suppose it makes packaging a lot easier.  Although do they allow
> separate extensions?
>
> In that case, bundling extensions within the executable is one way of
> sorting out problems.  My Luabuild solves the problem for a limited
> number of extensions, but only for Lua 5.2 (it should be fairly easy
> to adapt to using Lua 5.1). There the strategy is to 'squish' the Lua
> parts together with all Lua application files into a single Lua
> archive (using Jay's soar), statically link the C parts, and use lhf's
> srlua to glue the archive to the executable.
>
> steve d.
>