mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 11:29:16 +02:00
* check environment variable LOCALAPPDATA on windows as a possible cache location for instantfpc
git-svn-id: trunk@19497 -
This commit is contained in:
parent
f005d71110
commit
ace6bfd4e9
@ -102,12 +102,16 @@ begin
|
|||||||
if Result='' then
|
if Result='' then
|
||||||
begin
|
begin
|
||||||
Result:=GetEnvironmentVariable('HOME');
|
Result:=GetEnvironmentVariable('HOME');
|
||||||
|
{$ifdef WINDOWS}
|
||||||
|
if Result='' then
|
||||||
|
Result:=GetEnvironmentVariable('LOCALAPPDATA');
|
||||||
|
{$endif WINDOWS}
|
||||||
if Result<>'' then
|
if Result<>'' then
|
||||||
Result:=IncludeTrailingPathDelimiter(Result)+'.cache'+PathDelim+'instantfpc';
|
Result:=IncludeTrailingPathDelimiter(Result)+'.cache'+PathDelim+'instantfpc';
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
if Result='' then begin
|
if Result='' then begin
|
||||||
writeln('missing environment variable: HOME or INSTANTFPCCACHE');
|
writeln('missing environment variable: HOME or INSTANTFPCCACHE or LOCALAPPDATA');
|
||||||
Halt(1);
|
Halt(1);
|
||||||
end;
|
end;
|
||||||
Result:=IncludeTrailingPathDelimiter(ExpandFileName(Result));
|
Result:=IncludeTrailingPathDelimiter(ExpandFileName(Result));
|
||||||
|
Loading…
Reference in New Issue
Block a user