mirror of https://gitlab.com/basile.b/dexed.git
parent
1e4650dccc
commit
207f0ec066
|
@ -5,7 +5,7 @@ unit ce_dmdwrap;
|
|||
interface
|
||||
|
||||
uses
|
||||
classes, sysutils, process, asyncprocess, ce_common, ce_inspectors;
|
||||
classes, sysutils, process, asyncprocess, ce_common, ce_inspectors, ce_processes;
|
||||
|
||||
(*
|
||||
|
||||
|
@ -276,6 +276,7 @@ type
|
|||
procedure setProcess(var aProcess: TProcess);
|
||||
procedure setProcess(var aProcess: TAsyncProcess);
|
||||
procedure setProcess(var aProcess: TCheckedAsyncProcess);
|
||||
procedure setProcess(var aProcess: TCEProcess);
|
||||
end;
|
||||
|
||||
(*****************************************************************************
|
||||
|
@ -1031,6 +1032,17 @@ begin
|
|||
aProcess.StartupOptions := aProcess.StartupOptions + [suoUseShowWindow];
|
||||
end;
|
||||
|
||||
procedure TCustomProcOptions.setProcess(var aProcess: TCEProcess);
|
||||
begin
|
||||
aProcess.Parameters.Clear;
|
||||
aProcess.Parameters.AddText(symbolExpander.get(Parameters.Text));
|
||||
aProcess.Executable := fExecutable;
|
||||
aProcess.ShowWindow := fShowWin;
|
||||
aProcess.Options := fOptions;
|
||||
aProcess.CurrentDirectory := fWorkDir;
|
||||
aProcess.StartupOptions := aProcess.StartupOptions + [suoUseShowWindow];
|
||||
end;
|
||||
|
||||
procedure TCustomProcOptions.setExecutable(const aValue: TCEFilename);
|
||||
begin
|
||||
if fExecutable = aValue then exit;
|
||||
|
|
|
@ -9,7 +9,7 @@ uses
|
|||
LclProc,
|
||||
{$ENDIF}
|
||||
Classes, SysUtils, process, strUtils, ce_common, ce_writableComponent,
|
||||
ce_dmdwrap, ce_observer, ce_interfaces;
|
||||
ce_dmdwrap, ce_observer, ce_interfaces, ce_processes;
|
||||
|
||||
type
|
||||
|
||||
|
@ -33,7 +33,7 @@ type
|
|||
fConfIx: Integer;
|
||||
fUpdateCount: NativeInt;
|
||||
fProjectSubject: TCEProjectSubject;
|
||||
fRunner: TCheckedAsyncProcess;
|
||||
fRunner: TCEProcess;
|
||||
fOutputFilename: string;
|
||||
fCanBeRun: boolean;
|
||||
procedure updateOutFilename;
|
||||
|
@ -693,7 +693,7 @@ begin
|
|||
result := false;
|
||||
killProcess(fRunner);
|
||||
//
|
||||
fRunner := TCheckedAsyncProcess.Create(nil); // fRunner can use the input process widget.
|
||||
fRunner := TCEProcess.Create(nil); // fRunner can use the input process widget.
|
||||
currentConfiguration.runOptions.setProcess(fRunner);
|
||||
if runArgs <> '' then
|
||||
begin
|
||||
|
@ -730,16 +730,16 @@ end;
|
|||
|
||||
procedure TCENativeProject.runProcOutput(sender: TObject);
|
||||
var
|
||||
proc: TProcess;
|
||||
proc: TCEProcess;
|
||||
lst: TStringList;
|
||||
str: string;
|
||||
msgs: ICEMessagesDisplay;
|
||||
begin
|
||||
proc := TProcess(sender);
|
||||
proc := TCEProcess(sender);
|
||||
lst := TStringList.Create;
|
||||
msgs := getMessageDisplay;
|
||||
try
|
||||
processOutputToStrings(proc, lst);
|
||||
proc.getFullLines(lst);
|
||||
for str in lst do
|
||||
msgs.message(str, Self, amcProj, amkBub);
|
||||
finally
|
||||
|
|
Loading…
Reference in New Issue