[ZeroBrane Studio] Re: How integrate Zerobrane with a Custom interpreter

  • From: Paul K <paul@xxxxxxxxxxxxx>
  • To: "zerobrane@xxxxxxxxxxxxx" <zerobrane@xxxxxxxxxxxxx>
  • Date: Wed, 17 Sep 2014 20:53:54 -0700

Hi William,

> It´s possible I change Zerobrane in a way it uses this executable(app.exe) 
> instead of the default lua.exe to execute the scripts?

Yes; there are several ways to do this. The easiest way is to set
"path.lua=[[/full/path/app.exe]]", but this only works if the
application accepts same parameters as lua.exe (for example, -e).

Another option is to write your own interpreter, which gives you more
control, but requires a bit more work. The interpreter is a lua file
in ZBS/interpreters folder; there are several interpreters bundled
with ZBS and you can use one of the (for example, love2d.lua) as an
example. Only few of the fields are required (fprojdir, frun,
hasdebugger, name, description, api) and of these you only need to do
any work for frun, which usually includes some simple code to figure
out default configuration for your application and launch the
application with proper parameters.

Take a look at the provided interpreters and let me know if you need
more information on any of the parameters. There is also an example of
registering an interpreter using a plugin, which may work well for
your case; take a look here:
http://studio.zerobrane.com/doc-plugin.html#registering-an-interpreter

Paul.

On Wed, Sep 17, 2014 at 4:03 PM, William Wolff <wolff@xxxxxxxxxx> wrote:
> Hi!
>
>
>
> I have a 3D Engine where when it is started(the .exe is started) this
> aplication interpret my lua scripts like the lua.exe file does.
>
> It´s possible I change Zerobrane in a way it uses this executable(app.exe)
> instead of the default lua.exe to execute the scripts?
>
>
>
> Kind Regards.
>
> William Wolff

Other related posts: