Browse Source

* Use macro in default LocalRepository setting
* When no FPCDIR env. variable is set, do not clear the GlobalInstallDir

git-svn-id: trunk@16930 -

joost 14 years ago
parent
commit
06fb7437d9
1 changed files with 7 additions and 4 deletions
  1. 7 4
      utils/fppkg/pkgoptions.pp

+ 7 - 4
utils/fppkg/pkgoptions.pp

@@ -293,7 +293,10 @@ begin
   else
   else
     FLocalRepository:='{UserDir}.fppkg/';
     FLocalRepository:='{UserDir}.fppkg/';
 {$else}
 {$else}
-  FLocalRepository:=IncludeTrailingPathDelimiter(GetAppConfigDir(IsSuperUser));
+  if IsSuperUser then
+    FLocalRepository:=IncludeTrailingPathDelimiter(GetAppConfigDir(true))
+  else
+    FLocalRepository:='{AppConfigDir}';
 {$endif}
 {$endif}
   UpdateLocalRepositoryOption;
   UpdateLocalRepositoryOption;
   // Directories
   // Directories
@@ -612,11 +615,11 @@ begin
     end;
     end;
 
 
   fpcdir:=FixPath(GetEnvironmentVariable('FPCDIR'));
   fpcdir:=FixPath(GetEnvironmentVariable('FPCDIR'));
-{$ifndef Unix}
-  fpcdir:=ExpandFileName(fpcdir);
-{$endif unix}
   if fpcdir<>'' then
   if fpcdir<>'' then
     begin
     begin
+    {$ifndef Unix}
+    fpcdir:=ExpandFileName(fpcdir);
+    {$endif unix}
     Log(vlDebug,SLogFPCDirEnv,[fpcdir]);
     Log(vlDebug,SLogFPCDirEnv,[fpcdir]);
     FGlobalInstallDir:=fpcdir;
     FGlobalInstallDir:=fpcdir;
     end;
     end;