lua-users home
lua-l archive

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


Matt Campbell wrote:
> I was wondering if that was the best option on Win32, which is currently
> my primary platform.  Looks pretty easy to do, using FindResource,
> LoadResource, and LockResource.  And that way, I can use named
> resources, with a custom resource type like "LUACHUNK".

I dont know if its the best option but it works well for me and it is quick.

In lua code:
 chunk = loadrc(resource  [,dll])

We have used this scheme for "packaging" lua add-ons. For example, you
can place luasocket in one DLL by converting the lua code to resources.
This makes it a tidy way to distribute an application.

There is a slightly out of date bin2res.lua at
http:///www.spinifex.net/db/public/bin2res.zip
You should be able to adjust this to your needs.

David B.