Changeset 114


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

Legend:

Unmodified
Added
Removed
  • trunk/Engine.pas

    r103 r114  
    16471647{$IFDEF UNIX}
    16481648const
    1649   UnixDataDir = '/usr/share/Tunneler';
    1650   UnixAudioDir = UnixDataDir + '/Audio';
     1649  AudioDirName = 'Audio';
     1650  UnixDataDir = '../share/Tunneler';
     1651var
     1652  NewDir: string;
     1653  BaseDir: string;
    16511654{$ENDIF}
    16521655begin
    1653   Result := GetCurrentDir + DirectorySeparator + 'Audio';
     1656  BaseDir := ExcludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0)));
     1657  Result := BaseDir + DirectorySeparator + AudioDirName;
    16541658  {$IFDEF UNIX}
    1655   if not DirectoryExists(Result) and DirectoryExists(UnixAudioDir) then begin
    1656     Result := UnixAudioDir;
    1657     Exit;
     1659  NewDir := ExpandFileName(BaseDir + DirectorySeparator + UnixDataDir +
     1660    DirectorySeparator + AudioDirName);
     1661  if not DirectoryExists(Result) and DirectoryExists(NewDir) then begin
     1662    Result := NewDir;
    16581663  end;
    16591664  {$ENDIF}
  • 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
  • trunk/Install/flatpak/net.zdechov.app.Tunneler.yml

    r111 r114  
    2929      - type: svn
    3030        url: https://svn.zdechov.net/Tunneler/trunk
    31         revision: r111
     31        revision: r114
    3232    buildsystem: simple
    3333    build-commands:
  • trunk/Languages/Tunneler.cs.po

    r109 r114  
    219219#, object-pascal-format
    220220msgid "The play command %s does not work on your system"
    221 msgstr ""
     221msgstr "Play příkaz %s na vaÅ¡em systému nefunguje"
    222222
    223223#: sound.sunabletoplay
     
    374374msgid "Controls"
    375375msgstr "Ovládání"
    376 
Note: See TracChangeset for help on using the changeset viewer.