[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Forcing Lua on Windows to use a standalone folder
- From: Elias Hogstvedt <eliashogstvedt@...>
- Date: Fri, 6 Feb 2015 16:19:12 +0100
If all hope is lost you could maybe modify package.path and other things related to package. I've had similar issues with lua for windows. Setting PATH from batch should work though.
On 31 Jan 2015 20:21, "Rena" <email@example.com
On Sat, Jan 31, 2015 at 9:02 AM, <firstname.lastname@example.org> wrote:
> Friday, January 30, 2015, 12:31:40 PM, you wrote:
>> On Fri, Jan 30, 2015 at 10:43 AM, <email@example.com> wrote:
>>> I've got to add a feature to a Lua program I wrote several years ago,
>>> but it was 5.1 and uses sigar to check system stuff (Disk, memory, &
>>> CPU usage, etc.) and sigar is broken on 5.2.
>>> My machine now has a 5.2 LuaRocks installation, and I can't figure out
>>> a way to get lua to ignore all the system environment variables from
>>> within a command prompt window.
>>> For example, if I run the lua script on a target machine that doesn't
>>> have lua installed, it runs fine, but if I run it on my machine, I get
>>> all kinds of module not found warnings, etc. If I resolve those, lua
>>> barks about lua52.dll being missing, even though it's running 5.1.
>>> Any ideas on how I can make a command prompt window ignore everything
>>> but what's in the folder I'm running from? Setting %PATH% to just ;
>>> doesn't help - lua continues to look in the LuaRocks\Systree... folder
>>> for lfs, etc.
>> Don't you also have to set LUA_PATH and LUA_CPATH?
> I thought that would do it, but no matter what I set them to, even to
> the absolute current path name, I get a "module 'lfs' not found" on
> the require...
Take a look at the list of paths it tried (part of the error message)
and make sure lfs is actually there...
Sent from my Game Boy.