Changeset 151
- Timestamp:
- Jun 5, 2024, 10:24:47 PM (7 months ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BFCodeTools.pas
r145 r151 20 20 Multiplier: Integer; 21 21 Remainder: Integer; 22 const23 Overhead = 7;24 22 begin 25 23 Result := ''; -
trunk/LazFuck.lpi
r150 r151 97 97 </Item4> 98 98 </RequiredPackages> 99 <Units Count="3 0">99 <Units Count="31"> 100 100 <Unit0> 101 101 <Filename Value="LazFuck.lpr"/> … … 260 260 <IsPartOfProject Value="True"/> 261 261 </Unit29> 262 <Unit30> 263 <Filename Value="Forms\FormConsole.pas"/> 264 <IsPartOfProject Value="True"/> 265 <ComponentName Value="FormConsole"/> 266 <ResourceBaseClass Value="Form"/> 267 </Unit30> 262 268 </Units> 263 269 </ProjectOptions> -
trunk/LazFuck.lpr
r150 r151 10 10 Interfaces, // this includes the LCL widgetset 11 11 Forms, Target, FormCPU, FormMain, FormOutput, FormInput, FormMemory, 12 FormMessages, FormSourceCode, FormTargetCode, Core, Common,12 FormMessages, FormSourceCode, FormTargetCode, FormConsole, Core, Common, 13 13 SysUtils, BFCodeTools, TargetRust; 14 14 -
trunk/Target.pas
r145 r151 154 154 end; 155 155 156 157 156 resourcestring 158 157 SCompilerNotFound = 'Compiler "%s" not found'; … … 182 181 183 182 implementation 183 184 uses 185 FormConsole; 184 186 185 187 procedure UpdateTranslation; … … 531 533 procedure TTarget.RunFromFile; 532 534 var 533 Process: TProcess;534 535 CompiledFile: string; 535 536 RunFile: string; 536 begin 537 if ExecutorPath = '' then Exit; 538 537 FormConsole: TFormConsole; 538 begin 539 539 CompiledFile := ExtractFilePath(ProjectFileName) + 540 540 CompiledDir + DirectorySeparator + Name + DirectorySeparator + … … 543 543 CompiledDir + DirectorySeparator + Name + DirectorySeparator + 544 544 ExtractFileNameOnly(ProjectFileName) + RunExtension; 545 if not FileExists(ExecutorPath) then546 raise Exception.Create(Format(SExecutorNotFound, [ExecutorPath]));547 545 if FileExists(CompiledFile) then 548 546 try 549 Process := TProcess.Create(nil);547 FormConsole := TFormConsole.Create(nil); 550 548 if ExecutorPath <> '' then begin 551 Process.Executable := LongFileName(ExecutorPath); 552 Process.Parameters.Add(LongFileName(RunFile)); 553 end else Process.Executable := LongFileName(RunFile); 554 Process.ShowWindow := swoShow; 555 Process.Options := [poWaitOnExit, poNewConsole]; 556 Process.Execute; 549 if not FileExists(ExecutorPath) then 550 raise Exception.Create(Format(SExecutorNotFound, [ExecutorPath])); 551 FormConsole.Executable := LongFileName(ExecutorPath); 552 FormConsole.Parameters.Add(LongFileName(RunFile)); 553 end else 554 FormConsole.Executable := LongFileName(RunFile); 555 FormConsole.ShowModal; 557 556 finally 558 Process.Free; 559 end else raise Exception.Create(Format(SCompiledFileNotFound, [CompiledFile])); 557 FormConsole.Free; 558 end 559 else raise Exception.Create(Format(SCompiledFileNotFound, [CompiledFile])); 560 560 end; 561 561
Note:
See TracChangeset
for help on using the changeset viewer.