mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 00:02:03 +02:00
improved svn revision in about box
git-svn-id: trunk@7766 -
This commit is contained in:
parent
8ada078b86
commit
c55d4b3a78
@ -55,7 +55,10 @@ type
|
||||
|
||||
|
||||
function ShowAboutForm: TModalResult;
|
||||
|
||||
|
||||
var
|
||||
LazarusRevisionStr: string;
|
||||
|
||||
function GetLazarusRevision: string;
|
||||
|
||||
implementation
|
||||
@ -71,20 +74,20 @@ begin
|
||||
end;
|
||||
|
||||
function GetLazarusRevision: string;
|
||||
const RevisionStr =
|
||||
'{ $Id$ }';
|
||||
var
|
||||
p: Integer;
|
||||
l: Integer;
|
||||
begin
|
||||
// use first number as revision
|
||||
p:=1;
|
||||
while (p<=length(RevisionStr)) and (not (RevisionStr[p] in ['0'..'9'])) do
|
||||
while (p<=length(LazarusRevisionStr))
|
||||
and (not (LazarusRevisionStr[p] in ['0'..'9'])) do
|
||||
inc(p);
|
||||
l:=1;
|
||||
while (p+l<=length(RevisionStr)) and (RevisionStr[p+l] in ['0'..'9']) do
|
||||
while (p+l<=length(LazarusRevisionStr))
|
||||
and (LazarusRevisionStr[p+l] in ['0'..'9']) do
|
||||
inc(l);
|
||||
Result:=copy(RevisionStr,p,l);
|
||||
Result:=copy(LazarusRevisionStr,p,l);
|
||||
end;
|
||||
|
||||
{ TAboutForm }
|
||||
|
@ -51,13 +51,18 @@ uses
|
||||
Forms, LCLProc,
|
||||
Splash,
|
||||
Main,
|
||||
AboutFrm,
|
||||
// use the custom IDE static packages AFTER 'main'
|
||||
{$IFDEF AddStaticPkgs}
|
||||
{$I staticpackages.inc}
|
||||
{$ENDIF}
|
||||
MainBase;
|
||||
|
||||
|
||||
const RevisionStr =
|
||||
'{ $Id$ }';
|
||||
|
||||
begin
|
||||
LazarusRevisionStr:=RevisionStr;
|
||||
Application.Initialize;
|
||||
TMainIDE.ParseCmdLineOptions;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user