* check environment variable LOCALAPPDATA on windows as a possible cache location for instantfpc

git-svn-id: trunk@19497 -
This commit is contained in:
florian 2011-10-15 17:43:12 +00:00
parent f005d71110
commit ace6bfd4e9

View File

@ -102,12 +102,16 @@ begin
if Result='' then
begin
Result:=GetEnvironmentVariable('HOME');
{$ifdef WINDOWS}
if Result='' then
Result:=GetEnvironmentVariable('LOCALAPPDATA');
{$endif WINDOWS}
if Result<>'' then
Result:=IncludeTrailingPathDelimiter(Result)+'.cache'+PathDelim+'instantfpc';
end;
end;
if Result='' then begin
writeln('missing environment variable: HOME or INSTANTFPCCACHE');
writeln('missing environment variable: HOME or INSTANTFPCCACHE or LOCALAPPDATA');
Halt(1);
end;
Result:=IncludeTrailingPathDelimiter(ExpandFileName(Result));