mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 13:17:18 +02:00
IDE: check if project needs compile: check lfm too, bug #21206
git-svn-id: trunk@35910 -
This commit is contained in:
parent
2a417ff43a
commit
7763dcfc36
18
ide/main.pp
18
ide/main.pp
@ -11567,6 +11567,7 @@ var
|
|||||||
StateFilename: String;
|
StateFilename: String;
|
||||||
StateFileAge: LongInt;
|
StateFileAge: LongInt;
|
||||||
AnUnitInfo: TUnitInfo;
|
AnUnitInfo: TUnitInfo;
|
||||||
|
LFMFilename: String;
|
||||||
begin
|
begin
|
||||||
NeedBuildAllFlag:=false;
|
NeedBuildAllFlag:=false;
|
||||||
if (AProject.LastCompilerFilename<>CompilerFilename)
|
if (AProject.LastCompilerFilename<>CompilerFilename)
|
||||||
@ -11633,10 +11634,19 @@ begin
|
|||||||
// check project files
|
// check project files
|
||||||
AnUnitInfo:=AProject.FirstPartOfProject;
|
AnUnitInfo:=AProject.FirstPartOfProject;
|
||||||
while AnUnitInfo<>nil do begin
|
while AnUnitInfo<>nil do begin
|
||||||
if FileExistsCached(AnUnitInfo.Filename)
|
if FileExistsCached(AnUnitInfo.Filename) then begin
|
||||||
and (StateFileAge<FileAgeCached(AnUnitInfo.Filename)) then begin
|
if (StateFileAge<FileAgeCached(AnUnitInfo.Filename)) then begin
|
||||||
DebugLn('TMainIDE.CheckIfProjectNeedsCompilation Src has changed ',AProject.IDAsString,' ',AnUnitInfo.Filename);
|
DebugLn('TMainIDE.CheckIfProjectNeedsCompilation Src has changed ',AProject.IDAsString,' ',AnUnitInfo.Filename);
|
||||||
exit(mrYes);
|
exit(mrYes);
|
||||||
|
end;
|
||||||
|
if AnUnitInfo.ComponentName<>'' then begin
|
||||||
|
LFMFilename:=ChangeFileExt(AnUnitInfo.Filename,'.lfm');
|
||||||
|
if FileExistsCached(LFMFilename)
|
||||||
|
and (StateFileAge<FileAgeCached(LFMFilename)) then begin
|
||||||
|
DebugLn('TMainIDE.CheckIfProjectNeedsCompilation LFM has changed ',AProject.IDAsString,' ',LFMFilename);
|
||||||
|
exit(mrYes);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
AnUnitInfo:=AnUnitInfo.NextPartOfProject;
|
AnUnitInfo:=AnUnitInfo.NextPartOfProject;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user