IDE: use local config dir to store lazarus settings, so the lazarus directory settings can be readonly on windows too (bug #9448)

git-svn-id: trunk@15021 -
This commit is contained in:
vincents 2008-04-30 19:49:44 +00:00
parent b35fdf9df9
commit deab575d99

View File

@ -180,10 +180,13 @@ begin
DefaultDrive := ExtractFileDrive(ProgramDirectory); DefaultDrive := ExtractFileDrive(ProgramDirectory);
DefaultFPCTarget:= {$I %FPCTARGET%}; DefaultFPCTarget:= {$I %FPCTARGET%};
DefaultFPCVersion:= {$I %FPCVERSION%}; DefaultFPCVersion:= {$I %FPCVERSION%};
PrimaryConfigPath := ChompPathDelim(ExtractFilePath(Paramstr(0))); {$ifndef ver2_2_0}
SecondaryConfigPath := SysUtils.GetEnvironmentVariable('WINDIR'); PrimaryConfigPath:=GetAppConfigDir(False);
If SecondaryConfigPath = '' Then {$else}
SecondaryConfigPath := DefaultDrive + '\windows'; // fpc 2.2.0 cannot handle spaces in path in some circumstances
PrimaryConfigPath:=ChompPathDelim(ProgramDirectory);
{$endif}
SecondaryConfigPath:=ChompPathDelim(ProgramDirectory);
DefaultFPCSrcDirs[1] := AppendPathDelim(ProgramDirectory) + 'fpcsrc'; DefaultFPCSrcDirs[1] := AppendPathDelim(ProgramDirectory) + 'fpcsrc';
DefaultLazarusSrcDirs[1] := DefaultDrive + '\lazarus'; DefaultLazarusSrcDirs[1] := DefaultDrive + '\lazarus';
end; end;