Changeset 184 for trunk/Core.pas
- Timestamp:
- Jan 14, 2025, 11:19:27 AM (10 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Core.pas
r181 r184 38 38 procedure TargetMessageExecute(Text: string); 39 39 public 40 DataDir: string; 40 BaseDir: string; 41 ExamplesDir: string; 41 42 Project: TProject; 42 43 Targets: TTargets; … … 65 66 Core: TCore; 66 67 68 const 69 ExamplesDirName = 'Examples'; 70 LanguagesDirName = 'Languages'; 71 67 72 68 73 implementation … … 94 99 {$IFDEF UNIX} 95 100 const 96 LinuxDataDir = '/usr/share/LazFuck'; 97 LinuxLanguagesDir = LinuxDataDir + '/Languages'; 101 LinuxDataDir = '../share/LazFuck'; 102 var 103 NewDir: string; 98 104 {$ENDIF} 99 105 begin 100 DataDir := ''; 106 BaseDir := ExcludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0))); 107 Translator.POFilesFolder := BaseDir + DirectorySeparator + LanguagesDirName; 108 ExamplesDir := BaseDir + DirectorySeparator + ExamplesDirName; 109 101 110 {$IFDEF UNIX} 102 // If installed in Linux system then use installation shared game directory for data files103 if DirectoryExists(LinuxDataDir) then104 DataDir := LinuxDataDir105 else DataDir := GetCurrentDir;106 111 // If installed in Linux system then use installation directory for po files 107 if not DirectoryExists(Translator.POFilesFolder) and DirectoryExists(LinuxLanguagesDir) then 108 Translator.POFilesFolder := LinuxLanguagesDir; 112 NewDir := ExpandFileName(BaseDir + DirectorySeparator + LinuxDataDir + 113 DirectorySeparator + LanguagesDirName); 114 if not DirectoryExists(Translator.POFilesFolder) and DirectoryExists(NewDir) then 115 Translator.POFilesFolder := NewDir; 116 117 // If installed in Linux system then use installation directory for po files 118 NewDir := ExpandFileName(BaseDir + DirectorySeparator + LinuxDataDir + 119 DirectorySeparator + ExamplesDirName); 120 if not DirectoryExists(ExamplesDir) and DirectoryExists(NewDir) then 121 ExamplesDir := NewDir; 109 122 {$ENDIF} 110 123
Note:
See TracChangeset
for help on using the changeset viewer.