[ZeroBrane Studio] Re: Using zerobrane with a custom lua setup

  • From: Milind Gupta <milind.gupta@xxxxxxxxx>
  • To: zerobrane@xxxxxxxxxxxxx
  • Date: Wed, 22 Oct 2014 23:00:47 -0700

I am using lua 5.2.3 freshly compiled from the source code I downloaded
from lua.org on windows using mingw.

Milind


On Wed, Oct 22, 2014 at 10:58 PM, Milind Gupta <milind.gupta@xxxxxxxxx>
wrote:

> When I run lua52 from the command line here is what print(package.cpath)
> gives me:
>
> F:\Milind\Technical\My Work\My
> Programs\Lua\LuaTest\lua\?.dll;F:\Milind\Technica
> l\My Work\My Programs\Lua\LuaTest\lua\loadall.dll;.\?.dll
>
> When I do the same in Zero brane (path.lua52 points to the same lua52) I
> get:
>
> D:\Milind\Documents\Programs\ZeroBraneStudio\bin/?.dll;D:\Milind\Documents\Programs\ZeroBraneStudio\bin/clibs52/?.dll;bin/?.dll;bin/clibs52/?.dll;.\?.dll;D:\Milind\Documents\Programs\ZeroBraneStudio\?.dll;D:\Milind\Documents\Programs\ZeroBraneStudio\loadall.dll;D:\Milind\Documents\Programs\ZeroBraneStudio\bin/?.dll;D:\Milind\Documents\Programs\ZeroBraneStudio\bin/clibs52/?.dll;
>
> So it has totally changed. Now my local path is not there anymore.
>
> Second problem I see is that I have iuplua.dll in the same directory as
> this lua52 and require("iuplua") fails even though it searches at
> .\iuplua.dll (which is present in the overwritten package.cpath) so it
> seems the current directory is not the same directory as what is opened in
> the project directory tree since I have opened the same directory there
> where I have my lua52 executable.
>
> Milind
>
>
> On Wed, Oct 22, 2014 at 10:52 PM, Paul K <paul@xxxxxxxxxxxxx> wrote:
>
>> Hi Milind,
>>
>> > I just noticed that if I run the lua interpreter in zerobrane studio it
>> overwrites all my package.cpath values. Why does it do that? How can I
>> prevent them to be overwritten?
>>
>> In what sense does it overwrite them? It may add its own directories
>> to make sure debugging and some other things are working as expected,
>> but it should preserve anything you specify in LUA_PATH or LUA_CPATH.
>> There have been several changes to improve compatibility with running
>> system Lua interpreters, so you may want to check using the recent
>> version from Github. If this still doesn't do what you expect, please
>> provide a short example on what you specify, how you run the script,
>> and what you expect and I'll check what may be going on.
>>
>> Paul
>>
>>
>

Other related posts: