Browse Source

* Instead of using a hardcoded SystemIDEDir first try to generate it from the startup-path

git-svn-id: trunk@12492 -
joost 16 years ago
parent
commit
96e141ffc6
1 changed files with 7 additions and 1 deletions
  1. 7 1
      ide/fpini.pas

+ 7 - 1
ide/fpini.pas

@@ -152,7 +152,13 @@ begin
 {$ifndef unix}
   IDEDir:=CompleteDir(DirOf(system.Paramstr(0)));
 {$else}
-  SystemIDEDir:='/usr/lib/fpc/'+version_string+'/ide/text';
+  SystemIDEDir:=FExpand(DirOf(system.paramstr(0))+'../lib/fpc/'+version_string+'/ide/text');
+  If Not ExistsDir(SystemIDEdir) Then
+    begin
+    SystemIDEDir:=FExpand(DirOf(system.paramstr(0))+'../lib64/fpc/'+version_string+'/ide/text');
+    If Not ExistsDir(SystemIDEdir) Then
+      SystemIDEDir:='/usr/lib/fpc/'+version_string+'/ide/text';
+    end;
   IDEdir:=CompleteDir(FExpand('~/.fp'));
   If Not ExistsDir(IDEdir) Then
     begin