IDE: do not save project.compiled file for virtual projects, bug #17705

git-svn-id: trunk@27886 -
This commit is contained in:
mattias 2010-10-26 15:15:57 +00:00
parent 0b0012c997
commit cf4e767106

View File

@ -4879,8 +4879,10 @@ end;
function TProject.GetStateFilename: string;
begin
Result:=GetOutputDirectory
+ChangeFileExt(GetCompileSourceFilename,'.compiled');
Result:=GetOutputDirectory;
if (not FilenameIsAbsolute(Result)) and (not IsVirtual) then
Result:=ProjectDirectory;
Result:=AppendPathDelim(Result)+ChangeFileExt(GetCompileSourceFilename,'.compiled');
end;
function TProject.GetTestDirectory: string;
@ -4919,7 +4921,8 @@ var
CurStateFileAge: Integer;
begin
StateFile:=GetStateFilename;
if not FileExistsUTF8(StateFile) then begin
if (not FilenameIsAbsolute(StateFile)) or (not FileExistsUTF8(StateFile)) then
begin
DebugLn('TProject.DoLoadStateFile Statefile not found: ',StateFile);
StateFlags:=StateFlags-[lpsfStateFileLoaded];
Result:=mrOk;
@ -4969,6 +4972,7 @@ var
CompilerFileDate: Integer;
begin
StateFile:=GetStateFilename;
if not FilenameIsAbsolute(StateFile) then exit(mrOk);
try
CompilerFileDate:=FileAgeCached(CompilerFilename);
XMLConfig:=TCodeBufXMLConfig.CreateWithCache(StateFile,false);