JEDI Visual Component Library : what to use to get application version info

959 views Asked by At

LMD components (LMD Innovative) has LMDVersionInfo component through which you can get all relevant data about your application (version info, build number,copyright...).

Does JVCL (JEDI Visual Component Library) have something similar ?

2

There are 2 answers

2
Arioch 'The On BEST ANSWER

LMD .... has LMDVersionInfo component

Yes, JediVCL has a similar thing too.

And the name is - would you ever manage to guess it? - Jv-Version-Info.

https://github.com/project-jedi/jvcl/blob/master/jvcl/run/JvVersionInfo.pas

0
user763539 On

or just use :

procedure GetBuildInfo(var V1, V2, V3, V4: Word);
var
   VerInfoSize, VerValueSize, Dummy : DWORD;
   VerInfo : Pointer;
   VerValue : PVSFixedFileInfo;
begin
VerInfoSize := GetFileVersionInfoSize(PChar(ParamStr(0)), Dummy);
GetMem(VerInfo, VerInfoSize);
GetFileVersionInfo(PChar(ParamStr(0)), 0, VerInfoSize, VerInfo);
VerQueryValue(VerInfo, '\', Pointer(VerValue), VerValueSize);
With VerValue^ do
begin
  V1 := dwFileVersionMS shr 16;
  V2 := dwFileVersionMS and $FFFF;
  V3 := dwFileVersionLS shr 16;
  V4 := dwFileVersionLS and $FFFF;
end;
FreeMem(VerInfo, VerInfoSize);
end;


function kfVersionInfo: String;
var
  V1,       // Major Version
  V2,       // Minor Version
  V3,       // Release
  V4: Word; // Build Number
begin
  GetBuildInfo(V1, V2, V3, V4);
  Result := IntToStr(V1) + '.'
            + IntToStr(V2) + '.'
            + IntToStr(V3) + '.'
            + IntToStr(V4);
end;