1 |
(* ***** BEGIN LICENSE BLOCK *****
|
2 |
* Version: MPL 1.1
|
3 |
*
|
4 |
* The contents of this file are subject to the Mozilla Public License Version
|
5 |
* 1.1 (the "License"); you may not use this file except in compliance with
|
6 |
* the License. You may obtain a copy of the License at
|
7 |
* http://www.mozilla.org/MPL/
|
8 |
*
|
9 |
* Software distributed under the License is distributed on an "AS IS" basis,
|
10 |
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
11 |
* for the specific language governing rights and limitations under the
|
12 |
* License.
|
13 |
*
|
14 |
* The Original Code is TurboPower SysTools
|
15 |
*
|
16 |
* The Initial Developer of the Original Code is
|
17 |
* TurboPower Software
|
18 |
*
|
19 |
* Portions created by the Initial Developer are Copyright (C) 1996-2002
|
20 |
* the Initial Developer. All Rights Reserved.
|
21 |
*
|
22 |
* Contributor(s):
|
23 |
*
|
24 |
* ***** END LICENSE BLOCK ***** *)
|
25 |
|
26 |
unit ExVInfoU;
|
27 |
|
28 |
interface
|
29 |
|
30 |
uses
|
31 |
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,
|
32 |
|
33 |
StVInfo, StBase;
|
34 |
|
35 |
type
|
36 |
TForm1 = class(TForm)
|
37 |
Button1: TButton;
|
38 |
Memo1: TMemo;
|
39 |
OpenDialog1: TOpenDialog;
|
40 |
VerInfo: TStVersionInfo;
|
41 |
procedure Button1Click(Sender: TObject);
|
42 |
procedure FormCreate(Sender: TObject);
|
43 |
private
|
44 |
{ Private declarations }
|
45 |
procedure ShowVersionInfo;
|
46 |
public
|
47 |
{ Public declarations }
|
48 |
end;
|
49 |
|
50 |
var
|
51 |
Form1: TForm1;
|
52 |
|
53 |
implementation
|
54 |
|
55 |
{$R *.DFM}
|
56 |
|
57 |
procedure TForm1.Button1Click(Sender: TObject);
|
58 |
begin
|
59 |
if OpenDialog1.Execute then begin
|
60 |
VerInfo.FileName := OpenDialog1.FileName;
|
61 |
ShowVersionInfo;
|
62 |
end;
|
63 |
end;
|
64 |
|
65 |
procedure TForm1.FormCreate(Sender: TObject);
|
66 |
begin
|
67 |
ShowVersionInfo;
|
68 |
end;
|
69 |
|
70 |
procedure TForm1.ShowVersionInfo;
|
71 |
begin
|
72 |
with Memo1.Lines do begin
|
73 |
Memo1.Clear;
|
74 |
Add('Comments: ' + VerInfo.Comments);
|
75 |
Add('Company Name: ' + VerInfo.CompanyName);
|
76 |
Add('File Description: ' + VerInfo.FileDescription);
|
77 |
Add('File Version: ' + VerInfo.FileVersion);
|
78 |
Add('Internal Name: ' + VerInfo.InternalName);
|
79 |
Add('Legal Copyright: ' + VerInfo.LegalCopyright);
|
80 |
Add('Legal Trademark: ' + VerInfo.LegalTrademark);
|
81 |
Add('Original Filename: ' + VerInfo.OriginalFilename);
|
82 |
Add('Product Name: ' + VerInfo.ProductName);
|
83 |
Add('Product Version: ' + VerInfo.ProductVersion);
|
84 |
if UpperCase(ExtractFileName(VerInfo.FileName))
|
85 |
= UpperCase('exvrinfo.exe') then begin
|
86 |
Add('Extra Info 1: ' + VerInfo.GetKeyValue('ExtraInfo1'));
|
87 |
Add('Extra Info 2: ' + VerInfo.GetKeyValue('ExtraInfo2'));
|
88 |
end;
|
89 |
Add('Language: ' + VerInfo.LanguageName);
|
90 |
if VerInfo.FileDate <> 0 then
|
91 |
Add('File Date: ' + DateToStr(VerInfo.FileDate));
|
92 |
end;
|
93 |
end;
|
94 |
|
95 |
end.
|