unleashed a bug in TCEProject, run, parameters not copied from TCEPorjectRunOptions

This commit is contained in:
Basile Burg 2014-11-13 16:33:01 +01:00
parent 1a1f050937
commit 5a4076b1cb
3 changed files with 27 additions and 15 deletions

View File

@ -258,7 +258,7 @@ type
procedure setExecutable(const aValue: string); procedure setExecutable(const aValue: string);
procedure setWorkDir(const aValue: string); procedure setWorkDir(const aValue: string);
procedure setOptions(const aValue: TProcessOptions); procedure setOptions(const aValue: TProcessOptions);
procedure setParameters(const aValue: TStringList); procedure setParameters(aValue: TStringList);
procedure setShowWin(const aValue: TShowWindowOptions); procedure setShowWin(const aValue: TShowWindowOptions);
protected protected
property executable: string read fExecutable write setExecutable; property executable: string read fExecutable write setExecutable;
@ -271,7 +271,7 @@ 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(const aProcess: TProcess); procedure setProcess(aProcess: TProcess);
end; end;
(***************************************************************************** (*****************************************************************************
@ -986,7 +986,7 @@ begin
if source is TCustomProcOptions then if source is TCustomProcOptions then
begin begin
src := TCustomProcOptions(source); src := TCustomProcOptions(source);
fParameters.Assign(src.fParameters); fParameters := src.fParameters;
fOptions := src.fOptions; fOptions := src.fOptions;
fExecutable := src.fExecutable; fExecutable := src.fExecutable;
fShowWin := src.fShowWin; fShowWin := src.fShowWin;
@ -998,7 +998,9 @@ procedure TCustomProcOptions.getOpts(const aList: TStrings);
begin begin
end; end;
procedure TCustomProcOptions.setProcess(const aProcess: TProcess); procedure TCustomProcOptions.setProcess(aProcess: TProcess);
var
i: Integer;
begin begin
aProcess.Parameters := fParameters; aProcess.Parameters := fParameters;
aProcess.Executable := fExecutable; aProcess.Executable := fExecutable;
@ -1029,7 +1031,7 @@ begin
doChanged; doChanged;
end; end;
procedure TCustomProcOptions.setParameters(const aValue: TStringList); procedure TCustomProcOptions.setParameters(aValue: TStringList);
begin begin
fParameters.Assign(aValue); fParameters.Assign(aValue);
doChanged; doChanged;

View File

@ -559,7 +559,16 @@ 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
begin
prm := ''; prm := '';
i := 1; i := 1;
repeat repeat
@ -569,6 +578,7 @@ begin
fRunner.Parameters.AddText(prm); fRunner.Parameters.AddText(prm);
Inc(i); Inc(i);
until prm = '``'; until prm = '``';
end;
// //
if not fileExists(outputFilename) then if not fileExists(outputFilename) then
begin begin