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

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

Hi Paul,
        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?

Thanks,
Milind

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

> Thanks,
> Milind
>
> On Mon, Oct 20, 2014 at 8:58 PM, Paul K <paul@xxxxxxxxxxxxx> wrote:
>
>> Hi Milind,
>>
>> > 1. Point to the lua executable (lua 5.2) in my directory - this I
>> changed by setting path.lua to that executable and selecting Lua 5.2 in the
>> Project->Lua Interpreter
>>
>> You should be able to select Lua 5.2 as the interpreter and then
>> specify path.lua52 in the config file.
>>
>> > 2. I want the run directory to be that directory so that if I
>> manipulate package.path using relative paths they are relative to that
>> directory. I don't know how to do this since it cannot find files using
>> relative paths like ../src/myscript.lua
>>
>> You can set the project directory to the folder you want to run from
>> and ZBS will change the current directory to that folder before
>> running your script.
>>
>> > 3. I want to pass command line arguments to the lua interpreter like a
>> -e "Some code"
>>
>> No, it's not currently possible without writing your own interpreter,
>> but should be not too difficult to add. I may have this option added
>> shortly, but need to check how to better expose/configure it.
>>
>> Paul.
>>
>>
>

Other related posts: