fix parameters passed to directly runable module were not split

This commit is contained in:
Basile Burg 2014-08-13 06:01:20 +02:00
parent e4186748fc
commit c9633cf55e
1 changed files with 4 additions and 4 deletions

View File

@ -926,9 +926,9 @@ begin
'' + LineEnding + '' + LineEnding +
'void main(string args[])' + LineEnding + 'void main(string args[])' + LineEnding +
'{' + LineEnding + '{' + LineEnding +
' writeln("this is just a `toy feature`");' + LineEnding + ' // this file can be directly executed using menu file/compile & run' + LineEnding +
' writeln;' + LineEnding + ' // phobos and libman imports are allowed' + LineEnding +
' writeln("coedit saves a temp d module before compiling it and running it...");' + LineEnding + ' writeln("hello runnable module");' + LineEnding +
'}'; '}';
end; end;
@ -1196,7 +1196,7 @@ begin
fMesgWidg.addCeInf(editor.fileName + ' successfully compiled', mcEditor ); fMesgWidg.addCeInf(editor.fileName + ' successfully compiled', mcEditor );
runproc.Options := [poStderrToOutPut, poUsePipes]; runproc.Options := [poStderrToOutPut, poUsePipes];
runproc.CurrentDirectory := extractFilePath(runProc.Executable); runproc.CurrentDirectory := extractFilePath(runProc.Executable);
runproc.Parameters.Text := runArgs; runproc.Parameters.DelimitedText := runArgs;
runproc.Executable := fname {$IFDEF WINDOWS}+ '.exe'{$ENDIF}; runproc.Executable := fname {$IFDEF WINDOWS}+ '.exe'{$ENDIF};
runproc.Execute; runproc.Execute;
repeat ProcessOutputToMsg(runproc, mcEditor) until not runproc.Running; repeat ProcessOutputToMsg(runproc, mcEditor) until not runproc.Running;