Changeset 116 for tags/1.1.1/Engine.pas


Ignore:
Timestamp:
Jan 14, 2025, 10:04:04 AM (8 days ago)
Author:
chronos
Message:

Merged revision(s) 114-115 from trunk:

  • Fixed: Linux data directories detection.
  • Added: French translation.
Location:
tags/1.1.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tags/1.1.1

  • tags/1.1.1/Engine.pas

    r103 r116  
    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}
Note: See TracChangeset for help on using the changeset viewer.