Forráskód Böngészése

UPD: Show Lazarus revision only if exists

Alexander Koblov 9 éve
szülő
commit
2722992171
4 módosított fájl, 14 hozzáadás és 3 törlés
  1. 1 1
      src/doublecmd.lpr
  2. 2 2
      src/fAbout.pas
  3. 9 0
      src/platform/udcversion.pas
  4. 2 0
      units/revision.inc

+ 1 - 1
src/doublecmd.lpr

@@ -127,7 +127,7 @@ begin
   DCDebug('Double Commander ' + dcVersion);
   DCDebug('Revision: ' + dcRevision);
   DCDebug('Build: ' + dcBuildDate);
-  DCDebug('Lazarus: ' + lazVersion + '-' + lazRevision);
+  DCDebug('Lazarus: ' + GetLazarusVersion);
   DCDebug('Free Pascal: ' + fpcVersion);
   DCDebug('Platform: ' + TargetCPU + '-' + TargetOS + '-' + TargetWS);
   DCDebug('System: ' + OSVersion);

+ 2 - 2
src/fAbout.pas

@@ -159,7 +159,7 @@ begin
                     'Platform: %s' + LineEnding +
                     'OS version: %s' + LineEnding,
                     [dcVersion, dcRevision, dcBuildDate,
-                    lazVersion + '-' + lazRevision, fpcVersion,
+                    GetLazarusVersion, fpcVersion,
                     TargetCPU + '-' + TargetOS + '-' + TargetWS,
                     OSVersion]);
   if WSVersion <> EmptyStr then
@@ -181,7 +181,7 @@ begin
   lblVersion.Caption         := lblVersion.Caption + #32 + dcVersion;
   lblRevision.Caption        := lblRevision.Caption + #32 + dcRevision;
   lblBuild.Caption           := lblBuild.Caption + #32 + dcBuildDate;
-  lblLazarusVer.Caption      := lblLazarusVer.Caption + #32 + lazVersion + '-' + lazRevision;
+  lblLazarusVer.Caption      := lblLazarusVer.Caption + #32 + GetLazarusVersion;
   lblFreePascalVer.Caption   := lblFreePascalVer.Caption + #32 + fpcVersion;
   lblPlatform.Caption        := TargetCPU + '-' + TargetOS + '-' + TargetWS;
   lblOperatingSystem.Caption := OSVersion;

+ 9 - 0
src/platform/udcversion.pas

@@ -49,6 +49,7 @@ var
   : String;
 
 procedure InitializeVersionInfo;
+function GetLazarusVersion: String;
 
 implementation
 
@@ -471,5 +472,13 @@ begin
   {$ENDIF}
 end;
 
+function GetLazarusVersion: String;
+begin
+  Result:= lazVersion;
+  if Length(lazRevision) > 0 then begin
+    Result += '-' + lazRevision;
+  end;
+end;
+
 end.
 

+ 2 - 0
units/revision.inc

@@ -0,0 +1,2 @@
+// Created by Svn2RevisionInc
+const RevisionStr = '';