Changeset 135 for trunk/UTarget.pas


Ignore:
Timestamp:
Mar 5, 2022, 9:44:18 AM (2 years ago)
Author:
chronos
Message:
  • Modified: Code cleanup.
  • Modified: More translated strings.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UTarget.pas

    r133 r135  
    155155  end;
    156156
    157 const
    158   RunStateText: array[TRunState] of string = ('Stopped', 'Paused', 'Running',
    159     'Compiling');
    160 
    161157
    162158resourcestring
     
    164160  SExecutorNotFound = 'Executor "%s" not found';
    165161  SCompiledFileNotFound = 'Program compiled file "%s" not found';
     162  SStopped = 'Stopped';
     163  SPaused = 'Paused';
     164  SRunning = 'Running';
     165  SCompiling = 'Compiling';
     166  SNone = 'None';
     167  SNormal = 'Normal';
     168
     169const
     170  CompiledDir = 'compiled';
     171
     172var
     173  RunStateText: array[TRunState] of string = (SStopped, SPaused, SRunning,
     174    SCompiling);
     175  CompilerOptimizationText: array[TCompilerOptimization] of string = (SNone, SNormal);
     176
     177procedure UpdateTranslation;
    166178
    167179
    168180implementation
     181
     182procedure UpdateTranslation;
     183begin
     184  RunStateText[rsStopped] := SStopped;
     185  RunStateText[rsPaused] := SPaused;
     186  RunStateText[rsRunning] := SRunning;
     187  RunStateText[rsCompiling] := SCompiling;
     188  CompilerOptimizationText[coNone] := SNone;
     189  CompilerOptimizationText[coNormal] := SNormal;
     190end;
    169191
    170192{ TMessages }
     
    464486begin
    465487  CompiledFile := ExtractFilePath(ProjectFileName) +
    466     'compiled' + DirectorySeparator + Name + DirectorySeparator +
     488    CompiledDir + DirectorySeparator + Name + DirectorySeparator +
    467489    ExtractFileNameOnly(ProjectFileName) + SourceExtension;
    468490  ForceDirectories(ExtractFilePath(CompiledFile));
     
    507529
    508530  CompiledFile := ExtractFilePath(ProjectFileName) +
    509     'compiled' + DirectorySeparator + Name + DirectorySeparator +
     531    CompiledDir + DirectorySeparator + Name + DirectorySeparator +
    510532    ExtractFileNameOnly(ProjectFileName) + CompiledExtension;
    511533  RunFile := ExtractFilePath(ProjectFileName) +
    512     'compiled' + DirectorySeparator + Name + DirectorySeparator +
     534    CompiledDir + DirectorySeparator + Name + DirectorySeparator +
    513535    ExtractFileNameOnly(ProjectFileName) + RunExtension;
    514536  if not FileExists(ExecutorPath) then
Note: See TracChangeset for help on using the changeset viewer.