Changeset 225 for trunk/Core.pas


Ignore:
Timestamp:
Jan 20, 2025, 12:57:50 AM (2 days ago)
Author:
chronos
Message:
  • Fixed: Detect relative Linux share application path.
  • Fixed: Package install scripts.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Core.pas

    r222 r225  
    146146
    147147function TCore.GetAppShareDir(Dir: string): string;
    148 {$IFDEF Linux}
     148{$IFDEF UNIX}
    149149var
    150150  NewDir: string;
     
    152152begin
    153153  Result := ExtractFileDir(Application.ExeName) + DirectorySeparator + Dir;
    154   {$IFDEF Linux}
     154  {$IFDEF UNIX}
    155155  // If installed in Linux system then try to use different installation directory
    156156  if not DirectoryExists(Result) then begin
    157     NewDir := '/usr/share/' + ExtractFileNameOnly(Application.ExeName) + DirectorySeparator + Dir;
     157    NewDir := ExtractFileDir(Application.ExeName) + DirectorySeparator + '..' +
     158      DirectorySeparator + 'share' + DirectorySeparator +
     159      ExtractFileNameOnly(Application.ExeName) + DirectorySeparator + Dir;
    158160    if DirectoryExists(NewDir) then Result := NewDir;
    159161  end;
Note: See TracChangeset for help on using the changeset viewer.