fix parameters passed to proj output exe were not split

This commit is contained in:
Basile Burg 2014-08-13 06:27:01 +02:00
parent c9633cf55e
commit 444a297cee
1 changed files with 9 additions and 3 deletions

View File

@ -297,7 +297,7 @@ implementation
{$R *.lfm} {$R *.lfm}
uses uses
SynMacroRecorder; SynMacroRecorder, strutils;
{$REGION Standard Comp/Obj------------------------------------------------------} {$REGION Standard Comp/Obj------------------------------------------------------}
constructor TCEMainForm.create(aOwner: TComponent); constructor TCEMainForm.create(aOwner: TComponent);
@ -1317,7 +1317,7 @@ end;
procedure TCEMainForm.runProject(const aProject: TCEProject; const runArgs: string = ''); procedure TCEMainForm.runProject(const aProject: TCEProject; const runArgs: string = '');
var var
runproc: TProcess; runproc: TProcess;
procname: string; procname, prm: string;
i: NativeInt; i: NativeInt;
begin begin
if aProject.currentConfiguration.outputOptions.binaryKind <> if aProject.currentConfiguration.outputOptions.binaryKind <>
@ -1329,7 +1329,13 @@ begin
runproc := TProcess.Create(nil); runproc := TProcess.Create(nil);
try try
aProject.currentConfiguration.runOptions.setProcess(runProc); aProject.currentConfiguration.runOptions.setProcess(runProc);
runproc.Parameters.AddText(runArgs); prm := ''; i := 1;
repeat
prm := ExtractDelimited(i, runArgs, [' ']);
if prm <> '' then
runProc.Parameters.AddText(prm);
Inc(i);
until prm = '';
procname := aProject.outputFilename; procname := aProject.outputFilename;
if not fileExists(procname) then if not fileExists(procname) then