mirror of https://gitlab.com/basile.b/dexed.git
use ExitCode and not ExitStatus
This commit is contained in:
parent
f205b4d2ea
commit
36d06688c8
|
|
@ -302,8 +302,6 @@ begin
|
||||||
inp := fDoc.Lines.Text;
|
inp := fDoc.Lines.Text;
|
||||||
prc.Input.Write(inp[1], inp.length);
|
prc.Input.Write(inp[1], inp.length);
|
||||||
prc.CloseInput;
|
prc.CloseInput;
|
||||||
while prc.Running do
|
|
||||||
sleep(1);
|
|
||||||
try
|
try
|
||||||
str := TStringList.Create;
|
str := TStringList.Create;
|
||||||
processOutputToStrings(prc,str);
|
processOutputToStrings(prc,str);
|
||||||
|
|
@ -314,6 +312,8 @@ begin
|
||||||
except
|
except
|
||||||
fDoc.Lines.Assign(fBackup);
|
fDoc.Lines.Assign(fBackup);
|
||||||
end;
|
end;
|
||||||
|
while prc.Running do
|
||||||
|
sleep(1);
|
||||||
finally
|
finally
|
||||||
prc.free;
|
prc.free;
|
||||||
str.free;
|
str.free;
|
||||||
|
|
|
||||||
|
|
@ -567,7 +567,7 @@ begin
|
||||||
dubProcOutput(proc);
|
dubProcOutput(proc);
|
||||||
msgs := getMessageDisplay;
|
msgs := getMessageDisplay;
|
||||||
prjname := shortenPath(filename);
|
prjname := shortenPath(filename);
|
||||||
fCompiled := fDubProc.ExitStatus = 0;
|
fCompiled := fDubProc.ExitCode = 0;
|
||||||
if fCompiled then
|
if fCompiled then
|
||||||
msgs.message(prjname + ' has been successfully compiled',
|
msgs.message(prjname + ' has been successfully compiled',
|
||||||
self as ICECommonProject, amcProj, amkInf)
|
self as ICECommonProject, amcProj, amkInf)
|
||||||
|
|
|
||||||
|
|
@ -2487,9 +2487,9 @@ begin
|
||||||
inph := EntitiesConnector.getSingleService('ICEProcInputHandler');
|
inph := EntitiesConnector.getSingleService('ICEProcInputHandler');
|
||||||
if (inph <> nil) then
|
if (inph <> nil) then
|
||||||
(inph as ICEProcInputHandler).removeProcess(proc);
|
(inph as ICEProcInputHandler).removeProcess(proc);
|
||||||
if (proc.ExitStatus <> 0) then
|
if (proc.ExitCode <> 0) then
|
||||||
fMsgs.message(format('error: the process (%s) has returned the signal %d',
|
fMsgs.message(format('error: the process (%s) has returned the signal %d',
|
||||||
[proc.Executable, proc.ExitStatus]), fDoc, amcEdit, amkErr);
|
[proc.Executable, proc.ExitCode]), fDoc, amcEdit, amkErr);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCEMainForm.actSetRunnableSwExecute(Sender: TObject);
|
procedure TCEMainForm.actSetRunnableSwExecute(Sender: TObject);
|
||||||
|
|
@ -2632,7 +2632,7 @@ begin
|
||||||
application.ProcessMessages;
|
application.ProcessMessages;
|
||||||
if not asObj then
|
if not asObj then
|
||||||
sysutils.DeleteFile(fname + objExt);
|
sysutils.DeleteFile(fname + objExt);
|
||||||
if (dmdProc.ExitStatus = 0) then
|
if (dmdProc.ExitCode = 0) then
|
||||||
begin
|
begin
|
||||||
result := true;
|
result := true;
|
||||||
fMsgs.message(shortenPath(fDoc.fileName, 25) + ' successfully compiled',
|
fMsgs.message(shortenPath(fDoc.fileName, 25) + ' successfully compiled',
|
||||||
|
|
@ -2640,7 +2640,7 @@ begin
|
||||||
end
|
end
|
||||||
else begin
|
else begin
|
||||||
fMsgs.message(format('error: the process (%s) has returned the signal %d',
|
fMsgs.message(format('error: the process (%s) has returned the signal %d',
|
||||||
[dmdproc.Executable, dmdproc.ExitStatus]), fDoc, amcEdit, amkErr);
|
[dmdproc.Executable, dmdproc.ExitCode]), fDoc, amcEdit, amkErr);
|
||||||
fMsgs.message(shortenPath(fDoc.fileName, 25) + ' has not been compiled',
|
fMsgs.message(shortenPath(fDoc.fileName, 25) + ' has not been compiled',
|
||||||
fDoc, amcEdit, amkErr);
|
fDoc, amcEdit, amkErr);
|
||||||
end;
|
end;
|
||||||
|
|
@ -2802,6 +2802,7 @@ begin
|
||||||
prc.Parameters.Add('--skipTests');
|
prc.Parameters.Add('--skipTests');
|
||||||
prc.Execute;
|
prc.Execute;
|
||||||
processOutputToStrings(prc, lst);
|
processOutputToStrings(prc, lst);
|
||||||
|
while prc.Running do;
|
||||||
for msg in lst do
|
for msg in lst do
|
||||||
fMsgs.message(msg, fDoc, amcEdit, amkAuto);
|
fMsgs.message(msg, fDoc, amcEdit, amkAuto);
|
||||||
finally
|
finally
|
||||||
|
|
|
||||||
|
|
@ -666,9 +666,11 @@ begin
|
||||||
lst.Delete(0);
|
lst.Delete(0);
|
||||||
prc.Parameters.Assign(lst);
|
prc.Parameters.Assign(lst);
|
||||||
prc.Execute;
|
prc.Execute;
|
||||||
com := prc.ExitCode = 0;
|
|
||||||
lst.Clear;
|
lst.Clear;
|
||||||
processOutputToStrings(prc, lst);
|
processOutputToStrings(prc, lst);
|
||||||
|
while prc.Running do
|
||||||
|
sleep(1);
|
||||||
|
com := prc.ExitCode = 0;
|
||||||
for j := 0 to lst.Count -1 do
|
for j := 0 to lst.Count -1 do
|
||||||
getMessageDisplay.message(lst[j], self as ICECommonProject, amcProj, amkAuto);
|
getMessageDisplay.message(lst[j], self as ICECommonProject, amcProj, amkAuto);
|
||||||
finally
|
finally
|
||||||
|
|
@ -703,7 +705,7 @@ begin
|
||||||
if poUsePipes in prc.Options then
|
if poUsePipes in prc.Options then
|
||||||
runProcOutput(prc);
|
runProcOutput(prc);
|
||||||
finally
|
finally
|
||||||
result := prc.ExitStatus = 0;
|
result := prc.ExitCode = 0;
|
||||||
prc.Free;
|
prc.Free;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
@ -847,9 +849,9 @@ begin
|
||||||
getprocInputHandler.removeProcess(TProcess(sender));
|
getprocInputHandler.removeProcess(TProcess(sender));
|
||||||
SetCurrentDirUTF8(fRunnerOldCwd);
|
SetCurrentDirUTF8(fRunnerOldCwd);
|
||||||
//
|
//
|
||||||
if (proc.ExitStatus <> 0) then
|
if (proc.ExitCode <> 0) then
|
||||||
msgs.message(format('error: the process (%s) has returned the signal %d',
|
msgs.message(format('error: the process (%s) has returned the signal %d',
|
||||||
[proc.Executable, proc.ExitStatus]), self as ICECommonProject, amcProj, amkErr);
|
[proc.Executable, proc.ExitCode]), self as ICECommonProject, amcProj, amkErr);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
@ -878,7 +880,7 @@ begin
|
||||||
compProcOutput(proc);
|
compProcOutput(proc);
|
||||||
msgs := getMessageDisplay;
|
msgs := getMessageDisplay;
|
||||||
prjname := shortenPath(filename);
|
prjname := shortenPath(filename);
|
||||||
fCompiled := fCompilProc.ExitStatus = 0;
|
fCompiled := fCompilProc.ExitCode = 0;
|
||||||
updateOutFilename;
|
updateOutFilename;
|
||||||
if fCompiled then
|
if fCompiled then
|
||||||
msgs.message(prjname + ' has been successfully compiled',
|
msgs.message(prjname + ' has been successfully compiled',
|
||||||
|
|
|
||||||
|
|
@ -1500,9 +1500,9 @@ begin
|
||||||
prc.Execute;
|
prc.Execute;
|
||||||
prc.Input.Write(src[1], src.length);
|
prc.Input.Write(src[1], src.length);
|
||||||
prc.CloseInput;
|
prc.CloseInput;
|
||||||
|
prc.Output.Read(res, 1);
|
||||||
while prc.Running do
|
while prc.Running do
|
||||||
sleep(1);
|
sleep(1);
|
||||||
prc.Output.Read(res, 1);
|
|
||||||
finally
|
finally
|
||||||
prc.Free;
|
prc.Free;
|
||||||
end;
|
end;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue