mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-14 02:19:39 +02:00
ide: don't increase build in version info too often. do it once before build (maybe fixes bug #0013369)
git-svn-id: trunk@19072 -
This commit is contained in:
parent
9713e8b48c
commit
45c85c3a98
@ -9126,6 +9126,7 @@ begin
|
||||
DebugLn('TMainIDE.DoSaveForBuild Project1.IsVirtual=',dbgs(Project1.IsVirtual));
|
||||
{$ENDIF}
|
||||
|
||||
Project1.Resources.DoBeforeBuild;
|
||||
if not Project1.IsVirtual then
|
||||
Result:=DoSaveAll([sfCheckAmbiguousFiles])
|
||||
else
|
||||
|
@ -81,6 +81,7 @@ type
|
||||
procedure AddSystemResource(const AResource: String); override;
|
||||
procedure AddLazarusResource(AResource: TStream; const ResourceName, ResourceType: String); override;
|
||||
|
||||
procedure DoBeforeBuild;
|
||||
procedure Clear;
|
||||
function Regenerate(const MainFileName: String; UpdateSource, PerformSave: Boolean): Boolean;
|
||||
function RenameDirectives(const CurFileName, NewFileName: String): Boolean;
|
||||
@ -211,6 +212,13 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TProjectResources.DoBeforeBuild;
|
||||
begin
|
||||
VersionInfo.DoBeforeBuild(Self);
|
||||
XPManifest.DoBeforeBuild(Self);
|
||||
ProjectIcon.DoBeforeBuild(Self);
|
||||
end;
|
||||
|
||||
procedure TProjectResources.Clear;
|
||||
begin
|
||||
FSystemResources.Clear;
|
||||
|
@ -84,6 +84,7 @@ type
|
||||
procedure SetUseVersionInfo(const AValue: boolean);
|
||||
procedure SetVersionNr(const AValue: integer);
|
||||
public
|
||||
procedure DoBeforeBuild(AResources: TAbstractProjectResources); override;
|
||||
function UpdateResources(AResources: TAbstractProjectResources; const MainFilename: string): Boolean; override;
|
||||
|
||||
property UseVersionInfo: boolean read FUseVersionInfo write SetUseVersionInfo;
|
||||
@ -318,8 +319,6 @@ begin
|
||||
if UseVersionInfo then
|
||||
begin
|
||||
// project indicates to use the versioninfo
|
||||
if AutoIncrementBuild then // project indicate to use autoincrementbuild
|
||||
BuildNr := BuildNr + 1;
|
||||
if ProductVersionString = '' then
|
||||
ProductVersionString := IntToStr(VersionNr) + '.' +
|
||||
IntToStr(MajorRevNr) + '.' +
|
||||
@ -511,6 +510,13 @@ begin
|
||||
Modified:=true;
|
||||
end;
|
||||
|
||||
procedure TProjectVersionInfo.DoBeforeBuild(
|
||||
AResources: TAbstractProjectResources);
|
||||
begin
|
||||
if AutoIncrementBuild then // project indicate to use autoincrementbuild
|
||||
BuildNr := BuildNr + 1;
|
||||
end;
|
||||
|
||||
finalization
|
||||
FreeAndNil(fHexCharSets);
|
||||
FreeAndNil(fHexLanguages);
|
||||
|
@ -29,9 +29,11 @@ type
|
||||
FOnModified: TNotifyEvent;
|
||||
procedure SetModified(const AValue: boolean);
|
||||
public
|
||||
constructor Create; virtual;
|
||||
|
||||
procedure DoBeforeBuild(AResources: TAbstractProjectResources); virtual;
|
||||
function UpdateResources(AResources: TAbstractProjectResources; const MainFilename: string): Boolean; virtual; abstract;
|
||||
|
||||
constructor Create; virtual;
|
||||
property Modified: boolean read FModified write SetModified;
|
||||
property OnModified: TNotifyEvent read FOnModified write FOnModified;
|
||||
end;
|
||||
@ -68,6 +70,11 @@ begin
|
||||
FModified := False;
|
||||
end;
|
||||
|
||||
procedure TAbstractProjectResource.DoBeforeBuild(AResources: TAbstractProjectResources);
|
||||
begin
|
||||
// nothing
|
||||
end;
|
||||
|
||||
{ TAbstractProjectResources }
|
||||
|
||||
constructor TAbstractProjectResources.Create;
|
||||
|
Loading…
Reference in New Issue
Block a user