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