Re: large scale Lua projects; directory hierarchy
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: large scale Lua projects; directory hierarchy
- From: steve donovan <steve.j.donovan@...>
- Date: 2011年1月11日 12:07:27 +0200
2011年1月11日 Michal Kolodziejczyk <miko@wp.pl>:
> But you would need to add:
> package.path=package.path..'~/lua/?.lua'
> (expanding ~ manually I guess)
Or directly in a launcher script (so _foo.lua would not be an issue)
LUA_PATH=";;~/lua/?.lua"
> You can already have some software installed this way, luadoc for
> example - look for /usr/share/lua/5.1/*/*.init
Either way, you need some kind of installation logic. It feels better
that a script is self-contained and can be installed locally without
needing to be a superuser.
There are also tricks which use debug.getinfo to find out where the
file is in the filesystem.
steve d.