Jelajahi Sumber

* Set the value of the LocalRepository macro in both compilersettings, after the globalsettings are read

git-svn-id: trunk@15177 -
joost 15 tahun lalu
induk
melakukan
f95c24176a
2 mengubah file dengan 11 tambahan dan 3 penghapusan
  1. 2 0
      utils/fppkg/fppkg.pp
  2. 9 3
      utils/fppkg/pkgoptions.pp

+ 2 - 0
utils/fppkg/fppkg.pp

@@ -125,6 +125,7 @@ var
 begin
 begin
   // Load default compiler config
   // Load default compiler config
   S:=GlobalOptions.CompilerConfigDir+GlobalOptions.CompilerConfig;
   S:=GlobalOptions.CompilerConfigDir+GlobalOptions.CompilerConfig;
+  CompilerOptions.UpdateLocalRepositoryOption;
   if FileExists(S) then
   if FileExists(S) then
     begin
     begin
       pkgglobals.Log(vlDebug,SLogLoadingCompilerConfig,[S]);
       pkgglobals.Log(vlDebug,SLogLoadingCompilerConfig,[S]);
@@ -148,6 +149,7 @@ begin
   CompilerOptions.LogValues('');
   CompilerOptions.LogValues('');
   // Load FPMake compiler config, this is normally the same config as above
   // Load FPMake compiler config, this is normally the same config as above
   S:=GlobalOptions.CompilerConfigDir+GlobalOptions.FPMakeCompilerConfig;
   S:=GlobalOptions.CompilerConfigDir+GlobalOptions.FPMakeCompilerConfig;
+  FPMakeCompilerOptions.UpdateLocalRepositoryOption;
   if FileExists(S) then
   if FileExists(S) then
     begin
     begin
       pkgglobals.Log(vlDebug,SLogLoadingFPMakeCompilerConfig,[S]);
       pkgglobals.Log(vlDebug,SLogLoadingFPMakeCompilerConfig,[S]);

+ 9 - 3
utils/fppkg/pkgoptions.pp

@@ -107,10 +107,11 @@ Type
     Procedure LoadCompilerFromFile(const AFileName : String);
     Procedure LoadCompilerFromFile(const AFileName : String);
     Procedure SaveCompilerToFile(const AFileName : String);
     Procedure SaveCompilerToFile(const AFileName : String);
     procedure LogValues(const ACfgName:string);
     procedure LogValues(const ACfgName:string);
-    Property Dirty : Boolean Read FDirty;
-    Property ConfigVersion : Integer read FConfigVersion;
+    procedure UpdateLocalRepositoryOption;
     Function LocalUnitDir:string;
     Function LocalUnitDir:string;
     Function GlobalUnitDir:string;
     Function GlobalUnitDir:string;
+    Property Dirty : Boolean Read FDirty;
+    Property ConfigVersion : Integer read FConfigVersion;
   Published
   Published
     Property Compiler : String Index 1 Read GetOptString Write SetOptString;
     Property Compiler : String Index 1 Read GetOptString Write SetOptString;
     Property CompilerTarget : String Index 2 Read GetOptString Write SetOptString;
     Property CompilerTarget : String Index 2 Read GetOptString Write SetOptString;
@@ -390,7 +391,6 @@ begin
   FOptionParser := TTemplateParser.Create;
   FOptionParser := TTemplateParser.Create;
   FOptionParser.Values['AppConfigDir'] := GetAppConfigDir(false);
   FOptionParser.Values['AppConfigDir'] := GetAppConfigDir(false);
   FOptionParser.Values['UserDir'] := GetUserDir;
   FOptionParser.Values['UserDir'] := GetUserDir;
-  FOptionParser.Values['LocalRepository'] := GlobalOptions.LocalRepository;
 end;
 end;
 
 
 destructor TCompilerOptions.Destroy;
 destructor TCompilerOptions.Destroy;
@@ -439,6 +439,12 @@ begin
 end;
 end;
 
 
 
 
+procedure TCompilerOptions.UpdateLocalRepositoryOption;
+begin
+  FOptionParser.Values['LocalRepository'] := GlobalOptions.LocalRepository;
+end;
+
+
 procedure TCompilerOptions.SetCompilerOS(const AValue: TOS);
 procedure TCompilerOptions.SetCompilerOS(const AValue: TOS);
 begin
 begin
   if FCompilerOS=AValue then
   if FCompilerOS=AValue then