mirror of https://gitlab.com/basile.b/dexed.git
parent
207f0ec066
commit
8f01388d0a
|
@ -5,14 +5,14 @@ unit ce_tools;
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, FileUtil, process, menus,
|
Classes, SysUtils, FileUtil, process, menus, ce_processes,
|
||||||
ce_common, ce_writableComponent, ce_interfaces, ce_observer, ce_inspectors;
|
ce_common, ce_writableComponent, ce_interfaces, ce_observer, ce_inspectors;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
TCEToolItem = class(TCollectionItem)
|
TCEToolItem = class(TCollectionItem)
|
||||||
private
|
private
|
||||||
fProcess: TCheckedAsyncProcess;
|
fProcess: TCEProcess;
|
||||||
fExecutable: TCEFilename;
|
fExecutable: TCEFilename;
|
||||||
fWorkingDir: TCEPathname;
|
fWorkingDir: TCEPathname;
|
||||||
fShowWin: TShowWindowOptions;
|
fShowWin: TShowWindowOptions;
|
||||||
|
@ -102,7 +102,7 @@ begin
|
||||||
fParameters.Free;
|
fParameters.Free;
|
||||||
fChainAfter.Free;
|
fChainAfter.Free;
|
||||||
fChainBefore.Free;
|
fChainBefore.Free;
|
||||||
killProcess(fProcess);
|
ce_processes.killProcess(fProcess);
|
||||||
inherited;
|
inherited;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -157,12 +157,12 @@ var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
prms: string;
|
prms: string;
|
||||||
begin
|
begin
|
||||||
killProcess(fProcess);
|
ce_processes.killProcess(fProcess);
|
||||||
//
|
//
|
||||||
if fClearMessages then
|
if fClearMessages then
|
||||||
getMessageDisplay(fMsgs).clearByContext(amcMisc);
|
getMessageDisplay(fMsgs).clearByContext(amcMisc);
|
||||||
//
|
//
|
||||||
fProcess := TCheckedAsyncProcess.Create(nil);
|
fProcess := TCEProcess.Create(nil);
|
||||||
fProcess.OnReadData:= @processOutput;
|
fProcess.OnReadData:= @processOutput;
|
||||||
fProcess.OnTerminate:= @processOutput;
|
fProcess.OnTerminate:= @processOutput;
|
||||||
fProcess.Options := fOpts;
|
fProcess.Options := fOpts;
|
||||||
|
@ -188,7 +188,7 @@ begin
|
||||||
getMessageDisplay(fMsgs);
|
getMessageDisplay(fMsgs);
|
||||||
lst := TStringList.Create;
|
lst := TStringList.Create;
|
||||||
try
|
try
|
||||||
processOutputToStrings(fProcess, lst);
|
fProcess.getFullLines(lst);
|
||||||
for str in lst do
|
for str in lst do
|
||||||
fMsgs.message(str, nil, amcMisc, amkAuto);
|
fMsgs.message(str, nil, amcMisc, amkAuto);
|
||||||
finally
|
finally
|
||||||
|
|
Loading…
Reference in New Issue