Changeset 41 for trunk/Target
- Timestamp:
- Feb 19, 2012, 5:26:03 PM (13 years ago)
- Location:
- trunk/Target
- Files:
-
- 1 added
- 4 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; -
trunk/Target/UTargetC.pas
r35 r41 107 107 Dec(Indent); 108 108 AddLine('}'); 109 110 CompileToFile; 109 111 end; 110 112 … … 140 142 procedure TTargetC.Run; 141 143 begin 142 CompileToFile;143 144 inherited; 145 RunFromFile; 144 146 end; 145 147 -
trunk/Target/UTargetDelphi.pas
r35 r41 101 101 Dec(Indent); 102 102 AddLine('end.'); 103 104 CompileToFile; 103 105 end; 104 106 105 107 procedure TTargetDelphi.Run; 106 108 begin 107 CompileToFile;108 109 inherited Run; 110 RunFromFile; 109 111 end; 110 112 -
trunk/Target/UTargetPHP.pas
r35 r41 95 95 AddLine(''); 96 96 AddLine('?>'); 97 98 CompileToFile; 97 99 end; 98 100 99 101 procedure TTargetPHP.Run; 100 102 begin 101 CompileToFile;102 103 inherited Run; 104 RunFromFile; 103 105 end; 104 106
Note:
See TracChangeset
for help on using the changeset viewer.