Changeset 41 for trunk/Target/UTarget.pas
- Timestamp:
- Feb 19, 2012, 5:26:03 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Target/UTarget.pas
r40 r41 79 79 procedure SetSourceCode(AValue: string); virtual; 80 80 function GetTargetCode: string; virtual; 81 procedure AddLine(Text: string );81 procedure AddLine(Text: string = ''); 82 82 function LongFileName(FileName: string): string; 83 83 function GetExecutionPosition: Integer; virtual; … … 88 88 Optimization: TCompilerOptimization; 89 89 CompilerPath: string; 90 ExecutorPath: string; 90 91 SourceExtension: string; 91 92 CompiledExtension: string; … … 101 102 procedure Compile; virtual; 102 103 procedure CompileToFile; virtual; 104 procedure RunFromFile; virtual; 103 105 procedure Run; virtual; 104 106 procedure Pause; virtual; … … 309 311 end; 310 312 311 procedure TTarget.AddLine(Text: string );313 procedure TTarget.AddLine(Text: string = ''); 312 314 begin 313 315 FTargetCode := FTargetCode + DupeString(' ', Indent) + Text + LineEnding; … … 384 386 Process.Free; 385 387 end else raise Exception.Create(Format(SCompilerNotFound, [CompilerPath])); 386 388 end; 389 390 procedure TTarget.RunFromFile; 391 var 392 Process: TProcess; 393 CompiledFile: string; 394 begin 387 395 CompiledFile := ExtractFilePath(ProjectFileName) + 388 396 'compiled' + DirectorySeparator + Name + DirectorySeparator + … … 391 399 try 392 400 Process := TProcess.Create(nil); 393 Process.CommandLine := LongFileName( CompiledFile);401 Process.CommandLine := LongFileName(ExecutorPath) + ' ' + LongFileName(CompiledFile); 394 402 Process.Options := [poWaitOnExit]; 395 403 Process.Execute;
Note:
See TracChangeset
for help on using the changeset viewer.