Ignore:
Timestamp:
Jan 14, 2025, 8:56:52 AM (8 days ago)
Author:
chronos
Message:
  • Fixed: Linux data directories detection.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/FormMain.pas

    r112 r114  
    165165{$IFDEF UNIX}
    166166const
    167   UnixLanguagesDir = '../Tunneler/Languages';
     167  LanguagesDirName = 'Languages';
     168  UnixLanguagesDir = '../share/Tunneler/' + LanguagesDirName;
     169var
     170  BaseDir: string;
     171  NewDir: string;
    168172{$ENDIF}
    169173begin
     174  BaseDir := ExcludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0)));
     175  Core.Core.Translator1.POFilesFolder := BaseDir + DirectorySeparator + LanguagesDirName;
     176
    170177  {$IFDEF UNIX}
    171178  // If installed in UNIX system then use installation directory for po files
    172   if not DirectoryExists(Core.Core.Translator1.POFilesFolder) and DirectoryExists(UnixLanguagesDir) then
    173     Core.Core.Translator1.POFilesFolder := UnixLanguagesDir;
     179  NewDir := ExpandFileName(BaseDir + DirectorySeparator + UnixLanguagesDir);
     180  if not DirectoryExists(Core.Core.Translator1.POFilesFolder) and DirectoryExists(NewDir) then
     181    Core.Core.Translator1.POFilesFolder := NewDir;
    174182  {$ENDIF}
    175183
Note: See TracChangeset for help on using the changeset viewer.