IDE: Generate project resources only when needed. Issue #15915.

git-svn-id: trunk@59256 -
This commit is contained in:
juha 2018-10-06 19:32:44 +00:00
parent c38806b29d
commit c04a9e4739
2 changed files with 6 additions and 3 deletions

View File

@ -1906,8 +1906,11 @@ var
Code: TCodeBuffer;
begin
Result:=mrOk;
Assert(not Project1.ProjResources.Modified, 'UpdateProjectAutomaticFiles: Resources are modified!');
// update project resource
Project1.ProjResources.Regenerate(Project1.MainFileName, False, True, TestDir);
if TestDir<>'' then
Project1.ProjResources.Regenerate(Project1.MainFileName, False, True, TestDir);
// Iterate project units
AnUnitInfo := Project1.FirstPartOfProject;
while AnUnitInfo<>nil do
begin

View File

@ -5048,7 +5048,7 @@ var
var
aFilename: String;
begin
//debugln(['TMainIDE.DoProjectOptionsAfterWrite ',DbgSName(Sender),' Restore=',Restore]);
//debugln(['TMainIDE.ProjectOptionsAfterWrite ',DbgSName(Sender),' Restore=',Restore]);
if not (Sender is TProjectIDEOptions) then exit;
AProject:=TProjectIDEOptions(Sender).Project;
Assert(Assigned(AProject), 'TMainIDE.ProjectOptionsAfterWrite: Project=Nil.');
@ -5065,7 +5065,7 @@ begin
SetAutoCreateForms;
AProject.AutoAddOutputDirToIncPath; // extend include path
if AProject.ProjResources.Modified then
if not AProject.ProjResources.Regenerate(AProject.MainFilename, True, False, '') then
if not AProject.ProjResources.Regenerate(AProject.MainFilename, True, True, '') then
IDEMessageDialog(lisCCOWarningCaption, AProject.ProjResources.Messages.Text,
mtWarning, [mbOk]);
end;