News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
MurgaLua with ZeroBrane Studio
Author Message
iGame3D
Moderator
***


Posts: 231
Group: Moderators
Joined: Apr 2007
Status: Offline
Reputation: 0
Post: #1
MyBB  MurgaLua with ZeroBrane Studio

Happy New Year folks.
I talked to the fellow that makes the zerobrane IDE.
But his message pretty much went over my head.

Quote:
Thank you for the message.

Since murgalua and iCame3D both include
luasocket support, it may be quite simple to check if the debugging
works with ZeroBrane Studio.

You can try following these steps I
described for GSL-shell, which is also LuaJIT based product:

https://github.com/pkulchenko/ZeroBraneS...-10022234.

Just make sure you modify the batch file such that you don't set
LUA_CPATH (as you want to use luasocket that comes with your
interpreter, not with ZBS). This should work equally well with
murga-lua and your engine. In fact, we can probably use the
interpreter I put together for gsl-shell as the basis, but to try you
can simply use the batch file as I described.


Any ideas on how to bridge the programs?

This post was last modified: 01-19-2013 08:16 AM by iGame3D.

01-05-2013 08:46 PM
Visit this user's website Find all posts by this user Quote this message in a reply
JohnMurga
Administrator
*******


Posts: 381
Group: Administrators
Joined: Apr 2007
Status: Offline
Reputation: 2
Post: #2
RE: MurgaLua with ZeroBrane Studio

iGame3D Wrote:
Happy New Year folks.
I talked to the fellow that makes the zerorbrane IDE.
But his message pretty much went over my head.

Quote:
Thank you for the message.

Since murgalua and iCame3D both include
luasocket support, it may be quite simple to check if the debugging
works with ZeroBrane Studio.

You can try following these steps I
described for GSL-shell, which is also LuaJIT based product:

https://github.com/pkulchenko/ZeroBraneS...-10022234.

Just make sure you modify the batch file such that you don't set
LUA_CPATH (as you want to use luasocket that comes with your
interpreter, not with ZBS). This should work equally well with
murga-lua and your engine. In fact, we can probably use the
interpreter I put together for gsl-shell as the basis, but to try you
can simply use the batch file as I described.


Any ideas on how to bridge the programs?


Sorry for the delay in replying, I was in Australia.

The LUA_CPATH is not an issue as luasocket is built in.

I will have a go tonight and let you know what happens. I fixed a few bugs I had found in the next release of MurgaLua, so if I can stop myself from adding things I'll be releasing soon.

The debugging works with the IDEAJ plugin, so it should work here too.

Cheers
JohnM

01-10-2013 07:42 PM
Visit this user's website Find all posts by this user Quote this message in a reply
JohnMurga
Administrator
*******


Posts: 381
Group: Administrators
Joined: Apr 2007
Status: Offline
Reputation: 2
Post: #3
RE: MurgaLua with ZeroBrane Studio

Hi,

Sorry for the delay in my reply.

I will try to improve this, but currently I got it working like so :

Copy the attached "murgaLua.lua" to the "interpreters" dir in zbstudio.
Copy the full murgaLua executable to the "bin" directory in zbstudio.
Add "require('mobdebug').start()" as the first line in your prog.

This was tested on Windows, but the changes I made should work on Linux and MacOs.

Let me know how you get on.

Cheers
John de Murga



Attached File(s)
.lua File  murgaLua.lua (Size: 1.2 KB / Downloads: 6)
01-14-2013 04:02 PM
Visit this user's website Find all posts by this user Quote this message in a reply
iGame3D
Moderator
***


Posts: 231
Group: Moderators
Joined: Apr 2007
Status: Offline
Reputation: 0
Post: #4
RE: MurgaLua with ZeroBrane Studio

So far so good. I added "scratchextloop = true," to the end of the script to allow for "Run as Scratchpad" mode which allows for seeing our FLTK windows. I'll attach the script change.

Code:
local exe

local function exePath()
  local mainpath = ide.editorFilename:gsub("[^/\\]+$","")
  local macExe = mainpath..'bin/murgaLua'
  return (ide.osname == "Windows" and mainpath..[[bin\murgaLua.exe]]
     or  (ide.osname == "Unix" and [[murgaLua]]) -- using installed murgaLua
     or  (wx.wxFileExists(macExe) and macExe or mainpath..[[bin/murgaLua]]))
end

return {
  name = "MurgaLua (basic)",
  description = "MurgaLua interpreter with debugger",
  api = {"baselib"},
  frun = function(self,wfilename,rundebug)
    exe = exe or exePath()
     if rundebug then DebuggerAttachDefault() end

    local cmd = ('"%s" "%s"'):format(exe, wfilename:GetFullPath())
    -- CommandLineRun(cmd,wdir,tooutput,nohide,stringcallback,uid,endcallback)
    return CommandLineRun(cmd,self:fworkdir(wfilename),true,false,nil,nil,
      function() ide.debugger.pid = nil end)
  end,
  fprojdir = function(self,wfilename)
    return wfilename:GetPath(wx.wxPATH_GET_VOLUME)
  end,
  fworkdir = function (self,wfilename)
    return ide.config.path.projectdir or wfilename:GetPath(wx.wxPATH_GET_VOLUME)
  end,
  hasdebugger = true,
  fattachdebug = function(self) DebuggerAttachDefault() end,
  skipcompile = true,
  scratchextloop = true,
  unhideanywindow = true,

}

This is very cool.

Whats the story with in IntelliJ IDEA? We have similiar functionality?



Attached File(s)
.lua File  murgaLua.lua (Size: 1.22 KB / Downloads: 4)

This post was last modified: 01-16-2013 11:49 AM by iGame3D.

01-16-2013 02:46 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: