Skip to content

Commit

Permalink
Fix #1883 - Error when Zerobrane does not find the TME_PATH on Linux.
Browse files Browse the repository at this point in the history
  • Loading branch information
avancinirodrigo committed Jul 14, 2017
2 parents 2826596 + 3a9371b commit f9ff38a
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions ide/zerobrane/terrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,19 @@ return {
-- path to TerraME
terrame = os.getenv("TME_PATH")
-- hack in Mac OS X
if terrame == nil then
if terrame == nil and ide.osname == "Macintosh" then
terrame = "/Applications/terrame.app/Contents/bin"
end

local fopen = io.open(terrame..executable)
if not fopen then
DisplayOutputLn("Please define 'path.terrame_install' in your cfg/user.lua")
else
fopen:close()
end
DisplayOutputLn("Could not find TME_PATH. Is TerraME installed?")
return
end
end

if not wx.wxDirExists(terrame) then
DisplayOutputLn("Can't find terrame executable in "..terrame)
return
end

wx.wxSetEnv("TME_PATH", terrame)

if rundebug then
Expand Down

0 comments on commit f9ff38a

Please sign in to comment.