2004-12-28 14:35:31 +00:00
|
|
|
{** Provides application related information
|
|
|
|
*
|
|
|
|
* Provides a singleton App object to access properties associated
|
|
|
|
* with the application, such as the version number or executable path.
|
|
|
|
* It is part of the X2Utils suite.
|
|
|
|
* <br /><br />
|
|
|
|
*
|
|
|
|
* Last changed: $Date$ <br />
|
|
|
|
* Revision: $Rev$ <br />
|
|
|
|
* Author: $Author$ <br />
|
|
|
|
*}
|
2004-06-06 22:21:17 +00:00
|
|
|
unit X2UtApp;
|
2004-06-06 19:43:32 +00:00
|
|
|
|
|
|
|
interface
|
2004-06-06 20:47:24 +00:00
|
|
|
uses
|
|
|
|
Classes;
|
|
|
|
|
|
|
|
type
|
|
|
|
{
|
|
|
|
:$ Stores version info strings
|
|
|
|
|
|
|
|
:! This class descends from TPersistent, allowing the use of RTTI to
|
|
|
|
:! retrieve version info names.
|
|
|
|
}
|
|
|
|
TX2AppVersionStrings = class(TPersistent)
|
|
|
|
private
|
|
|
|
FValues: TStringList;
|
|
|
|
|
|
|
|
function GetValue(const Index: Integer): String;
|
|
|
|
procedure SetValue(const Index: Integer; const Value: String);
|
|
|
|
public
|
|
|
|
constructor Create();
|
|
|
|
destructor Destroy(); override;
|
|
|
|
published
|
2004-06-06 21:01:32 +00:00
|
|
|
//:$ Contains the Company Name as specified in the version information
|
|
|
|
//:! Default to an empty string if no version information is available
|
2004-06-06 20:47:24 +00:00
|
|
|
property CompanyName: String index 0 read GetValue write SetValue;
|
2004-06-06 21:01:32 +00:00
|
|
|
|
|
|
|
//:$ Contains the File Description as specified in the version information
|
|
|
|
//:! Default to an empty string if no version information is available
|
2004-06-06 20:47:24 +00:00
|
|
|
property FileDescription: String index 1 read GetValue write SetValue;
|
2004-06-06 21:01:32 +00:00
|
|
|
|
|
|
|
//:$ Contains the File Version as specified in the version information
|
|
|
|
//:! Default to an empty string if no version information is available
|
2004-06-06 20:47:24 +00:00
|
|
|
property FileVersion: String index 2 read GetValue write SetValue;
|
2004-06-06 21:01:32 +00:00
|
|
|
|
|
|
|
//:$ Contains the Internal Name as specified in the version information
|
|
|
|
//:! Default to an empty string if no version information is available
|
2004-06-06 20:47:24 +00:00
|
|
|
property InternalName: String index 3 read GetValue write SetValue;
|
2004-06-06 21:01:32 +00:00
|
|
|
|
|
|
|
//:$ Contains the Legal Copyright as specified in the version information
|
|
|
|
//:! Default to an empty string if no version information is available
|
2004-06-06 20:47:24 +00:00
|
|
|
property LegalCopyright: String index 4 read GetValue write SetValue;
|
2004-06-06 21:01:32 +00:00
|
|
|
|
|
|
|
//:$ Contains the Legal Trademark as specified in the version information
|
|
|
|
//:! Default to an empty string if no version information is available
|
2004-06-06 20:47:24 +00:00
|
|
|
property LegalTrademark: String index 5 read GetValue write SetValue;
|
2004-06-06 21:01:32 +00:00
|
|
|
|
|
|
|
//:$ Contains the Original Filename as specified in the version information
|
|
|
|
//:! Default to an empty string if no version information is available
|
2004-06-06 20:47:24 +00:00
|
|
|
property OriginalFilename: String index 6 read GetValue write SetValue;
|
2004-06-06 21:01:32 +00:00
|
|
|
|
|
|
|
//:$ Contains the Product Name as specified in the version information
|
|
|
|
//:! Default to an empty string if no version information is available
|
2004-06-06 20:47:24 +00:00
|
|
|
property ProductName: String index 7 read GetValue write SetValue;
|
2004-06-06 21:01:32 +00:00
|
|
|
|
|
|
|
//:$ Contains the Product Version as specified in the version information
|
|
|
|
//:! Default to an empty string if no version information is available
|
2004-06-06 20:47:24 +00:00
|
|
|
property ProductVersion: String index 8 read GetValue write SetValue;
|
2004-06-06 21:01:32 +00:00
|
|
|
|
|
|
|
//:$ Contains the Comments as specified in the version information
|
|
|
|
//:! Default to an empty string if no version information is available
|
2004-06-06 20:47:24 +00:00
|
|
|
property Comments: String index 9 read GetValue write SetValue;
|
|
|
|
end;
|
|
|
|
|
|
|
|
{
|
|
|
|
:$ Stores the application's version information
|
|
|
|
}
|
|
|
|
TX2AppVersion = class(TObject)
|
|
|
|
private
|
|
|
|
FMajor: Integer;
|
|
|
|
FMinor: Integer;
|
|
|
|
FRelease: Integer;
|
|
|
|
FBuild: Integer;
|
2004-06-23 17:04:06 +00:00
|
|
|
FDebug: Boolean;
|
|
|
|
FPrerelease: Boolean;
|
|
|
|
FSpecial: Boolean;
|
|
|
|
FPrivate: Boolean;
|
2004-06-06 20:47:24 +00:00
|
|
|
FStrings: TX2AppVersionStrings;
|
2006-01-08 15:15:20 +00:00
|
|
|
protected
|
|
|
|
procedure GetVersion(const AFileName: String); virtual;
|
2004-06-06 20:47:24 +00:00
|
|
|
public
|
2006-01-08 15:15:20 +00:00
|
|
|
constructor Create(const AFileName: String);
|
2004-06-06 20:47:24 +00:00
|
|
|
destructor Destroy(); override;
|
|
|
|
|
2006-01-08 15:15:20 +00:00
|
|
|
//:$ Returns the formatted version information
|
|
|
|
//:: If ABuild is False, the return value will not include the
|
|
|
|
//:: application's Build number. If AProductName is True, the
|
|
|
|
//:: product name will be included as well.
|
|
|
|
function FormatVersion(const ABuild: Boolean = True;
|
|
|
|
const AProductName: Boolean = False): String;
|
|
|
|
|
2004-06-06 21:01:32 +00:00
|
|
|
//:$ Contains the application's Major version
|
|
|
|
//:! Defaults to 0 if no version information is available
|
2004-06-23 17:04:06 +00:00
|
|
|
property Major: Integer read FMajor write FMajor;
|
2004-06-06 21:01:32 +00:00
|
|
|
|
|
|
|
//:$ Contains the application's Minor version
|
|
|
|
//:! Defaults to 0 if no version information is available
|
2004-06-23 17:04:06 +00:00
|
|
|
property Minor: Integer read FMinor write FMinor;
|
2004-06-06 21:01:32 +00:00
|
|
|
|
|
|
|
//:$ Contains the application's Release number
|
|
|
|
//:! Defaults to 0 if no version information is available
|
2004-06-23 17:04:06 +00:00
|
|
|
property Release: Integer read FRelease write FRelease;
|
2004-06-06 21:01:32 +00:00
|
|
|
|
|
|
|
//:$ Contains the application's Build number
|
|
|
|
//:! Defaults to 0 if no version information is available
|
2004-06-23 17:04:06 +00:00
|
|
|
property Build: Integer read FBuild write FBuild;
|
|
|
|
|
|
|
|
//:$ Contains the value of the Debug Build flag
|
|
|
|
//:! Defaults to False if no version information is available
|
|
|
|
property Debug: Boolean read FDebug write FDebug;
|
|
|
|
|
|
|
|
//:$ Contains the value of the Prerelease Build flag
|
|
|
|
//:! Defaults to False if no version information is available
|
|
|
|
property Prerelease: Boolean read FPrerelease write FPrerelease;
|
|
|
|
|
|
|
|
//:$ Contains the value of the Special Build flag
|
|
|
|
//:! Defaults to False if no version information is available
|
|
|
|
property Special: Boolean read FSpecial write FSpecial;
|
|
|
|
|
|
|
|
//:$ Contains the value of the Private Build flag
|
|
|
|
//:! Defaults to False if no version information is available
|
|
|
|
property Private: Boolean read FPrivate write FPrivate;
|
2004-06-06 21:01:32 +00:00
|
|
|
|
|
|
|
//:$ Contains extended version information
|
2004-06-06 20:47:24 +00:00
|
|
|
property Strings: TX2AppVersionStrings read FStrings;
|
|
|
|
end;
|
|
|
|
|
2008-01-20 14:50:26 +00:00
|
|
|
|
2004-06-06 20:47:24 +00:00
|
|
|
TX2App = class(TObject)
|
|
|
|
private
|
|
|
|
FVersion: TX2AppVersion;
|
2006-01-08 15:15:20 +00:00
|
|
|
FFileName: String;
|
2004-06-06 20:47:24 +00:00
|
|
|
FPath: String;
|
2005-08-29 06:52:10 +00:00
|
|
|
FMainPath: String;
|
2005-10-14 09:16:53 +00:00
|
|
|
FUserPath: String;
|
2008-01-20 14:50:26 +00:00
|
|
|
|
|
|
|
function GetVersion(): TX2AppVersion;
|
2004-06-06 20:47:24 +00:00
|
|
|
protected
|
2005-08-29 06:52:10 +00:00
|
|
|
function GetModule(const AModule: THandle): String; virtual;
|
2004-06-06 20:47:24 +00:00
|
|
|
procedure GetPath(); virtual;
|
|
|
|
public
|
|
|
|
constructor Create();
|
|
|
|
destructor Destroy(); override;
|
|
|
|
|
2004-06-06 21:01:32 +00:00
|
|
|
//:$ Returns the formatted version information
|
2004-08-22 19:38:26 +00:00
|
|
|
//:: If ABuild is False, the return value will not include the
|
|
|
|
//:: application's Build number. If AProductName is True, the
|
|
|
|
//:: product name will be included as well.
|
|
|
|
function FormatVersion(const ABuild: Boolean = True;
|
|
|
|
const AProductName: Boolean = False): String;
|
2004-06-06 20:47:24 +00:00
|
|
|
|
2006-01-08 15:15:20 +00:00
|
|
|
//:$ Contains the filename of the current module
|
|
|
|
//:! In DLL's and BPL's, this points to the filename of the current library.
|
|
|
|
//:! Note that for packages using X2Utils.bpl, this will point to the path
|
|
|
|
//:! of X2Utils.bpl, not the calling package! If you want the main
|
|
|
|
//:! executable's path, use the MainPath property.
|
|
|
|
property FileName: String read FFileName;
|
|
|
|
|
2005-08-29 06:52:10 +00:00
|
|
|
//:$ Contains the path to the current module
|
|
|
|
//:! In DLL's and BPL's, this points to the path of the current library.
|
|
|
|
//:! Note that for packages using X2Utils.bpl, this will point to the path
|
|
|
|
//:! of X2Utils.bpl, not the calling package! If you want the main
|
|
|
|
//:! executable's path, use the MainPath property.
|
|
|
|
property Path: String read FPath;
|
|
|
|
|
2004-06-06 21:01:32 +00:00
|
|
|
//:$ Contains the path to the application's executable
|
|
|
|
//:! This path in unaffected by the working directory which may be
|
|
|
|
//:! specified in the shortcut launching the application. A trailing
|
|
|
|
//:! slash is included in the path.
|
2005-08-29 06:52:10 +00:00
|
|
|
property MainPath: String read FMainPath;
|
2004-06-06 21:01:32 +00:00
|
|
|
|
2005-10-14 09:16:53 +00:00
|
|
|
//:$ Contains the path to the user's Application Data
|
|
|
|
property UserPath: String read FUserPath;
|
|
|
|
|
2004-06-06 21:01:32 +00:00
|
|
|
//:$ Contains the application's version information
|
2008-01-20 14:50:26 +00:00
|
|
|
property Version: TX2AppVersion read GetVersion;
|
2004-06-06 20:47:24 +00:00
|
|
|
end;
|
|
|
|
|
2004-06-07 19:17:31 +00:00
|
|
|
//:$ Returns a singleton App object
|
2004-06-06 20:47:24 +00:00
|
|
|
function App(): TX2App;
|
2004-06-06 19:43:32 +00:00
|
|
|
|
|
|
|
implementation
|
2004-06-06 20:47:24 +00:00
|
|
|
uses
|
2005-10-14 09:16:53 +00:00
|
|
|
ActiveX,
|
|
|
|
ShlObj,
|
2004-06-06 20:47:24 +00:00
|
|
|
SysUtils,
|
|
|
|
TypInfo,
|
|
|
|
Windows;
|
|
|
|
|
|
|
|
const
|
|
|
|
tkStrings = [tkString, tkLString, tkWString];
|
|
|
|
|
|
|
|
var
|
|
|
|
GApp: TX2App;
|
2004-06-06 21:01:32 +00:00
|
|
|
|
|
|
|
{$I X2UtCompilerVersion.inc}
|
2004-06-06 22:21:17 +00:00
|
|
|
|
2004-06-06 20:47:24 +00:00
|
|
|
|
|
|
|
{========================================
|
|
|
|
Singleton
|
|
|
|
========================================}
|
|
|
|
function App;
|
|
|
|
begin
|
|
|
|
if not Assigned(GApp) then
|
|
|
|
GApp := TX2App.Create();
|
|
|
|
|
|
|
|
Result := GApp;
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
{=================== TX2AppVersionStrings
|
|
|
|
Initialization
|
|
|
|
========================================}
|
|
|
|
constructor TX2AppVersionStrings.Create;
|
|
|
|
begin
|
|
|
|
inherited;
|
|
|
|
|
|
|
|
FValues := TStringList.Create();
|
|
|
|
end;
|
|
|
|
|
|
|
|
destructor TX2AppVersionStrings.Destroy;
|
|
|
|
begin
|
|
|
|
FreeAndNil(FValues);
|
|
|
|
|
|
|
|
inherited;
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
function TX2AppVersionStrings.GetValue;
|
|
|
|
begin
|
2004-09-10 09:34:37 +00:00
|
|
|
if (Index > -1) and (Index < FValues.Count) then
|
2004-06-06 20:47:24 +00:00
|
|
|
Result := FValues[Index]
|
|
|
|
else
|
|
|
|
Result := '';
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TX2AppVersionStrings.SetValue;
|
|
|
|
var
|
|
|
|
iAdd: Integer;
|
|
|
|
|
|
|
|
begin
|
|
|
|
if Index >= FValues.Count then
|
|
|
|
for iAdd := FValues.Count to Index do
|
|
|
|
FValues.Add('');
|
|
|
|
|
|
|
|
FValues[Index] := Value;
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
{========================== TX2AppVersion
|
|
|
|
Initialization
|
|
|
|
========================================}
|
2006-01-08 15:15:20 +00:00
|
|
|
constructor TX2AppVersion.Create(const AFileName: String);
|
2004-06-06 20:47:24 +00:00
|
|
|
begin
|
2006-01-08 15:15:20 +00:00
|
|
|
inherited Create();
|
2004-06-06 20:47:24 +00:00
|
|
|
|
|
|
|
FStrings := TX2AppVersionStrings.Create();
|
2006-01-08 15:15:20 +00:00
|
|
|
GetVersion(AFileName);
|
2004-06-06 20:47:24 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
destructor TX2AppVersion.Destroy;
|
|
|
|
begin
|
|
|
|
FreeAndNil(FStrings);
|
|
|
|
|
|
|
|
inherited;
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
2006-01-08 15:15:20 +00:00
|
|
|
function TX2AppVersion.FormatVersion(const ABuild,
|
|
|
|
AProductName: Boolean): String;
|
|
|
|
var
|
|
|
|
sBuild: String;
|
|
|
|
|
|
|
|
begin
|
|
|
|
sBuild := '';
|
|
|
|
|
|
|
|
if ABuild then
|
|
|
|
sBuild := Format(' build %d', [Build]);
|
|
|
|
|
|
|
|
Result := '';
|
|
|
|
if AProductName then
|
|
|
|
Result := Strings.ProductName + ' ';
|
|
|
|
|
|
|
|
Result := Result + Format('v%d.%d.%d%s', [Major, Minor, Release, sBuild]);
|
|
|
|
end;
|
|
|
|
|
|
|
|
procedure TX2AppVersion.GetVersion(const AFileName: String);
|
|
|
|
type
|
|
|
|
PLongInt = ^LongInt;
|
|
|
|
|
|
|
|
var
|
|
|
|
pInfo: PVSFixedFileInfo;
|
|
|
|
dInfo: Cardinal;
|
|
|
|
dSize: Cardinal;
|
|
|
|
dVer: Cardinal;
|
|
|
|
dTemp: Cardinal;
|
|
|
|
pBuffer: PChar;
|
|
|
|
pFile: PChar;
|
|
|
|
iCount: Integer;
|
|
|
|
iSize: Integer;
|
|
|
|
iProp: Integer;
|
|
|
|
pProps: PPropList;
|
|
|
|
pCode: PLongInt;
|
|
|
|
pValue: PChar;
|
|
|
|
aCode: array[0..1] of Word;
|
|
|
|
cName: array[0..25] of Char;
|
|
|
|
|
|
|
|
begin
|
|
|
|
Major := 0;
|
|
|
|
Minor := 0;
|
|
|
|
Release := 0;
|
|
|
|
Build := 0;
|
|
|
|
|
|
|
|
pFile := PChar(AFileName);
|
|
|
|
dSize := GetFileVersionInfoSize(pFile, dTemp);
|
|
|
|
|
|
|
|
if dSize <> 0 then begin
|
|
|
|
GetMem(pBuffer, dSize);
|
|
|
|
|
|
|
|
try
|
|
|
|
if GetFileVersionInfo(pFile, dTemp, dSize, pBuffer) then
|
|
|
|
// Get version numbers
|
|
|
|
if VerQueryValue(pBuffer, '\', Pointer(pInfo), dInfo) then begin
|
|
|
|
Major := HiWord(pInfo^.dwFileVersionMS);
|
|
|
|
Minor := LoWord(pInfo^.dwFileVersionMS);
|
|
|
|
Release := HiWord(pInfo^.dwFileVersionLS);
|
|
|
|
Build := LoWord(pInfo^.dwFileVersionLS);
|
|
|
|
Debug := ((pInfo^.dwFileFlags and VS_FF_DEBUG) = VS_FF_DEBUG);
|
|
|
|
Prerelease := ((pInfo^.dwFileFlags and VS_FF_PRERELEASE) = VS_FF_PRERELEASE);
|
|
|
|
Special := ((pInfo^.dwFileFlags and VS_FF_SPECIALBUILD) = VS_FF_SPECIALBUILD);
|
|
|
|
Private := ((pInfo^.dwFileFlags and VS_FF_PRIVATEBUILD) = VS_FF_PRIVATEBUILD);
|
|
|
|
end;
|
|
|
|
|
|
|
|
// Get additional version information using RTTI
|
|
|
|
VerQueryValue(pBuffer, '\VarFileInfo\Translation', Pointer(pCode), dVer);
|
|
|
|
if dVer <> 0 then begin
|
|
|
|
aCode[0] := HiWord(pCode^);
|
|
|
|
aCode[1] := LoWord(pCode^);
|
|
|
|
|
|
|
|
FillChar(cName, SizeOf(cName), #0);
|
|
|
|
wvsprintf(cName, '\StringFileInfo\%8.8lx', @aCode);
|
|
|
|
|
|
|
|
iCount := GetPropList(Strings.ClassInfo, tkStrings, nil);
|
|
|
|
iSize := iCount * SizeOf(TPropInfo);
|
|
|
|
GetMem(pProps, iSize);
|
|
|
|
|
|
|
|
try
|
|
|
|
GetPropList(Strings.ClassInfo, tkStrings, pProps);
|
|
|
|
|
|
|
|
for iProp := 0 to iCount - 1 do begin
|
|
|
|
if VerQueryValue(pBuffer, PChar(cName + '\' + pProps^[iProp]^.Name),
|
|
|
|
Pointer(pValue), dVer) then
|
|
|
|
SetStrProp(Strings, pProps[iProp], pValue);
|
|
|
|
end;
|
|
|
|
finally
|
|
|
|
FreeMem(pProps, iSize);
|
|
|
|
end;
|
|
|
|
end;
|
|
|
|
finally
|
|
|
|
FreeMem(pBuffer, dSize);
|
|
|
|
end;
|
|
|
|
end;
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
2004-06-06 20:47:24 +00:00
|
|
|
{================================= TX2App
|
|
|
|
Initialization
|
|
|
|
========================================}
|
2006-01-08 15:15:20 +00:00
|
|
|
constructor TX2App.Create();
|
2004-06-06 20:47:24 +00:00
|
|
|
begin
|
|
|
|
inherited;
|
|
|
|
|
|
|
|
GetPath();
|
|
|
|
end;
|
|
|
|
|
2006-01-08 15:15:20 +00:00
|
|
|
destructor TX2App.Destroy();
|
2004-06-06 20:47:24 +00:00
|
|
|
begin
|
|
|
|
FreeAndNil(FVersion);
|
|
|
|
|
|
|
|
inherited;
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
{================================= TX2App
|
|
|
|
Path
|
|
|
|
========================================}
|
2005-08-29 06:52:10 +00:00
|
|
|
function TX2App.GetModule(const AModule: THandle): String;
|
2004-06-06 20:47:24 +00:00
|
|
|
var
|
|
|
|
cModule: array[0..MAX_PATH] of Char;
|
|
|
|
|
|
|
|
begin
|
|
|
|
FillChar(cModule, SizeOf(cModule), #0);
|
2005-08-29 06:52:10 +00:00
|
|
|
GetModuleFileName(AModule, @cModule, SizeOf(cModule));
|
2004-06-06 20:47:24 +00:00
|
|
|
Result := String(cModule);
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
2005-10-14 09:16:53 +00:00
|
|
|
procedure TX2App.GetPath();
|
|
|
|
function FixPath(const APath: String): String;
|
|
|
|
begin
|
2009-02-25 10:51:58 +00:00
|
|
|
Result := {$IFDEF D6PLUS}IncludeTrailingPathDelimiter
|
2005-08-29 06:52:10 +00:00
|
|
|
{$ELSE}IncludeTrailingBackslash{$ENDIF}
|
2005-10-14 09:16:53 +00:00
|
|
|
(APath);
|
|
|
|
end;
|
|
|
|
|
|
|
|
var
|
|
|
|
ifMalloc: IMalloc;
|
|
|
|
pIDL: PItemIDList;
|
|
|
|
cPath: array[0..MAX_PATH] of Char;
|
|
|
|
|
|
|
|
begin
|
2006-01-08 15:15:20 +00:00
|
|
|
FFileName := GetModule(SysInit.HInstance);
|
|
|
|
FPath := FixPath(ExtractFilePath(FFileName));
|
2005-10-14 09:16:53 +00:00
|
|
|
FMainPath := FixPath(ExtractFilePath(GetModule(0)));
|
|
|
|
|
|
|
|
SHGetMalloc(ifMalloc);
|
|
|
|
try
|
|
|
|
FillChar(cPath, SizeOf(cPath), #0);
|
|
|
|
SHGetSpecialFolderLocation(0, CSIDL_APPDATA, pIDL);
|
|
|
|
SHGetPathFromIDList(pIDL, @cPath);
|
|
|
|
|
|
|
|
FUserPath := FixPath(cPath);
|
|
|
|
finally
|
|
|
|
ifMalloc := nil;
|
|
|
|
end;
|
2004-06-06 20:47:24 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
|
2008-01-20 14:50:26 +00:00
|
|
|
function TX2App.GetVersion(): TX2AppVersion;
|
|
|
|
begin
|
|
|
|
if not Assigned(FVersion) then
|
|
|
|
FVersion := TX2AppVersion.Create(FFileName);
|
|
|
|
|
|
|
|
Result := FVersion;
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
2004-06-06 20:47:24 +00:00
|
|
|
{================================= TX2App
|
|
|
|
Version
|
|
|
|
========================================}
|
2006-01-08 15:15:20 +00:00
|
|
|
function TX2App.FormatVersion(const ABuild: Boolean = True;
|
|
|
|
const AProductName: Boolean = False): String;
|
2004-06-06 20:47:24 +00:00
|
|
|
begin
|
2010-01-31 00:11:02 +00:00
|
|
|
Result := Version.FormatVersion(ABuild, AProductName);
|
2004-06-06 20:47:24 +00:00
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
initialization
|
|
|
|
finalization
|
|
|
|
FreeAndNil(GApp);
|
2004-06-06 19:43:32 +00:00
|
|
|
|
|
|
|
end.
|
2009-02-25 10:51:58 +00:00
|
|
|
|