mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-06 15:37:15 +01: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));
|
DebugLn('TMainIDE.DoSaveForBuild Project1.IsVirtual=',dbgs(Project1.IsVirtual));
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
Project1.Resources.DoBeforeBuild;
|
||||||
if not Project1.IsVirtual then
|
if not Project1.IsVirtual then
|
||||||
Result:=DoSaveAll([sfCheckAmbiguousFiles])
|
Result:=DoSaveAll([sfCheckAmbiguousFiles])
|
||||||
else
|
else
|
||||||
|
|||||||
@ -81,6 +81,7 @@ type
|
|||||||
procedure AddSystemResource(const AResource: String); override;
|
procedure AddSystemResource(const AResource: String); override;
|
||||||
procedure AddLazarusResource(AResource: TStream; const ResourceName, ResourceType: String); override;
|
procedure AddLazarusResource(AResource: TStream; const ResourceName, ResourceType: String); override;
|
||||||
|
|
||||||
|
procedure DoBeforeBuild;
|
||||||
procedure Clear;
|
procedure Clear;
|
||||||
function Regenerate(const MainFileName: String; UpdateSource, PerformSave: Boolean): Boolean;
|
function Regenerate(const MainFileName: String; UpdateSource, PerformSave: Boolean): Boolean;
|
||||||
function RenameDirectives(const CurFileName, NewFileName: String): Boolean;
|
function RenameDirectives(const CurFileName, NewFileName: String): Boolean;
|
||||||
@ -211,6 +212,13 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TProjectResources.DoBeforeBuild;
|
||||||
|
begin
|
||||||
|
VersionInfo.DoBeforeBuild(Self);
|
||||||
|
XPManifest.DoBeforeBuild(Self);
|
||||||
|
ProjectIcon.DoBeforeBuild(Self);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TProjectResources.Clear;
|
procedure TProjectResources.Clear;
|
||||||
begin
|
begin
|
||||||
FSystemResources.Clear;
|
FSystemResources.Clear;
|
||||||
|
|||||||
@ -84,6 +84,7 @@ type
|
|||||||
procedure SetUseVersionInfo(const AValue: boolean);
|
procedure SetUseVersionInfo(const AValue: boolean);
|
||||||
procedure SetVersionNr(const AValue: integer);
|
procedure SetVersionNr(const AValue: integer);
|
||||||
public
|
public
|
||||||
|
procedure DoBeforeBuild(AResources: TAbstractProjectResources); override;
|
||||||
function UpdateResources(AResources: TAbstractProjectResources; const MainFilename: string): Boolean; override;
|
function UpdateResources(AResources: TAbstractProjectResources; const MainFilename: string): Boolean; override;
|
||||||
|
|
||||||
property UseVersionInfo: boolean read FUseVersionInfo write SetUseVersionInfo;
|
property UseVersionInfo: boolean read FUseVersionInfo write SetUseVersionInfo;
|
||||||
@ -318,8 +319,6 @@ begin
|
|||||||
if UseVersionInfo then
|
if UseVersionInfo then
|
||||||
begin
|
begin
|
||||||
// project indicates to use the versioninfo
|
// project indicates to use the versioninfo
|
||||||
if AutoIncrementBuild then // project indicate to use autoincrementbuild
|
|
||||||
BuildNr := BuildNr + 1;
|
|
||||||
if ProductVersionString = '' then
|
if ProductVersionString = '' then
|
||||||
ProductVersionString := IntToStr(VersionNr) + '.' +
|
ProductVersionString := IntToStr(VersionNr) + '.' +
|
||||||
IntToStr(MajorRevNr) + '.' +
|
IntToStr(MajorRevNr) + '.' +
|
||||||
@ -511,6 +510,13 @@ begin
|
|||||||
Modified:=true;
|
Modified:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TProjectVersionInfo.DoBeforeBuild(
|
||||||
|
AResources: TAbstractProjectResources);
|
||||||
|
begin
|
||||||
|
if AutoIncrementBuild then // project indicate to use autoincrementbuild
|
||||||
|
BuildNr := BuildNr + 1;
|
||||||
|
end;
|
||||||
|
|
||||||
finalization
|
finalization
|
||||||
FreeAndNil(fHexCharSets);
|
FreeAndNil(fHexCharSets);
|
||||||
FreeAndNil(fHexLanguages);
|
FreeAndNil(fHexLanguages);
|
||||||
|
|||||||
@ -29,9 +29,11 @@ type
|
|||||||
FOnModified: TNotifyEvent;
|
FOnModified: TNotifyEvent;
|
||||||
procedure SetModified(const AValue: boolean);
|
procedure SetModified(const AValue: boolean);
|
||||||
public
|
public
|
||||||
|
constructor Create; virtual;
|
||||||
|
|
||||||
|
procedure DoBeforeBuild(AResources: TAbstractProjectResources); virtual;
|
||||||
function UpdateResources(AResources: TAbstractProjectResources; const MainFilename: string): Boolean; virtual; abstract;
|
function UpdateResources(AResources: TAbstractProjectResources; const MainFilename: string): Boolean; virtual; abstract;
|
||||||
|
|
||||||
constructor Create; virtual;
|
|
||||||
property Modified: boolean read FModified write SetModified;
|
property Modified: boolean read FModified write SetModified;
|
||||||
property OnModified: TNotifyEvent read FOnModified write FOnModified;
|
property OnModified: TNotifyEvent read FOnModified write FOnModified;
|
||||||
end;
|
end;
|
||||||
@ -68,6 +70,11 @@ begin
|
|||||||
FModified := False;
|
FModified := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TAbstractProjectResource.DoBeforeBuild(AResources: TAbstractProjectResources);
|
||||||
|
begin
|
||||||
|
// nothing
|
||||||
|
end;
|
||||||
|
|
||||||
{ TAbstractProjectResources }
|
{ TAbstractProjectResources }
|
||||||
|
|
||||||
constructor TAbstractProjectResources.Create;
|
constructor TAbstractProjectResources.Create;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user