Files
OpenRA/interpreters/luxinia.lua
crazybutcher d5827e233c bugfix for luxinia interpreters (do not prepend directory for exe)
bugfix when creating an error in the shell
2012-01-06 14:26:33 +01:00

33 lines
922 B
Lua

if (not(ide.config.path.luxinia and
wx.wxFileExists(ide.config.path.luxinia..'luxinia.exe'))) then
return
end
return {
name = "Luxinia",
description = "Luxinia project",
api = {"luxiniaapi","baselib"},
fcmdline = function(self,wfilename)
local projdir = ide.config.path.projectdir
local endstr = (projdir and projdir:len()>0
and " -p "..projdir or "")
local fname = wfilename:GetFullName()
endstr = endstr..(fname and (" -t "..fname) or "")
local cmd = 'luxinia.exe --nologo'..endstr
CommandLineRun(cmd,ide.config.path.luxinia,true,true)
end,
fprojdir = function(self,wfilename)
local path = GetPathWithSep(wfilename)
fname = wx.wxFileName(path)
while ((not wx.wxFileExists(path.."main.lua")) and (fname:GetDirCount() > 0)) do
fname:RemoveDir(fname:GetDirCount()-1)
path = GetPathWithSep(fname)
end
return path:sub(0,-2)
end,
}