mirror of https://gitlab.com/basile.b/dexed.git
fix bug in TCEProject, run, parameters not copied from TCEPorjectRunOptions
This commit is contained in:
parent
5a4076b1cb
commit
b914ae5970
|
@ -5,7 +5,7 @@ unit ce_dmdwrap;
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
classes, sysutils, process;
|
classes, sysutils, process, asyncprocess;
|
||||||
|
|
||||||
(*
|
(*
|
||||||
|
|
||||||
|
@ -271,7 +271,11 @@ type
|
||||||
destructor destroy; override;
|
destructor destroy; override;
|
||||||
procedure assign(source: TPersistent); override;
|
procedure assign(source: TPersistent); override;
|
||||||
procedure getOpts(const aList: TStrings); override;
|
procedure getOpts(const aList: TStrings); override;
|
||||||
procedure setProcess(aProcess: TProcess);
|
{ TAsyncProcess "Parameters" inherits from UTF8 process,
|
||||||
|
and the property reader is not anymore "fParameters" but "fUTF8Parameters"
|
||||||
|
without the overload aProcess does not get the Parameters if aProcess is TAsynProcess...}
|
||||||
|
procedure setProcess(var aProcess: TProcess);
|
||||||
|
procedure setProcess(var aProcess: TAsyncProcess);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
(*****************************************************************************
|
(*****************************************************************************
|
||||||
|
@ -986,7 +990,7 @@ begin
|
||||||
if source is TCustomProcOptions then
|
if source is TCustomProcOptions then
|
||||||
begin
|
begin
|
||||||
src := TCustomProcOptions(source);
|
src := TCustomProcOptions(source);
|
||||||
fParameters := src.fParameters;
|
Parameters.Assign(src.Parameters);
|
||||||
fOptions := src.fOptions;
|
fOptions := src.fOptions;
|
||||||
fExecutable := src.fExecutable;
|
fExecutable := src.fExecutable;
|
||||||
fShowWin := src.fShowWin;
|
fShowWin := src.fShowWin;
|
||||||
|
@ -998,11 +1002,19 @@ procedure TCustomProcOptions.getOpts(const aList: TStrings);
|
||||||
begin
|
begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomProcOptions.setProcess(aProcess: TProcess);
|
procedure TCustomProcOptions.setProcess(var aProcess: TProcess);
|
||||||
var
|
|
||||||
i: Integer;
|
|
||||||
begin
|
begin
|
||||||
aProcess.Parameters := fParameters;
|
aProcess.Parameters.Assign(Parameters);
|
||||||
|
aProcess.Executable := fExecutable;
|
||||||
|
aProcess.ShowWindow := fShowWin;
|
||||||
|
aProcess.Options := fOptions;
|
||||||
|
aProcess.CurrentDirectory := fWorkDir;
|
||||||
|
aProcess.StartupOptions := aProcess.StartupOptions + [suoUseShowWindow];
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCustomProcOptions.setProcess(var aProcess: TAsyncProcess);
|
||||||
|
begin
|
||||||
|
aProcess.Parameters.Assign(Parameters);
|
||||||
aProcess.Executable := fExecutable;
|
aProcess.Executable := fExecutable;
|
||||||
aProcess.ShowWindow := fShowWin;
|
aProcess.ShowWindow := fShowWin;
|
||||||
aProcess.Options := fOptions;
|
aProcess.Options := fOptions;
|
||||||
|
|
|
@ -559,14 +559,7 @@ begin
|
||||||
killProcess(fRunner);
|
killProcess(fRunner);
|
||||||
//
|
//
|
||||||
fRunner := TAsyncProcess.Create(nil); // fRunner can use the input process widget.
|
fRunner := TAsyncProcess.Create(nil); // fRunner can use the input process widget.
|
||||||
|
|
||||||
// TODO-cbugfix: parameters are not copied from src to target.
|
|
||||||
currentConfiguration.runOptions.setProcess(fRunner);
|
currentConfiguration.runOptions.setProcess(fRunner);
|
||||||
|
|
||||||
//fRunner.Parameters.SaveToFile('C:\dst.txt');
|
|
||||||
//currentConfiguration.runOptions.parameters.SaveToFile('C:\src.txt');
|
|
||||||
|
|
||||||
|
|
||||||
if runArgs <> '' then
|
if runArgs <> '' then
|
||||||
begin
|
begin
|
||||||
prm := '';
|
prm := '';
|
||||||
|
|
Loading…
Reference in New Issue