[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Embedding scripts in executable
- From: Peng Zhicheng <pengzhicheng1986@...>
- Date: Wed, 28 Sep 2011 22:01:47 +0800
于 2011-9-28 6:50, Tim Caswell 写道:
I'm sure this has been done before, but google is not being my friend when trying to search for it.
I have a folder full of lua modules (written in lua) and I want them embedded in my binary at compile/link time in such a way that the require system can find them.
Is there a cross-platform way to embed these scripts and make them accessible to require?
I'm using luajit, but I think this question is generic.
you may just need to write a simple `loader' function.
see the document of `package.loaders'.