Re: Attn. Pete
- Posted by petelomax Jul 07, 2011
- 3835 views
Hello Pete,
I do have a problem with Edita that maybe you can help me with.
eui.bat
@@PATH=%PATH% E:\euphoria-40b4\bin
@SET EUDIR=E:\euphoria-40b4
@SET EUINC=E:\euphoria-40b4\include;E:\eu\myinclude;e:\eu\football;e:\eu\win32lib
@start /b E:\euphoria-40b4\bin\eui.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
Yeah, that's going to be a problem - Edita won't get an error code from eui.exe and hence will not attempt to open any ex.err file that gets created. What you need is an app along the lines of (warning completely untested):
1) Either set up an eu.cfg file (probably easier) or code something like:
object path constant eu4 = "E:\euphoria-40b4\" path = getenv("PATH") if atom(path) then path = "" end if if match(lower(eu4&"\\bin"),lower(path))=0 then path &= ";"&eu4&"\\bin" setenv("PATH",path) end if setenv("EUDIR",eu4) setenv("EUINC",...)
2) code to run and return the exit code (which you'll want to compile):
function flatten(sequence s) sequence res, si res = "" for i=1 to length(txtlines) do si = s[i] if find(' ',si) and not find('\"',si) then si = '\"'&si&'\"' end if res &= si&' ' end for return res end function sequence cl = command_line() cl[1] = eu4&"\\bin\\eui.exe" abort(system_exec(flatten(cl),2)
If I find time, I'll look at adding environment settings to Edita\Options\Extensions so you won't have to do any of this, though I can't promise that any time soon.
Regards,
Pete
PS. not sure why you said ".exwc" is really ".eui", can't you just add a new extension?
DOH - just after posting I realised that if you set up the eu.cfg file (in the same directory as eui.exe) you shouldn't need part 2, just invoke eui.exe directly.