Retrogamecoding(.org) > EGSL
EGSL interpreter and Zerobrane Studio IDE
(1/1)
igamealot:
On Wednesday we got murgaLua working with Zerobrane Studio's Lua IDE.
It took seconds to get EGSL working with it as well, and I just stumbled in here.
Didn't even know what EGSL was. But here we go.
For this script to work it is saved as 'egsl.lua' in ZeroBraneStudio/interpreters/
The way it is written for Windows you simply drop the EGSL folder into ZeroBraneStudio/bin/
Other OS need testing.
In ZeroBrane Studio IDE :open an EGSL Lua script
Choose menu Project > Lua Interpreter > esgl (basic)
Choose menu Project > Run (F6)
Should work perfectly with the graphics window appearing and everything. Its really cool.
--- Code: ---local exe
local function exePath()
local mainpath = ide.editorFilename:gsub("[^/\\]+$","")
local macExe = mainpath..'bin/murgaLua'
return (ide.osname == "Windows" and mainpath..[[bin\EGSL\egsl.exe]]
or (ide.osname == "Unix" and [[egsl]]) -- using installed murgaLua
or (wx.wxFileExists(macExe) and macExe or mainpath..[[bin/egsl]]))
end
return {
name = "egsl (basic)",
description = "egsl 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,
}
--- End code ---
Update with links and egsl.lua attached as egsl.txt because the forum is finicky about '.lua'
Cybermonkey:
Oh, this IDE looks excellent. I will have to try it this weekend.
Navigation
[0] Message Index
Go to full version