Changeset 116 for trunk/UCore.pas
- Timestamp:
- Aug 18, 2021, 5:50:18 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UCore.pas
r115 r116 31 31 procedure ScaleDPI; 32 32 public 33 DataDir: string; 33 34 Project: TProject; 34 35 Targets: TTargetList; … … 64 65 65 66 procedure TCore.DataModuleCreate(Sender: TObject); 66 begin 67 const 68 LinuxDataDir = '/usr/share/LazFuck'; 69 LinuxLanguagesDir = LinuxDataDir + '/Languages'; 70 begin 71 DataDir := ''; 72 {$IFDEF Linux} 73 // If installed in Linux system then use installation shared game directory for data files 74 if DirectoryExists(LinuxDataDir) then 75 DataDir := LinuxDataDir; 76 // If installed in Linux system then use installation directory for po files 77 if not DirectoryExists(Translator.POFilesFolder) and DirectoryExists(LinuxLanguagesDir) then 78 Translator.POFilesFolder := LinuxLanguagesDir; 79 {$ENDIF} 80 67 81 Project := TProject.Create; 68 82 Targets := TTargetList.Create; … … 79 93 Targets.Add(TTargetCSharp.Create); 80 94 Targets.Add(TTargetJavascript.Create); 81 82 {$IFDEF Linux}83 // If installed in Linux system then use installation directory for po files84 if Application.ExeName = '/usr/bin/' + ExtractFileNameOnly(Application.ExeName) then85 Translator.POFilesFolder := '/usr/share/' + ExtractFileNameOnly(Application.ExeName) + '/languages';86 {$ENDIF}87 95 88 96 LoadFromRegistry(Core.ApplicationInfo.GetRegistryContext);
Note:
See TracChangeset
for help on using the changeset viewer.