Стартовый пул
This commit is contained in:
221
dd-verinfo/Demo/1/FmVIDemo.dfm
Normal file
221
dd-verinfo/Demo/1/FmVIDemo.dfm
Normal file
@@ -0,0 +1,221 @@
|
||||
object MainForm: TMainForm
|
||||
Left = 492
|
||||
Top = 162
|
||||
Width = 599
|
||||
Height = 672
|
||||
Color = clBtnFace
|
||||
Constraints.MinHeight = 360
|
||||
Constraints.MinWidth = 320
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -12
|
||||
Font.Name = 'Arial'
|
||||
Font.Style = []
|
||||
OldCreateOrder = True
|
||||
Position = poScreenCenter
|
||||
Scaled = False
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
DesignSize = (
|
||||
583
|
||||
634)
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 15
|
||||
object bvlSpacer1: TBevel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 583
|
||||
Height = 5
|
||||
Align = alTop
|
||||
Shape = bsTopLine
|
||||
end
|
||||
object sbFileName: TSpeedButton
|
||||
Left = 545
|
||||
Top = 9
|
||||
Width = 29
|
||||
Height = 27
|
||||
Hint = 'Click to browse for files.'
|
||||
Anchors = [akTop, akRight]
|
||||
Caption = '...'
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -13
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
OnClick = sbFileNameClick
|
||||
end
|
||||
object gpFixed: TGroupBox
|
||||
Left = 0
|
||||
Top = 79
|
||||
Width = 583
|
||||
Height = 202
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
Caption = ' Fixed File &Information '
|
||||
TabOrder = 0
|
||||
DesignSize = (
|
||||
583
|
||||
202)
|
||||
object lvFixed: TListView
|
||||
Left = 10
|
||||
Top = 20
|
||||
Width = 562
|
||||
Height = 173
|
||||
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||
Columns = <
|
||||
item
|
||||
Caption = 'Item'
|
||||
Width = 148
|
||||
end
|
||||
item
|
||||
Caption = 'Value'
|
||||
Width = 410
|
||||
end>
|
||||
GridLines = True
|
||||
Items.Data = {
|
||||
F50000000700000000000000FFFFFFFFFFFFFFFF00000000000000000C46696C
|
||||
652056657273696F6E00000000FFFFFFFFFFFFFFFF00000000000000000F5072
|
||||
6F647563742056657273696F6E00000000FFFFFFFFFFFFFFFF00000000000000
|
||||
000F46696C6520466C616773204D61736B00000000FFFFFFFFFFFFFFFF000000
|
||||
00000000000A46696C6520466C61677300000000FFFFFFFFFFFFFFFF00000000
|
||||
00000000104F7065726174696E672053797374656D00000000FFFFFFFFFFFFFF
|
||||
FF00000000000000000946696C65205479706500000000FFFFFFFFFFFFFFFF00
|
||||
000000000000000D46696C65205375622D74797065}
|
||||
ReadOnly = True
|
||||
RowSelect = True
|
||||
TabOrder = 0
|
||||
ViewStyle = vsReport
|
||||
OnMouseMove = lvMouseMove
|
||||
end
|
||||
end
|
||||
object gpVar: TGroupBox
|
||||
Left = 0
|
||||
Top = 296
|
||||
Width = 583
|
||||
Height = 311
|
||||
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||
Caption = ' Variable Information '
|
||||
TabOrder = 1
|
||||
DesignSize = (
|
||||
583
|
||||
311)
|
||||
object lblTrans: TLabel
|
||||
Left = 10
|
||||
Top = 20
|
||||
Width = 65
|
||||
Height = 15
|
||||
Caption = 'Tr&anslation:'
|
||||
FocusControl = cmbTrans
|
||||
end
|
||||
object lblStr: TLabel
|
||||
Left = 10
|
||||
Top = 75
|
||||
Width = 120
|
||||
Height = 15
|
||||
Caption = '&String File Information'
|
||||
FocusControl = lvStr
|
||||
end
|
||||
object cmbTrans: TComboBox
|
||||
Left = 10
|
||||
Top = 39
|
||||
Width = 562
|
||||
Height = 23
|
||||
Style = csDropDownList
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
ItemHeight = 15
|
||||
TabOrder = 0
|
||||
OnChange = cmbTransChange
|
||||
end
|
||||
object lvStr: TListView
|
||||
Left = 10
|
||||
Top = 95
|
||||
Width = 562
|
||||
Height = 205
|
||||
Anchors = [akLeft, akTop, akRight, akBottom]
|
||||
Columns = <
|
||||
item
|
||||
Caption = 'Name'
|
||||
Width = 148
|
||||
end
|
||||
item
|
||||
Caption = 'String'
|
||||
Width = 410
|
||||
end>
|
||||
GridLines = True
|
||||
Items.Data = {
|
||||
A70100000C00000000000000FFFFFFFFFFFFFFFF000000000000000008436F6D
|
||||
6D656E747300000000FFFFFFFFFFFFFFFF00000000000000000C436F6D70616E
|
||||
79204E616D6500000000FFFFFFFFFFFFFFFF00000000000000001046696C6520
|
||||
4465736372697074696F6E00000000FFFFFFFFFFFFFFFF00000000000000000C
|
||||
46696C652056657273696F6E00000000FFFFFFFFFFFFFFFF0000000000000000
|
||||
0D496E7465726E616C204E616D6500000000FFFFFFFFFFFFFFFF000000000000
|
||||
00000F4C6567616C20436F7079726967687400000000FFFFFFFFFFFFFFFF0000
|
||||
000000000000104C6567616C2054726164656D61726B7300000000FFFFFFFFFF
|
||||
FFFFFF0000000000000000124F726967696E616C2046696C65204E616D650000
|
||||
0000FFFFFFFFFFFFFFFF00000000000000000D50726976617465204275696C64
|
||||
00000000FFFFFFFFFFFFFFFF00000000000000000C50726F64756374204E616D
|
||||
6500000000FFFFFFFFFFFFFFFF00000000000000000F50726F64756374205665
|
||||
7273696F6E00000000FFFFFFFFFFFFFFFF00000000000000000D537065636961
|
||||
6C204275696C64}
|
||||
ReadOnly = True
|
||||
RowSelect = True
|
||||
TabOrder = 1
|
||||
ViewStyle = vsReport
|
||||
OnMouseMove = lvMouseMove
|
||||
end
|
||||
end
|
||||
object edFileName: TEdit
|
||||
Left = 10
|
||||
Top = 10
|
||||
Width = 523
|
||||
Height = 23
|
||||
Hint =
|
||||
'Enter the name of a file here (or drag one from Explorer), then ' +
|
||||
'press Refresh.'
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
TabOrder = 2
|
||||
end
|
||||
object btnRefresh: TButton
|
||||
Left = 10
|
||||
Top = 42
|
||||
Width = 92
|
||||
Height = 31
|
||||
Hint = 'Click to display version info for the above file.'
|
||||
Caption = '&Refresh'
|
||||
Default = True
|
||||
TabOrder = 3
|
||||
OnClick = btnRefreshClick
|
||||
end
|
||||
object btnClose: TButton
|
||||
Left = 481
|
||||
Top = 42
|
||||
Width = 93
|
||||
Height = 31
|
||||
Hint = 'Click to exit.'
|
||||
Anchors = [akTop, akRight]
|
||||
Cancel = True
|
||||
Caption = '&Close'
|
||||
TabOrder = 4
|
||||
OnClick = btnCloseClick
|
||||
end
|
||||
object sbHints: TStatusBar
|
||||
Left = 0
|
||||
Top = 612
|
||||
Width = 583
|
||||
Height = 22
|
||||
AutoHint = True
|
||||
Panels = <>
|
||||
SimplePanel = True
|
||||
end
|
||||
object dlgBrowse: TOpenDialog
|
||||
Filter = 'All files|*.*'
|
||||
Options = [ofHideReadOnly, ofFileMustExist]
|
||||
Title = 'Browse'
|
||||
Left = 96
|
||||
Top = 34
|
||||
end
|
||||
object viInfo: TPJVersionInfo
|
||||
Left = 128
|
||||
Top = 34
|
||||
end
|
||||
end
|
499
dd-verinfo/Demo/1/FmVIDemo.pas
Normal file
499
dd-verinfo/Demo/1/FmVIDemo.pas
Normal file
@@ -0,0 +1,499 @@
|
||||
{
|
||||
* FmVIDemo.pas
|
||||
*
|
||||
* Main form for Version Information Component VIDemo demo program.
|
||||
*
|
||||
* $Rev: 1109 $
|
||||
* $Date: 2013-01-13 23:19:20 +0000 (Sun, 13 Jan 2013) $
|
||||
*
|
||||
* Any copyright in this file is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
}
|
||||
|
||||
unit FmVIDemo;
|
||||
|
||||
{$UNDEF Supports_RTLNameSpaces}
|
||||
{$IFDEF CONDITIONALEXPRESSIONS}
|
||||
{$IF CompilerVersion >= 15.0} // >= Delphi 7
|
||||
{$WARN UNSAFE_CODE OFF}
|
||||
{$IFEND}
|
||||
{$IF CompilerVersion >= 23.0} // Delphi XE2
|
||||
{$DEFINE Supports_RTLNameSpaces}
|
||||
{$IFEND}
|
||||
{$ENDIF}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
// Delphi
|
||||
{$IFDEF Supports_RTLNameSpaces}
|
||||
Vcl.ComCtrls, Vcl.StdCtrls, Vcl.Buttons, Vcl.Dialogs, Vcl.Controls,
|
||||
System.Classes, Vcl.Forms, Winapi.Windows, Winapi.Messages, Vcl.ExtCtrls,
|
||||
{$ELSE}
|
||||
ComCtrls, StdCtrls, Buttons, Dialogs, Controls, Classes, Forms, Windows,
|
||||
Messages, ExtCtrls,
|
||||
{$ENDIF}
|
||||
// DelphiDabbler component
|
||||
PJVersionInfo;
|
||||
|
||||
type
|
||||
TMainForm = class(TForm)
|
||||
dlgBrowse: TOpenDialog;
|
||||
gpFixed: TGroupBox;
|
||||
lvFixed: TListView;
|
||||
gpVar: TGroupBox;
|
||||
lblTrans: TLabel;
|
||||
lblStr: TLabel;
|
||||
cmbTrans: TComboBox;
|
||||
lvStr: TListView;
|
||||
bvlSpacer1: TBevel;
|
||||
viInfo: TPJVersionInfo;
|
||||
sbFileName: TSpeedButton;
|
||||
edFileName: TEdit;
|
||||
btnRefresh: TButton;
|
||||
btnClose: TButton;
|
||||
sbHints: TStatusBar;
|
||||
procedure cmbTransChange(Sender: TObject);
|
||||
procedure lvMouseMove(Sender: TObject; Shift: TShiftState; X,
|
||||
Y: Integer);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure btnRefreshClick(Sender: TObject);
|
||||
procedure sbFileNameClick(Sender: TObject);
|
||||
procedure btnCloseClick(Sender: TObject);
|
||||
private
|
||||
procedure ClearDisplay;
|
||||
// Clear list views and combo box
|
||||
procedure Display;
|
||||
// Display version info for current file, if any
|
||||
procedure DisplayFFI;
|
||||
// Display fixed file info for current file
|
||||
procedure DisplayFFIItem(const Index: Integer; const FFI: TVSFixedFileInfo);
|
||||
// Display the fixed file item per the given index fixed file info
|
||||
// structure
|
||||
procedure DisplayTransInfo;
|
||||
// Display translation information in combo and selects first item if any
|
||||
procedure DisplayStringInfo(const TransIdx: Integer);
|
||||
// Display standard string information for given translation
|
||||
procedure WMDropFiles(var Msg: TWMDropFiles); message WM_DROPFILES;
|
||||
// Catch name of file dropped on window and enter in edit control
|
||||
end;
|
||||
|
||||
var
|
||||
MainForm: TMainForm;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
// Delphi
|
||||
{$IFDEF Supports_RTLNameSpaces}
|
||||
System.SysUtils, System.Math, WinApi.ShellAPI;
|
||||
{$ELSE}
|
||||
SysUtils, Math, ShellAPI;
|
||||
{$ENDIF}
|
||||
|
||||
{$R *.DFM}
|
||||
|
||||
const
|
||||
// Index of fixed file info in lvFixed
|
||||
cIdxFileVersion = 0;
|
||||
cIdxProductVersion = 1;
|
||||
cIdxFileFlagsMask = 2;
|
||||
cIdxFileFlags = 3;
|
||||
cIdxFileOS = 4;
|
||||
cIdxFileType = 5;
|
||||
cIdxFileSubType = 6;
|
||||
cFirstFFIIndex = 0;
|
||||
cLastFFIIndex = 6;
|
||||
|
||||
// The following types and constant table definitions provide information
|
||||
// required to display descriptions of fixed file information codes from version
|
||||
// resources
|
||||
|
||||
type
|
||||
TTableEntry = record
|
||||
// maps codes to descriptions
|
||||
Code: DWORD;
|
||||
Desc: string;
|
||||
end;
|
||||
|
||||
const
|
||||
cFileType: array[0..6] of TTableEntry =
|
||||
// maps file types to descriptions
|
||||
(
|
||||
(Code: VFT_APP; Desc: 'Application'),
|
||||
(Code: VFT_DLL; Desc: 'DLL'),
|
||||
(Code: VFT_DRV; Desc: 'Device driver'),
|
||||
(Code: VFT_FONT; Desc: 'Font'),
|
||||
(Code: VFT_STATIC_LIB; Desc: 'Static link library'),
|
||||
(Code: VFT_VXD; Desc: 'Virtual device driver'),
|
||||
(Code: VFT_UNKNOWN; Desc: 'Unknown')
|
||||
);
|
||||
|
||||
cFileOSBase: array[0..4] of TTableEntry =
|
||||
// maps base OS codes to descriptions
|
||||
(
|
||||
( Code: VOS_NT; Desc: 'Windows NT' ),
|
||||
( Code: VOS_DOS; Desc: 'MS-DOS' ),
|
||||
( Code: VOS_OS232; Desc: 'OS2 32 bit' ),
|
||||
( Code: VOS_OS216; Desc: 'OS2 16 bit' ),
|
||||
( Code: VOS_UNKNOWN; Desc: 'Any' )
|
||||
);
|
||||
|
||||
cFileOSTarget: array[0..4] of TTableEntry =
|
||||
// maps target OS codes to descriptions
|
||||
(
|
||||
( Code: VOS__WINDOWS32; Desc: '32 bit Windows' ),
|
||||
( Code: VOS__WINDOWS16; Desc: 'Windows 3.x' ),
|
||||
( Code: VOS__PM32; Desc: 'Presentation Manager 32' ),
|
||||
( Code: VOS__PM16; Desc: 'Presentation Manager 16' ),
|
||||
( Code: VOS__BASE; Desc: 'Unknown' )
|
||||
);
|
||||
|
||||
// The following procedures extract the required descriptions of fixed file
|
||||
// information codes from the tables above
|
||||
|
||||
function CodeToDesc(Code: DWORD;
|
||||
Table: array of TTableEntry): string;
|
||||
// Return description of given code using given table
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
Result := '';
|
||||
for I := Low(Table) to High(Table) do
|
||||
if Table[I].Code = Code then
|
||||
begin
|
||||
Result := Table[I].Desc;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
|
||||
function FileOSDesc(OS: DWORD): string;
|
||||
// Describe OS
|
||||
var
|
||||
Target, Base: DWORD;
|
||||
begin
|
||||
// get target and base OS
|
||||
Target := OS and $0000FFFF;
|
||||
Base := OS and $FFFF0000;
|
||||
// build description
|
||||
if Base = VOS_UNKNOWN then
|
||||
Result := CodeToDesc(Target, cFileOSTarget)
|
||||
else if Target = VOS__BASE then
|
||||
Result := CodeToDesc(Base, cFileOSBase)
|
||||
else
|
||||
Result := Format('%s on %s',
|
||||
[CodeToDesc(Target, cFileOSTarget),
|
||||
CodeToDesc(Base, cFileOSBase)]);
|
||||
end;
|
||||
|
||||
function FileFlagsToStr(Flags: DWORD): string;
|
||||
// Return string of file flags from given bit set
|
||||
const
|
||||
cFileFlags: array[0..5] of TTableEntry =
|
||||
(
|
||||
(Code: VS_FF_DEBUG; Desc: 'Debug'),
|
||||
(Code: VS_FF_PRERELEASE; Desc: 'Pre-release'),
|
||||
(Code: VS_FF_PATCHED; Desc: 'Patched'),
|
||||
(Code: VS_FF_PRIVATEBUILD; Desc: 'Private build'),
|
||||
(Code: VS_FF_INFOINFERRED; Desc: 'Inferred'),
|
||||
(Code: VS_FF_SPECIALBUILD; Desc: 'Special build') );
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
Result := '';
|
||||
for I := Low(cFileFlags) to High(cFileFlags) do
|
||||
if Flags and cFileFlags[I].Code = cFileFlags[I].Code then
|
||||
if Result = '' then
|
||||
Result := cFileFlags[I].Desc
|
||||
else
|
||||
Result := Result + ', ' + cFileFlags[I].Desc
|
||||
end;
|
||||
|
||||
function VerFmt(const MS, LS: DWORD): string;
|
||||
// Format the version number from the given DWORDs containing the info
|
||||
begin
|
||||
Result := Format('%d.%d.%d.%d',
|
||||
[HiWord(MS), LoWord(MS), HiWord(LS), LoWord(LS)])
|
||||
end;
|
||||
|
||||
{ TMainForm }
|
||||
|
||||
procedure TMainForm.btnCloseClick(Sender: TObject);
|
||||
// Close the app
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TMainForm.btnRefreshClick(Sender: TObject);
|
||||
// Display version info for file name entered in edit control
|
||||
begin
|
||||
// Store name of required file in version info component: this reads ver info
|
||||
viInfo.FileName := edFileName.Text;
|
||||
// Record file's name in caption
|
||||
Caption := Format('%s - %s',
|
||||
[Application.Title, ExtractFileName(viInfo.FileName)]);
|
||||
// Display info, if any
|
||||
Display
|
||||
end;
|
||||
|
||||
procedure TMainForm.ClearDisplay;
|
||||
// Clear list views and combo box
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
procedure ClearLV(LV: TListView);
|
||||
var
|
||||
Idx: Integer;
|
||||
begin
|
||||
for Idx := 0 to Pred(LV.Items.Count) do
|
||||
if LV.Items[Idx].SubItems.Count > 0 then
|
||||
LV.Items[Idx].SubItems[0] := '';
|
||||
end;
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
begin
|
||||
ClearLV(lvFixed);
|
||||
ClearLV(lvStr);
|
||||
cmbTrans.Items.Clear;
|
||||
cmbTrans.ItemIndex := -1;
|
||||
end;
|
||||
|
||||
procedure TMainForm.cmbTransChange(Sender: TObject);
|
||||
// When user selects a translation from combo box, display its string info
|
||||
begin
|
||||
DisplayStringInfo(cmbTrans.ItemIndex);
|
||||
end;
|
||||
|
||||
procedure TMainForm.Display;
|
||||
// Display version info for current file, if any
|
||||
begin
|
||||
// Display version info: display gets cleared and message displayed if no info
|
||||
if viInfo.HaveInfo then
|
||||
begin
|
||||
DisplayFFI;
|
||||
DisplayTransInfo;
|
||||
DisplayStringInfo(cmbTrans.ItemIndex);
|
||||
end
|
||||
else
|
||||
begin
|
||||
ClearDisplay;
|
||||
MessageDlg(
|
||||
'No version resource information available for ' + viInfo.FileName,
|
||||
mtInformation, [mbOK], 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TMainForm.DisplayFFI;
|
||||
// Display fixed file info for current file
|
||||
var
|
||||
Idx: Integer; // scans thru all fixed file items
|
||||
begin
|
||||
// Display each fixed file item
|
||||
for Idx := cFirstFFIIndex to cLastFFIIndex do
|
||||
begin
|
||||
// Ensure there's a sub item in list view for this item
|
||||
if lvFixed.Items[Idx].SubItems.Count = 0 then
|
||||
lvFixed.Items[Idx].SubItems.Add('');
|
||||
// Display the item
|
||||
DisplayFFIItem(Idx, viInfo.FixedFileInfo);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TMainForm.DisplayFFIItem(const Index: Integer;
|
||||
const FFI: TVSFixedFileInfo);
|
||||
// Display the fixed file item per the given index fixed file info structure
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
procedure AddItem(const Index: Integer; const Value: string);
|
||||
{Set the first sub item of the given list item to the given value}
|
||||
begin
|
||||
lvFixed.Items[Index].SubItems[0] := Value;
|
||||
end;
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
begin
|
||||
// Display the required item
|
||||
case Index of
|
||||
cIdxFileVersion:
|
||||
AddItem(cIdxFileVersion,
|
||||
VerFmt(FFI.dwFileVersionMS, FFI.dwFileVersionLS));
|
||||
cIdxProductVersion:
|
||||
AddItem(cIdxProductVersion,
|
||||
VerFmt(FFI.dwProductVersionMS, FFI.dwProductVersionLS));
|
||||
cIdxFileFlagsMask:
|
||||
AddItem(cIdxFileFlagsMask,
|
||||
FileFlagsToStr(FFI.dwFileFlagsMask));
|
||||
cIdxFileFlags:
|
||||
AddItem(cIdxFileFlags, FileFlagsToStr(FFI.dwFileFlags));
|
||||
cIdxFileOS:
|
||||
AddItem(cIdxFileOS, FileOSDesc(FFI.dwFileOS));
|
||||
cIdxFileType:
|
||||
AddItem(cIdxFileType, CodeToDesc(FFI.dwFileType, cFileType));
|
||||
cIdxFileSubType:
|
||||
case FFI.dwFileType of
|
||||
VFT_FONT, VFT_DRV, VFT_VXD:
|
||||
AddItem(cIdxFileSubType, Format('%0.8X', [FFI.dwFileSubType]));
|
||||
else AddItem(cIdxFileSubType, 'None');
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TMainForm.DisplayStringInfo(const TransIdx: Integer);
|
||||
// Display standard string information for given translation
|
||||
const
|
||||
// Details of names of all standard string information
|
||||
cStrInfoNames: array[0..11] of string = (
|
||||
'Comments',
|
||||
'CompanyName',
|
||||
'FileDescription',
|
||||
'FileVersion',
|
||||
'InternalName',
|
||||
'LegalCopyright',
|
||||
'LegalTrademarks',
|
||||
'OriginalFileName',
|
||||
'PrivateBuild',
|
||||
'ProductName',
|
||||
'ProductVersion',
|
||||
'SpecialBuild'
|
||||
);
|
||||
var
|
||||
Idx: Integer; // index of string info name in table
|
||||
begin
|
||||
// Select required translation in version info component
|
||||
viInfo.CurrentTranslation := TransIdx;
|
||||
// Display each piece of string info
|
||||
for Idx := Low(cStrInfoNames) to High(cStrInfoNames) do
|
||||
begin
|
||||
// Ensure we have a sub-item of list item in which to display info
|
||||
if lvStr.Items[Idx].SubItems.Count = 0 then
|
||||
lvStr.Items[Idx].SubItems.Add('');
|
||||
// Display string info or empty string if translation is not valid
|
||||
if viInfo.CurrentTranslation > -1 then
|
||||
// display string information
|
||||
lvStr.Items[Idx].SubItems[0] :=
|
||||
viInfo.StringFileInfo[cStrInfoNames[Idx]]
|
||||
else
|
||||
// clear string information
|
||||
lvStr.Items[Idx].SubItems[0] := '';
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TMainForm.DisplayTransInfo;
|
||||
// Display translation information in combo and selects first item if any
|
||||
var
|
||||
TransIdx: Integer; // loops thru all translations
|
||||
begin
|
||||
// Set up translations in combo box: indexes of items in combo = trans index
|
||||
cmbTrans.Clear;
|
||||
for TransIdx := 0 to Pred(viInfo.NumTranslations) do
|
||||
begin
|
||||
viInfo.CurrentTranslation := TransIdx;
|
||||
cmbTrans.Items.Add(Format('%s - %s', [viInfo.Language, viInfo.CharSet]));
|
||||
end;
|
||||
// Select first translation if there is one
|
||||
if viInfo.NumTranslations > 0 then
|
||||
cmbTrans.ItemIndex := 0
|
||||
else
|
||||
cmbTrans.ItemIndex := -1;
|
||||
end;
|
||||
|
||||
procedure TMainForm.FormCreate(Sender: TObject);
|
||||
// App starting: initialise (tell Windows we accept file drag/drops)
|
||||
begin
|
||||
DragAcceptFiles(Handle, True);
|
||||
end;
|
||||
|
||||
procedure TMainForm.FormDestroy(Sender: TObject);
|
||||
// App closing: tidy up (no more file drag/drops)
|
||||
begin
|
||||
DragAcceptFiles(Handle, False);
|
||||
end;
|
||||
|
||||
procedure TMainForm.lvMouseMove(Sender: TObject; Shift: TShiftState;
|
||||
X, Y: Integer);
|
||||
// Display any info that is too wide for list view column in pop-up window
|
||||
// when mouse passes over the item
|
||||
const
|
||||
{$J+}
|
||||
LastItem: TListItem = nil; // list item under cursor last time event called
|
||||
{$J-}
|
||||
var
|
||||
LV: TListView; // list view triggering this event
|
||||
Item: TListItem; // list item, if any, under mouse cursor
|
||||
StrW: Integer; // width of string in right column for current list item
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
procedure SetHint(const HintStr: string);
|
||||
{Set list view's hint to given string, and switch on hinting if string non-
|
||||
empty}
|
||||
begin
|
||||
LV.Hint := HintStr;
|
||||
LV.ShowHint := HintStr <> '';
|
||||
sbHints.AutoHint := HintStr = ''; // only auto hint for interactive controls
|
||||
end;
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
begin
|
||||
// Get reference to list view triggering this event
|
||||
LV := Sender as TListView;
|
||||
// Get list item under mouse cursor if any
|
||||
Item := LV.GetItemAt(X, Y);
|
||||
if Item <> LastItem then
|
||||
begin
|
||||
// Item has changed: ensure any active hint is cancelled so any new one will
|
||||
// be displayed
|
||||
LastItem := Item;
|
||||
Application.CancelHint;
|
||||
end;
|
||||
if Assigned(Item)
|
||||
and (X > LV.Columns[0].WidthType)
|
||||
and (Item.SubItems.Count > 0) then
|
||||
begin
|
||||
// Mouse cursor is over right column of a valid list item
|
||||
// .. we display narative as hint only if narrative is wider than column
|
||||
StrW := LV.StringWidth(Item.SubItems[0]);
|
||||
if StrW > LV.Columns[1].WidthType - 12 then
|
||||
SetHint(Item.SubItems[0])
|
||||
else
|
||||
SetHint('');
|
||||
end
|
||||
else
|
||||
// Mouse is not over an area containing narative text: no hint
|
||||
SetHint('');
|
||||
end;
|
||||
|
||||
procedure TMainForm.sbFileNameClick(Sender: TObject);
|
||||
// Get a file name from uer and display in edit box
|
||||
begin
|
||||
if dlgBrowse.Execute then
|
||||
edFileName.Text := dlgBrowse.FileName;
|
||||
end;
|
||||
|
||||
procedure TMainForm.WMDropFiles(var Msg: TWMDropFiles);
|
||||
// Catch name of file dropped on window and enter in edit control
|
||||
var
|
||||
NumDropped: Integer; // no of files dropped
|
||||
NameLen: Integer; // length of a file name
|
||||
FileName: string; // name of a dropped file
|
||||
begin
|
||||
inherited;
|
||||
// Find number of files dropped
|
||||
NumDropped := DragQueryFile(Msg.Drop, Cardinal(-1), nil, 0);
|
||||
try
|
||||
if NumDropped > 0 then
|
||||
begin
|
||||
// Find size required for filename buffer (without terminal #0)
|
||||
NameLen := DragQueryFile(Msg.Drop, 0, nil, 0);
|
||||
// Get name of dropped file: only interested in first if more than 1
|
||||
SetLength(FileName, NameLen); // Delphi adds space for terminal #0
|
||||
DragQueryFile(Msg.Drop, 0, PChar(FileName), NameLen + 1);
|
||||
// Place name of file in edit control
|
||||
edFileName.Text := FileName;
|
||||
end;
|
||||
finally
|
||||
// Release handle assoc. with drag/drop
|
||||
DragFinish(Msg.Drop);
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
12
dd-verinfo/Demo/1/ReadMe.txt
Normal file
12
dd-verinfo/Demo/1/ReadMe.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
The VIDemo demo program shows how to use the TPJVersionInfo component to read
|
||||
the version information from any executable file that contains it.
|
||||
|
||||
Run the program then enter the full path to an executable file in the edit box.
|
||||
Click refresh to display the version information.
|
||||
|
||||
If the program contains version information string file information in more than
|
||||
one language (translation) the "Translation" drop down list will display each
|
||||
one. Select a translation to display its string file information.
|
||||
|
||||
*** NOTE: To compile with Delphi 2007 first delete the .dproj file then load the
|
||||
project from the .bdsproj file.
|
169
dd-verinfo/Demo/1/VIDemo.bdsproj
Normal file
169
dd-verinfo/Demo/1/VIDemo.bdsproj
Normal file
@@ -0,0 +1,169 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<BorlandProject>
|
||||
<PersonalityInfo>
|
||||
<Option>
|
||||
<Option Name="Personality">Delphi.Personality</Option>
|
||||
<Option Name="ProjectType">VCLApplication</Option>
|
||||
<Option Name="Version">1.0</Option>
|
||||
<Option Name="GUID">{C6D5C670-1AFC-491B-93F2-BB34F2ABE90D}</Option>
|
||||
</Option>
|
||||
</PersonalityInfo>
|
||||
<Delphi.Personality>
|
||||
<Source>
|
||||
<Source Name="MainSource">VIDemo.dpr</Source>
|
||||
</Source>
|
||||
<FileVersion>
|
||||
<FileVersion Name="Version">7.0</FileVersion>
|
||||
</FileVersion>
|
||||
<Compiler>
|
||||
<Compiler Name="A">8</Compiler>
|
||||
<Compiler Name="B">0</Compiler>
|
||||
<Compiler Name="C">1</Compiler>
|
||||
<Compiler Name="D">1</Compiler>
|
||||
<Compiler Name="E">0</Compiler>
|
||||
<Compiler Name="F">0</Compiler>
|
||||
<Compiler Name="G">1</Compiler>
|
||||
<Compiler Name="H">1</Compiler>
|
||||
<Compiler Name="I">1</Compiler>
|
||||
<Compiler Name="J">0</Compiler>
|
||||
<Compiler Name="K">0</Compiler>
|
||||
<Compiler Name="L">1</Compiler>
|
||||
<Compiler Name="M">0</Compiler>
|
||||
<Compiler Name="N">1</Compiler>
|
||||
<Compiler Name="O">1</Compiler>
|
||||
<Compiler Name="P">1</Compiler>
|
||||
<Compiler Name="Q">0</Compiler>
|
||||
<Compiler Name="R">0</Compiler>
|
||||
<Compiler Name="S">0</Compiler>
|
||||
<Compiler Name="T">0</Compiler>
|
||||
<Compiler Name="U">0</Compiler>
|
||||
<Compiler Name="V">1</Compiler>
|
||||
<Compiler Name="W">0</Compiler>
|
||||
<Compiler Name="X">1</Compiler>
|
||||
<Compiler Name="Y">1</Compiler>
|
||||
<Compiler Name="Z">1</Compiler>
|
||||
<Compiler Name="ShowHints">True</Compiler>
|
||||
<Compiler Name="ShowWarnings">True</Compiler>
|
||||
<Compiler Name="UnitAliases">WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Compiler>
|
||||
<Compiler Name="NamespacePrefix"></Compiler>
|
||||
<Compiler Name="GenerateDocumentation">False</Compiler>
|
||||
<Compiler Name="DefaultNamespace"></Compiler>
|
||||
<Compiler Name="SymbolDeprecated">True</Compiler>
|
||||
<Compiler Name="SymbolLibrary">True</Compiler>
|
||||
<Compiler Name="SymbolPlatform">True</Compiler>
|
||||
<Compiler Name="SymbolExperimental">True</Compiler>
|
||||
<Compiler Name="UnitLibrary">True</Compiler>
|
||||
<Compiler Name="UnitPlatform">True</Compiler>
|
||||
<Compiler Name="UnitDeprecated">True</Compiler>
|
||||
<Compiler Name="UnitExperimental">True</Compiler>
|
||||
<Compiler Name="HResultCompat">True</Compiler>
|
||||
<Compiler Name="HidingMember">True</Compiler>
|
||||
<Compiler Name="HiddenVirtual">True</Compiler>
|
||||
<Compiler Name="Garbage">True</Compiler>
|
||||
<Compiler Name="BoundsError">True</Compiler>
|
||||
<Compiler Name="ZeroNilCompat">True</Compiler>
|
||||
<Compiler Name="StringConstTruncated">True</Compiler>
|
||||
<Compiler Name="ForLoopVarVarPar">True</Compiler>
|
||||
<Compiler Name="TypedConstVarPar">True</Compiler>
|
||||
<Compiler Name="AsgToTypedConst">True</Compiler>
|
||||
<Compiler Name="CaseLabelRange">True</Compiler>
|
||||
<Compiler Name="ForVariable">True</Compiler>
|
||||
<Compiler Name="ConstructingAbstract">True</Compiler>
|
||||
<Compiler Name="ComparisonFalse">True</Compiler>
|
||||
<Compiler Name="ComparisonTrue">True</Compiler>
|
||||
<Compiler Name="ComparingSignedUnsigned">True</Compiler>
|
||||
<Compiler Name="CombiningSignedUnsigned">True</Compiler>
|
||||
<Compiler Name="UnsupportedConstruct">True</Compiler>
|
||||
<Compiler Name="FileOpen">True</Compiler>
|
||||
<Compiler Name="FileOpenUnitSrc">True</Compiler>
|
||||
<Compiler Name="BadGlobalSymbol">True</Compiler>
|
||||
<Compiler Name="DuplicateConstructorDestructor">True</Compiler>
|
||||
<Compiler Name="InvalidDirective">True</Compiler>
|
||||
<Compiler Name="PackageNoLink">True</Compiler>
|
||||
<Compiler Name="PackageThreadVar">True</Compiler>
|
||||
<Compiler Name="ImplicitImport">True</Compiler>
|
||||
<Compiler Name="HPPEMITIgnored">True</Compiler>
|
||||
<Compiler Name="NoRetVal">True</Compiler>
|
||||
<Compiler Name="UseBeforeDef">True</Compiler>
|
||||
<Compiler Name="ForLoopVarUndef">True</Compiler>
|
||||
<Compiler Name="UnitNameMismatch">True</Compiler>
|
||||
<Compiler Name="NoCFGFileFound">True</Compiler>
|
||||
<Compiler Name="ImplicitVariants">True</Compiler>
|
||||
<Compiler Name="UnicodeToLocale">True</Compiler>
|
||||
<Compiler Name="LocaleToUnicode">True</Compiler>
|
||||
<Compiler Name="ImagebaseMultiple">True</Compiler>
|
||||
<Compiler Name="SuspiciousTypecast">True</Compiler>
|
||||
<Compiler Name="PrivatePropAccessor">True</Compiler>
|
||||
<Compiler Name="UnsafeType">False</Compiler>
|
||||
<Compiler Name="UnsafeCode">False</Compiler>
|
||||
<Compiler Name="UnsafeCast">False</Compiler>
|
||||
<Compiler Name="OptionTruncated">True</Compiler>
|
||||
<Compiler Name="WideCharReduced">True</Compiler>
|
||||
<Compiler Name="DuplicatesIgnored">True</Compiler>
|
||||
<Compiler Name="UnitInitSeq">True</Compiler>
|
||||
<Compiler Name="LocalPInvoke">True</Compiler>
|
||||
<Compiler Name="MessageDirective">True</Compiler>
|
||||
<Compiler Name="CodePage"></Compiler>
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Linker Name="MapFile">0</Linker>
|
||||
<Linker Name="OutputObjs">0</Linker>
|
||||
<Linker Name="GenerateHpps">False</Linker>
|
||||
<Linker Name="ConsoleApp">1</Linker>
|
||||
<Linker Name="DebugInfo">False</Linker>
|
||||
<Linker Name="RemoteSymbols">False</Linker>
|
||||
<Linker Name="GenerateDRC">False</Linker>
|
||||
<Linker Name="MinStackSize">16384</Linker>
|
||||
<Linker Name="MaxStackSize">1048576</Linker>
|
||||
<Linker Name="ImageBase">4194304</Linker>
|
||||
<Linker Name="ExeDescription"></Linker>
|
||||
</Linker>
|
||||
<Directories>
|
||||
<Directories Name="OutputDir"></Directories>
|
||||
<Directories Name="UnitOutputDir"></Directories>
|
||||
<Directories Name="PackageDLLOutputDir"></Directories>
|
||||
<Directories Name="PackageDCPOutputDir"></Directories>
|
||||
<Directories Name="SearchPath"></Directories>
|
||||
<Directories Name="Packages">vcl;rtl;vclx;indy;vclie;xmlrtl;inetdbbde;inet;inetdbxpress;dbrtl;soaprtl;dsnap;VclSmp;dbexpress;vcldb;dbxcds;inetdb;bdertl;vcldbx;adortl;teeui;teedb;tee;ibxpress;visualclx;visualdbclx;vclactnband;vclshlctrls;DDabLib</Directories>
|
||||
<Directories Name="Conditionals"></Directories>
|
||||
<Directories Name="DebugSourceDirs"></Directories>
|
||||
<Directories Name="UsePackages">False</Directories>
|
||||
</Directories>
|
||||
<Parameters>
|
||||
<Parameters Name="RunParams"></Parameters>
|
||||
<Parameters Name="HostApplication"></Parameters>
|
||||
<Parameters Name="Launcher"></Parameters>
|
||||
<Parameters Name="UseLauncher">False</Parameters>
|
||||
<Parameters Name="DebugCWD"></Parameters>
|
||||
<Parameters Name="Debug Symbols Search Path"></Parameters>
|
||||
<Parameters Name="LoadAllSymbols">True</Parameters>
|
||||
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
|
||||
</Parameters>
|
||||
<VersionInfo>
|
||||
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
|
||||
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
|
||||
<VersionInfo Name="MajorVer">1</VersionInfo>
|
||||
<VersionInfo Name="MinorVer">0</VersionInfo>
|
||||
<VersionInfo Name="Release">0</VersionInfo>
|
||||
<VersionInfo Name="Build">0</VersionInfo>
|
||||
<VersionInfo Name="Debug">False</VersionInfo>
|
||||
<VersionInfo Name="PreRelease">False</VersionInfo>
|
||||
<VersionInfo Name="Special">False</VersionInfo>
|
||||
<VersionInfo Name="Private">False</VersionInfo>
|
||||
<VersionInfo Name="DLL">False</VersionInfo>
|
||||
<VersionInfo Name="Locale">1033</VersionInfo>
|
||||
<VersionInfo Name="CodePage">1252</VersionInfo>
|
||||
</VersionInfo>
|
||||
<VersionInfoKeys>
|
||||
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
|
||||
</VersionInfoKeys>
|
||||
</Delphi.Personality>
|
||||
</BorlandProject>
|
135
dd-verinfo/Demo/1/VIDemo.dof
Normal file
135
dd-verinfo/Demo/1/VIDemo.dof
Normal file
@@ -0,0 +1,135 @@
|
||||
[FileVersion]
|
||||
Version=7.0
|
||||
[Compiler]
|
||||
A=8
|
||||
B=0
|
||||
C=1
|
||||
D=1
|
||||
E=0
|
||||
F=0
|
||||
G=1
|
||||
H=1
|
||||
I=1
|
||||
J=0
|
||||
K=0
|
||||
L=1
|
||||
M=0
|
||||
N=1
|
||||
O=1
|
||||
P=1
|
||||
Q=0
|
||||
R=0
|
||||
S=0
|
||||
T=0
|
||||
U=0
|
||||
V=1
|
||||
W=0
|
||||
X=1
|
||||
Y=1
|
||||
Z=1
|
||||
ShowHints=1
|
||||
ShowWarnings=1
|
||||
UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
|
||||
NamespacePrefix=
|
||||
SymbolDeprecated=1
|
||||
SymbolLibrary=1
|
||||
SymbolPlatform=1
|
||||
UnitLibrary=1
|
||||
UnitPlatform=1
|
||||
UnitDeprecated=1
|
||||
HResultCompat=1
|
||||
HidingMember=1
|
||||
HiddenVirtual=1
|
||||
Garbage=1
|
||||
BoundsError=1
|
||||
ZeroNilCompat=1
|
||||
StringConstTruncated=1
|
||||
ForLoopVarVarPar=1
|
||||
TypedConstVarPar=1
|
||||
AsgToTypedConst=1
|
||||
CaseLabelRange=1
|
||||
ForVariable=1
|
||||
ConstructingAbstract=1
|
||||
ComparisonFalse=1
|
||||
ComparisonTrue=1
|
||||
ComparingSignedUnsigned=1
|
||||
CombiningSignedUnsigned=1
|
||||
UnsupportedConstruct=1
|
||||
FileOpen=1
|
||||
FileOpenUnitSrc=1
|
||||
BadGlobalSymbol=1
|
||||
DuplicateConstructorDestructor=1
|
||||
InvalidDirective=1
|
||||
PackageNoLink=1
|
||||
PackageThreadVar=1
|
||||
ImplicitImport=1
|
||||
HPPEMITIgnored=1
|
||||
NoRetVal=1
|
||||
UseBeforeDef=1
|
||||
ForLoopVarUndef=1
|
||||
UnitNameMismatch=1
|
||||
NoCFGFileFound=1
|
||||
MessageDirective=1
|
||||
ImplicitVariants=1
|
||||
UnicodeToLocale=1
|
||||
LocaleToUnicode=1
|
||||
ImagebaseMultiple=1
|
||||
SuspiciousTypecast=1
|
||||
PrivatePropAccessor=1
|
||||
UnsafeType=0
|
||||
UnsafeCode=0
|
||||
UnsafeCast=0
|
||||
[Linker]
|
||||
MapFile=0
|
||||
OutputObjs=0
|
||||
ConsoleApp=1
|
||||
DebugInfo=0
|
||||
RemoteSymbols=0
|
||||
MinStackSize=16384
|
||||
MaxStackSize=1048576
|
||||
ImageBase=4194304
|
||||
ExeDescription=
|
||||
[Directories]
|
||||
OutputDir=
|
||||
UnitOutputDir=
|
||||
PackageDLLOutputDir=
|
||||
PackageDCPOutputDir=
|
||||
SearchPath=
|
||||
Packages=vcl;rtl;vclx;indy;vclie;xmlrtl;inetdbbde;inet;inetdbxpress;dbrtl;soaprtl;dsnap;VclSmp;dbexpress;vcldb;dbxcds;inetdb;bdertl;vcldbx;adortl;teeui;teedb;tee;ibxpress;visualclx;visualdbclx;vclactnband;vclshlctrls;DDabLib
|
||||
Conditionals=
|
||||
DebugSourceDirs=
|
||||
UsePackages=0
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=
|
||||
Launcher=
|
||||
UseLauncher=0
|
||||
DebugCWD=
|
||||
[Language]
|
||||
ActiveLang=
|
||||
ProjectLang=
|
||||
RootDir=
|
||||
[Version Info]
|
||||
IncludeVerInfo=0
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=1033
|
||||
CodePage=1252
|
||||
[Version Info Keys]
|
||||
CompanyName=
|
||||
FileDescription=
|
||||
FileVersion=1.0.0.0
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=1.0.0.0
|
40
dd-verinfo/Demo/1/VIDemo.dpr
Normal file
40
dd-verinfo/Demo/1/VIDemo.dpr
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
* VIDemo.dpr
|
||||
*
|
||||
* Project file for Version Information Component VIDemo demo program.
|
||||
*
|
||||
* $Rev: 1118 $
|
||||
* $Date: 2013-01-14 00:19:04 +0000 (Mon, 14 Jan 2013) $
|
||||
*
|
||||
* Any copyright in this file is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
}
|
||||
|
||||
program VIDemo;
|
||||
|
||||
{$UNDEF Supports_RTLNameSpaces}
|
||||
{$IFDEF CONDITIONALEXPRESSIONS}
|
||||
{$IF CompilerVersion >= 15.0} // >= Delphi 7
|
||||
{$WARN UNSAFE_CODE OFF}
|
||||
{$IFEND}
|
||||
{$IF CompilerVersion >= 23.0} // Delphi XE2
|
||||
{$DEFINE Supports_RTLNameSpaces}
|
||||
{$IFEND}
|
||||
{$ENDIF}
|
||||
|
||||
uses
|
||||
{$IFDEF Supports_RTLNameSpaces}
|
||||
Vcl.Forms,
|
||||
{$ELSE}
|
||||
Forms,
|
||||
{$ENDIF}
|
||||
FmVIDemo in 'FmVIDemo.pas' {MainForm};
|
||||
|
||||
{$R *.RES}
|
||||
|
||||
begin
|
||||
Application.Initialize;
|
||||
Application.Title := 'Version Info Component Demo';
|
||||
Application.CreateForm(TMainForm, MainForm);
|
||||
Application.Run;
|
||||
end.
|
117
dd-verinfo/Demo/1/VIDemo.dproj
Normal file
117
dd-verinfo/Demo/1/VIDemo.dproj
Normal file
@@ -0,0 +1,117 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{C4D31A63-BCF8-439E-9127-BEF616691A4C}</ProjectGuid>
|
||||
<MainSource>VIDemo.dpr</MainSource>
|
||||
<Base>True</Base>
|
||||
<Config Condition="'$(Config)'==''">Base</Config>
|
||||
<TargetedPlatforms>1</TargetedPlatforms>
|
||||
<AppType>Application</AppType>
|
||||
<FrameworkType>VCL</FrameworkType>
|
||||
<ProjectVersion>14.4</ProjectVersion>
|
||||
<Platform Condition="'$(Platform)'==''">Win32</Platform>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
|
||||
<Base_Win32>true</Base_Win32>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
|
||||
<Base_Win64>true</Base_Win64>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base)'!=''">
|
||||
<DCC_F>false</DCC_F>
|
||||
<DCC_K>false</DCC_K>
|
||||
<DCC_E>false</DCC_E>
|
||||
<DCC_S>false</DCC_S>
|
||||
<DCC_N>false</DCC_N>
|
||||
<DCC_Namespace>Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace)</DCC_Namespace>
|
||||
<VerInfo_Locale>2057</VerInfo_Locale>
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=;CFBundleDisplayName=;CFBundleIdentifier=;CFBundleVersion=;CFBundlePackageType=;CFBundleSignature=;CFBundleAllowMixedLocalizations=;CFBundleExecutable=</VerInfo_Keys>
|
||||
<DCC_ImageBase>00400000</DCC_ImageBase>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win32)'!=''">
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||
<Icon_MainIcon>VIDemo_Icon.ico</Icon_MainIcon>
|
||||
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<DCC_Namespace>System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win64)'!=''">
|
||||
<Icon_MainIcon>VIDemo_Icon.ico</Icon_MainIcon>
|
||||
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<DelphiCompile Include="$(MainSource)">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="FmVIDemo.pas">
|
||||
<Form>MainForm</Form>
|
||||
</DCCReference>
|
||||
<BuildConfiguration Include="Base">
|
||||
<Key>Base</Key>
|
||||
</BuildConfiguration>
|
||||
</ItemGroup>
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
|
||||
<Borland.ProjectType/>
|
||||
<BorlandProject>
|
||||
<Delphi.Personality>
|
||||
<Source>
|
||||
<Source Name="MainSource">VIDemo.dpr</Source>
|
||||
</Source>
|
||||
<VersionInfo>
|
||||
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
|
||||
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
|
||||
<VersionInfo Name="MajorVer">1</VersionInfo>
|
||||
<VersionInfo Name="MinorVer">0</VersionInfo>
|
||||
<VersionInfo Name="Release">0</VersionInfo>
|
||||
<VersionInfo Name="Build">0</VersionInfo>
|
||||
<VersionInfo Name="Debug">False</VersionInfo>
|
||||
<VersionInfo Name="PreRelease">False</VersionInfo>
|
||||
<VersionInfo Name="Special">False</VersionInfo>
|
||||
<VersionInfo Name="Private">False</VersionInfo>
|
||||
<VersionInfo Name="DLL">False</VersionInfo>
|
||||
<VersionInfo Name="Locale">2057</VersionInfo>
|
||||
<VersionInfo Name="CodePage">1252</VersionInfo>
|
||||
</VersionInfo>
|
||||
<VersionInfoKeys>
|
||||
<VersionInfoKeys Name="CompanyName"/>
|
||||
<VersionInfoKeys Name="FileDescription"/>
|
||||
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="InternalName"/>
|
||||
<VersionInfoKeys Name="LegalCopyright"/>
|
||||
<VersionInfoKeys Name="LegalTrademarks"/>
|
||||
<VersionInfoKeys Name="OriginalFilename"/>
|
||||
<VersionInfoKeys Name="ProductName"/>
|
||||
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="Comments"/>
|
||||
<VersionInfoKeys Name="CFBundleName"/>
|
||||
<VersionInfoKeys Name="CFBundleDisplayName"/>
|
||||
<VersionInfoKeys Name="CFBundleIdentifier"/>
|
||||
<VersionInfoKeys Name="CFBundleVersion"/>
|
||||
<VersionInfoKeys Name="CFBundlePackageType"/>
|
||||
<VersionInfoKeys Name="CFBundleSignature"/>
|
||||
<VersionInfoKeys Name="CFBundleAllowMixedLocalizations"/>
|
||||
<VersionInfoKeys Name="CFBundleExecutable"/>
|
||||
</VersionInfoKeys>
|
||||
<Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k170.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDSBIN)\dclofficexp170.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||
<Excluded_Packages Name="D:\Software-Installs\Delphi XE3\RAD XE3 Bonus Pack\Mida Converter\MidaBasicDesign170.bpl">File D:\Software-Installs\Delphi XE3\RAD XE3 Bonus Pack\Mida Converter\MidaBasicDesign170.bpl not found</Excluded_Packages>
|
||||
</Excluded_Packages>
|
||||
</Delphi.Personality>
|
||||
<Platforms>
|
||||
<Platform value="Win32">True</Platform>
|
||||
<Platform value="Win64">False</Platform>
|
||||
</Platforms>
|
||||
</BorlandProject>
|
||||
<ProjectFileVersion>12</ProjectFileVersion>
|
||||
</ProjectExtensions>
|
||||
<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
|
||||
<Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
|
||||
</Project>
|
BIN
dd-verinfo/Demo/1/VIDemo_Icon.ico
Normal file
BIN
dd-verinfo/Demo/1/VIDemo_Icon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 766 B |
43
dd-verinfo/Demo/2/FmEg1.dfm
Normal file
43
dd-verinfo/Demo/2/FmEg1.dfm
Normal file
@@ -0,0 +1,43 @@
|
||||
object EgForm1: TEgForm1
|
||||
Left = 192
|
||||
Top = 107
|
||||
BorderStyle = bsDialog
|
||||
Caption = 'Example 1: Translation, char set & language'
|
||||
ClientHeight = 324
|
||||
ClientWidth = 599
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Arial'
|
||||
Font.Style = []
|
||||
OldCreateOrder = True
|
||||
Position = poScreenCenter
|
||||
Scaled = False
|
||||
OnCreate = FormCreate
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 15
|
||||
object ListBox1: TListBox
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 599
|
||||
Height = 277
|
||||
Align = alTop
|
||||
ItemHeight = 15
|
||||
TabOrder = 0
|
||||
end
|
||||
object Button3: TButton
|
||||
Left = 230
|
||||
Top = 284
|
||||
Width = 139
|
||||
Height = 31
|
||||
Hint = 'Help file must be installed'
|
||||
Caption = 'View Example'
|
||||
TabOrder = 1
|
||||
OnClick = Button3Click
|
||||
end
|
||||
object PJVersionInfo1: TPJVersionInfo
|
||||
Left = 8
|
||||
Top = 8
|
||||
end
|
||||
end
|
95
dd-verinfo/Demo/2/FmEg1.pas
Normal file
95
dd-verinfo/Demo/2/FmEg1.pas
Normal file
@@ -0,0 +1,95 @@
|
||||
{
|
||||
* FmEg1.pas
|
||||
*
|
||||
* Form unit that implements example 1 for the Version Information Component
|
||||
* HelpEgs demo program.
|
||||
*
|
||||
* $Rev: 1119 $
|
||||
* $Date: 2013-01-14 00:39:57 +0000 (Mon, 14 Jan 2013) $
|
||||
*
|
||||
* Any copyright in this file is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
}
|
||||
|
||||
unit FmEg1;
|
||||
|
||||
{$UNDEF Supports_RTLNameSpaces}
|
||||
{$IFDEF CONDITIONALEXPRESSIONS}
|
||||
{$IF CompilerVersion >= 15.0} // >= Delphi 7
|
||||
{$WARN UNSAFE_CODE OFF}
|
||||
{$IFEND}
|
||||
{$IF CompilerVersion >= 23.0} // Delphi XE2
|
||||
{$DEFINE Supports_RTLNameSpaces}
|
||||
{$IFEND}
|
||||
{$ENDIF}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
// Delphi
|
||||
{$IFDEF Supports_RTLNameSpaces}
|
||||
Vcl.Forms, System.Classes, Vcl.Controls, Vcl.StdCtrls,
|
||||
{$ELSE}
|
||||
Forms, Classes, Controls, StdCtrls,
|
||||
{$ENDIF}
|
||||
// DelphiDabbler component
|
||||
PJVersionInfo;
|
||||
|
||||
type
|
||||
TEgForm1 = class(TForm)
|
||||
PJVersionInfo1: TPJVersionInfo;
|
||||
ListBox1: TListBox;
|
||||
Button3: TButton;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure Button3Click(Sender: TObject);
|
||||
end;
|
||||
|
||||
var
|
||||
EgForm1: TEgForm1;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
// Delphi
|
||||
{$IFDEF Supports_RTLNameSpaces}
|
||||
System.SysUtils, Winapi.Windows, Winapi.ShellAPI;
|
||||
{$ELSE}
|
||||
SysUtils, Windows, ShellAPI;
|
||||
{$ENDIF}
|
||||
|
||||
{$R *.DFM}
|
||||
|
||||
procedure TEgForm1.FormCreate(Sender: TObject);
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
ListBox1.Clear;
|
||||
// loop thru all translations
|
||||
if PJVersionInfo1.HaveInfo then
|
||||
for I := 0 to Pred(PJVersionInfo1.NumTranslations) do
|
||||
begin
|
||||
// make the current translation current
|
||||
PJVersionInfo1.CurrentTranslation := I;
|
||||
// add language and char set info to the list box
|
||||
ListBox1.Items.Add(
|
||||
Format(
|
||||
'Language: %s (%0.4X) -- CharSet: %s (%0.4X)',
|
||||
[PJVersionInfo1.Language, PJVersionInfo1.LanguageCode,
|
||||
PJVersionInfo1.CharSet, PJVersionInfo1.CharSetCode]
|
||||
)
|
||||
);
|
||||
end
|
||||
else
|
||||
ListBox1.Items.Add('NO VERSION INFO');
|
||||
end;
|
||||
|
||||
procedure TEgForm1.Button3Click(Sender: TObject);
|
||||
// Displays example in help
|
||||
// this event handler is not included in help example
|
||||
const
|
||||
cURL = 'http://delphidabbler.com/url/verinfo-eg1';
|
||||
begin
|
||||
ShellExecute(Handle, 'open', cURL, nil, nil, SW_SHOWNORMAL);
|
||||
end;
|
||||
|
||||
end.
|
61
dd-verinfo/Demo/2/FmEg2.dfm
Normal file
61
dd-verinfo/Demo/2/FmEg2.dfm
Normal file
@@ -0,0 +1,61 @@
|
||||
object EgForm2: TEgForm2
|
||||
Left = 192
|
||||
Top = 107
|
||||
BorderStyle = bsDialog
|
||||
Caption = 'Example 2: String information properties'
|
||||
ClientHeight = 345
|
||||
ClientWidth = 449
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Arial'
|
||||
Font.Style = []
|
||||
OldCreateOrder = True
|
||||
Position = poScreenCenter
|
||||
Scaled = False
|
||||
OnShow = FormShow
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 15
|
||||
object Memo1: TMemo
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 449
|
||||
Height = 297
|
||||
Align = alTop
|
||||
ReadOnly = True
|
||||
TabOrder = 0
|
||||
end
|
||||
object Button1: TButton
|
||||
Left = 11
|
||||
Top = 305
|
||||
Width = 92
|
||||
Height = 31
|
||||
Caption = 'Method 1'
|
||||
TabOrder = 1
|
||||
OnClick = Button1Click
|
||||
end
|
||||
object Button2: TButton
|
||||
Left = 346
|
||||
Top = 305
|
||||
Width = 92
|
||||
Height = 31
|
||||
Caption = 'Method 2'
|
||||
TabOrder = 3
|
||||
OnClick = Button2Click
|
||||
end
|
||||
object Button3: TButton
|
||||
Left = 155
|
||||
Top = 305
|
||||
Width = 139
|
||||
Height = 31
|
||||
Hint = 'Help file must be installed'
|
||||
Caption = 'View Example'
|
||||
TabOrder = 2
|
||||
OnClick = Button3Click
|
||||
end
|
||||
object PJVersionInfo1: TPJVersionInfo
|
||||
Left = 8
|
||||
Top = 8
|
||||
end
|
||||
end
|
176
dd-verinfo/Demo/2/FmEg2.pas
Normal file
176
dd-verinfo/Demo/2/FmEg2.pas
Normal file
@@ -0,0 +1,176 @@
|
||||
{
|
||||
* FmEg2.pas
|
||||
*
|
||||
* Form unit that implements example 2 for the Version Information Component
|
||||
* HelpEgs demo program.
|
||||
*
|
||||
* $Rev: 1119 $
|
||||
* $Date: 2013-01-14 00:39:57 +0000 (Mon, 14 Jan 2013) $
|
||||
*
|
||||
* Any copyright in this file is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
}
|
||||
|
||||
unit FmEg2;
|
||||
|
||||
{$UNDEF Supports_RTLNameSpaces}
|
||||
{$IFDEF CONDITIONALEXPRESSIONS}
|
||||
{$IF CompilerVersion >= 15.0} // >= Delphi 7
|
||||
{$WARN UNSAFE_CODE OFF}
|
||||
{$IFEND}
|
||||
{$IF CompilerVersion >= 23.0} // Delphi XE2
|
||||
{$DEFINE Supports_RTLNameSpaces}
|
||||
{$IFEND}
|
||||
{$ENDIF}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
// Delphi
|
||||
{$IFDEF Supports_RTLNameSpaces}
|
||||
Vcl.Forms, System.Classes, Vcl.Controls, Vcl.StdCtrls,
|
||||
{$ELSE}
|
||||
Forms, Classes, Controls, StdCtrls,
|
||||
{$ENDIF}
|
||||
// DelphiDabbler
|
||||
PJVersionInfo;
|
||||
|
||||
type
|
||||
TEgForm2 = class(TForm)
|
||||
Memo1: TMemo;
|
||||
PJVersionInfo1: TPJVersionInfo;
|
||||
Button1: TButton;
|
||||
Button2: TButton;
|
||||
Button3: TButton;
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure Button3Click(Sender: TObject);
|
||||
end;
|
||||
|
||||
var
|
||||
EgForm2: TEgForm2;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
// Delphi
|
||||
{$IFDEF Supports_RTLNameSpaces}
|
||||
Vcl.Dialogs, System.SysUtils, Winapi.Windows, Winapi.ShellAPI;
|
||||
{$ELSE}
|
||||
Dialogs, SysUtils, Windows, ShellAPI;
|
||||
{$ENDIF}
|
||||
|
||||
{$R *.DFM}
|
||||
|
||||
function DirToPath(const Dir: string): string;
|
||||
// Ensures path end in '\'
|
||||
begin
|
||||
if (Dir <> '') and (Dir[Length(Dir)] <> '\') then
|
||||
Result := Dir + '\'
|
||||
else
|
||||
Result := Dir;
|
||||
end;
|
||||
|
||||
function WindowsDir: string;
|
||||
// Returns Windows directory
|
||||
begin
|
||||
SetLength(Result, MAX_PATH);
|
||||
SetLength(Result, GetWindowsDirectory(PChar(Result), MAX_PATH));
|
||||
end;
|
||||
|
||||
function SystemDir: string;
|
||||
// Returns Windows System directory
|
||||
begin
|
||||
SetLength(Result, MAX_PATH);
|
||||
SetLength(Result, GetSystemDirectory(PChar(Result), MAX_PATH));
|
||||
end;
|
||||
|
||||
function FindProg(const ExeName: string): string;
|
||||
// Finds program in Windows or System directory
|
||||
begin
|
||||
Result := DirToPath(WindowsDir) + ExeName;
|
||||
if FileExists(Result) then Exit;
|
||||
Result := DirToPath(SystemDir) + ExeName;
|
||||
if not FileExists(Result) then
|
||||
raise Exception.CreateFmt(
|
||||
'Can''t find %s in Windows or System folders', [ExeName]
|
||||
);
|
||||
end;
|
||||
|
||||
procedure TEgForm2.Button1Click(Sender: TObject);
|
||||
begin
|
||||
// Get version info for Calc.exe
|
||||
PJVersionInfo1.FileName := FindProg('Calc.exe');
|
||||
with Memo1.Lines do
|
||||
begin
|
||||
// Clear the memo and write narrative
|
||||
Clear;
|
||||
Add('String information block for Windows'
|
||||
+ ' Calculator (method 1)');
|
||||
Add('');
|
||||
// Add string information using dedicated properties
|
||||
Add('Comments: ' + PJVersionInfo1.Comments);
|
||||
Add('CompanyName: ' + PJVersionInfo1.CompanyName);
|
||||
Add('FileDescription: ' + PJVersionInfo1.FileDescription);
|
||||
Add('FileVersion: ' + PJVersionInfo1.FileVersion);
|
||||
Add('InternalName: ' + PJVersionInfo1.InternalName);
|
||||
Add('LegalCopyright: ' + PJVersionInfo1.LegalCopyright);
|
||||
Add('LegalTrademarks: ' + PJVersionInfo1.LegalTrademarks);
|
||||
Add('OriginalFileName: ' + PJVersionInfo1.OriginalFileName);
|
||||
Add('PrivateBuild: ' + PJVersionInfo1.PrivateBuild);
|
||||
Add('ProductName: ' + PJVersionInfo1.ProductName);
|
||||
Add('ProductVersion: ' + PJVersionInfo1.ProductVersion);
|
||||
Add('SpecialBuild: ' + PJVersionInfo1.SpecialBuild);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TEgForm2.Button2Click(Sender: TObject);
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
procedure AddStrInfo(StrName: string);
|
||||
// Add string info to memo by name
|
||||
begin
|
||||
Memo1.Lines.Add(StrName + ': ' + PJVersionInfo1.StringFileInfo[StrName]);
|
||||
end;
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
begin
|
||||
// Get string info for Notepad.exe
|
||||
PJVersionInfo1.FileName := FindProg('Notepad.exe');
|
||||
// Clear memo and write narrative
|
||||
Memo1.Clear;
|
||||
Memo1.Lines.Add('String information block for Windows'
|
||||
+ ' NotePad (method 2)');
|
||||
Memo1.Lines.Add('');
|
||||
// Add string info using string info names
|
||||
AddStrInfo('Comments');
|
||||
AddStrInfo('CompanyName');
|
||||
AddStrInfo('FileDescription');
|
||||
AddStrInfo('FileVersion');
|
||||
AddStrInfo('InternalName');
|
||||
AddStrInfo('LegalCopyright');
|
||||
AddStrInfo('LegalTrademarks');
|
||||
AddStrInfo('OriginalFileName');
|
||||
AddStrInfo('PrivateBuild');
|
||||
AddStrInfo('ProductName');
|
||||
AddStrInfo('ProductVersion');
|
||||
AddStrInfo('SpecialBuild');
|
||||
end;
|
||||
|
||||
procedure TEgForm2.FormShow(Sender: TObject);
|
||||
// Clears memo when form is displayed
|
||||
begin
|
||||
Memo1.Clear;
|
||||
end;
|
||||
|
||||
procedure TEgForm2.Button3Click(Sender: TObject);
|
||||
// Displays example in help
|
||||
// this event handler is not included in help example
|
||||
const
|
||||
cURL = 'http://delphidabbler.com/url/verinfo-eg2';
|
||||
begin
|
||||
ShellExecute(Handle, 'open', cURL, nil, nil, SW_SHOWNORMAL);
|
||||
end;
|
||||
|
||||
end.
|
44
dd-verinfo/Demo/2/FmEg3.dfm
Normal file
44
dd-verinfo/Demo/2/FmEg3.dfm
Normal file
@@ -0,0 +1,44 @@
|
||||
object EgForm3: TEgForm3
|
||||
Left = 192
|
||||
Top = 108
|
||||
BorderStyle = bsDialog
|
||||
Caption = 'Example 3: Fixed file information properties'
|
||||
ClientHeight = 401
|
||||
ClientWidth = 519
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Arial'
|
||||
Font.Style = []
|
||||
OldCreateOrder = True
|
||||
Position = poScreenCenter
|
||||
Scaled = False
|
||||
OnCreate = FormCreate
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 15
|
||||
object Memo1: TMemo
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 519
|
||||
Height = 356
|
||||
Align = alTop
|
||||
ReadOnly = True
|
||||
ScrollBars = ssVertical
|
||||
TabOrder = 0
|
||||
end
|
||||
object Button3: TButton
|
||||
Left = 190
|
||||
Top = 363
|
||||
Width = 139
|
||||
Height = 31
|
||||
Hint = 'Help file must be installed'
|
||||
Caption = 'View Example'
|
||||
TabOrder = 1
|
||||
OnClick = Button3Click
|
||||
end
|
||||
object PJVersionInfo1: TPJVersionInfo
|
||||
Left = 8
|
||||
Top = 8
|
||||
end
|
||||
end
|
199
dd-verinfo/Demo/2/FmEg3.pas
Normal file
199
dd-verinfo/Demo/2/FmEg3.pas
Normal file
@@ -0,0 +1,199 @@
|
||||
{
|
||||
* FmEg3.pas
|
||||
*
|
||||
* Form unit that implements example 3 for the Version Information Component
|
||||
* HelpEgs demo program.
|
||||
*
|
||||
* $Rev: 1119 $
|
||||
* $Date: 2013-01-14 00:39:57 +0000 (Mon, 14 Jan 2013) $
|
||||
*
|
||||
* Any copyright in this file is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
}
|
||||
|
||||
unit FmEg3;
|
||||
|
||||
{$UNDEF Supports_RTLNameSpaces}
|
||||
{$IFDEF CONDITIONALEXPRESSIONS}
|
||||
{$IF CompilerVersion >= 15.0} // >= Delphi 7
|
||||
{$WARN UNSAFE_CODE OFF}
|
||||
{$IFEND}
|
||||
{$IF CompilerVersion >= 23.0} // Delphi XE2
|
||||
{$DEFINE Supports_RTLNameSpaces}
|
||||
{$IFEND}
|
||||
{$ENDIF}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
// Delphi
|
||||
{$IFDEF Supports_RTLNameSpaces}
|
||||
Vcl.Forms, System.Classes, Vcl.Controls, Vcl.StdCtrls,
|
||||
{$ELSE}
|
||||
Forms, Classes, Controls, StdCtrls,
|
||||
{$ENDIF}
|
||||
// DelphiDabbler component
|
||||
PJVersionInfo;
|
||||
|
||||
|
||||
type
|
||||
TEgForm3 = class(TForm)
|
||||
Memo1: TMemo;
|
||||
PJVersionInfo1: TPJVersionInfo;
|
||||
Button3: TButton;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure Button3Click(Sender: TObject);
|
||||
end;
|
||||
|
||||
var
|
||||
EgForm3: TEgForm3;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
// Delphi
|
||||
{$IFDEF Supports_RTLNameSpaces}
|
||||
System.SysUtils, Winapi.Windows, Winapi.ShellAPI;
|
||||
{$ELSE}
|
||||
SysUtils, Windows, ShellAPI;
|
||||
{$ENDIF}
|
||||
|
||||
{$R *.DFM}
|
||||
|
||||
type
|
||||
TTableEntry = record
|
||||
Code: DWORD;
|
||||
Desc: string;
|
||||
end;
|
||||
|
||||
const
|
||||
cFileType: array[0..6] of TTableEntry =
|
||||
(
|
||||
(Code: VFT_APP; Desc: 'Application'),
|
||||
(Code: VFT_DLL; Desc: 'DLL'),
|
||||
(Code: VFT_DRV; Desc: 'Device driver'),
|
||||
(Code: VFT_FONT; Desc: 'Font'),
|
||||
(Code: VFT_STATIC_LIB; Desc: 'Static link library'),
|
||||
(Code: VFT_VXD; Desc: 'Virtual device driver'),
|
||||
(Code: VFT_UNKNOWN; Desc: 'Unknown')
|
||||
);
|
||||
|
||||
cFileOSBase: array[0..4] of TTableEntry =
|
||||
(
|
||||
( Code: VOS_NT; Desc: 'Windows NT' ),
|
||||
( Code: VOS_DOS; Desc: 'MS-DOS' ),
|
||||
( Code: VOS_OS232; Desc: 'OS2 32 bit' ),
|
||||
( Code: VOS_OS216; Desc: 'OS2 16 bit' ),
|
||||
( Code: VOS_UNKNOWN; Desc: 'Any' )
|
||||
);
|
||||
|
||||
cFileOSTarget: array[0..4] of TTableEntry =
|
||||
(
|
||||
( Code: VOS__WINDOWS32; Desc: '32 bit Windows' ),
|
||||
( Code: VOS__WINDOWS16; Desc: 'Windows 3.x' ),
|
||||
( Code: VOS__PM32; Desc: 'Presentation Manager 32' ),
|
||||
( Code: VOS__PM16; Desc: 'Presentation Manager 16' ),
|
||||
( Code: VOS__BASE; Desc: 'Unknown' )
|
||||
);
|
||||
|
||||
function CodeToDesc(Code: DWORD; Table: array of TTableEntry): string;
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
Result := '';
|
||||
for I := Low(Table) to High(Table) do
|
||||
if Table[I].Code = Code then
|
||||
begin
|
||||
Result := Table[I].Desc;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
|
||||
function FileOSDesc(const OS: DWORD): string;
|
||||
// describe OS
|
||||
var
|
||||
Target, Base: DWORD;
|
||||
begin
|
||||
// get target and base OS
|
||||
Target := OS and $0000FFFF;
|
||||
Base := OS and $FFFF0000;
|
||||
// build description
|
||||
if Base = VOS_UNKNOWN then
|
||||
Result := CodeToDesc(Target, cFileOSTarget)
|
||||
else if Target = VOS__BASE then
|
||||
Result := CodeToDesc(Base, cFileOSBase)
|
||||
else
|
||||
Result := Format('%s on %s',
|
||||
[CodeToDesc(Target, cFileOSTarget),
|
||||
CodeToDesc(Base, cFileOSBase)]);
|
||||
end;
|
||||
|
||||
function FileFlagsToStr(const Flags: DWORD): string;
|
||||
// build string of file flags
|
||||
const
|
||||
cFileFlags: array[0..5] of TTableEntry =
|
||||
(
|
||||
(Code: VS_FF_DEBUG; Desc: 'Debug'),
|
||||
(Code: VS_FF_PRERELEASE; Desc: 'Pre-release'),
|
||||
(Code: VS_FF_PATCHED; Desc: 'Patched'),
|
||||
(Code: VS_FF_PRIVATEBUILD; Desc: 'Private build'),
|
||||
(Code: VS_FF_INFOINFERRED; Desc: 'Inferred'),
|
||||
(Code: VS_FF_SPECIALBUILD; Desc: 'Special build') );
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
Result := '';
|
||||
for I := Low(cFileFlags) to High(cFileFlags) do
|
||||
if Flags and cFileFlags[I].Code = cFileFlags[I].Code then
|
||||
Result := Result + #13#10' ' + cFileFlags[I].Desc
|
||||
end;
|
||||
|
||||
function VerToStr(Ver: TPJVersionNumber): string;
|
||||
// return ver number as string
|
||||
begin
|
||||
Result := Format('%d.%d.%d.%d', [Ver.V1, Ver.V2, Ver.V3, Ver.V4]);
|
||||
end;
|
||||
|
||||
procedure TEgForm3.FormCreate(Sender: TObject);
|
||||
begin
|
||||
// clear memo
|
||||
Memo1.Lines.Clear;
|
||||
// check if we have version info
|
||||
if PJVersionInfo1.HaveInfo then
|
||||
// we have version info: display fixed file info
|
||||
with Memo1.Lines do
|
||||
begin
|
||||
Clear;
|
||||
Add('File Version:'#13#10' '
|
||||
+ VerToStr(PJVersionInfo1.FileVersionNumber));
|
||||
Add('Product Version:'#13#10' '
|
||||
+ VerToStr(PJVersionInfo1.ProductVersionNumber));
|
||||
Add('File Flags Mask: '
|
||||
+ FileFlagsToStr(PJVersionInfo1.FileFlagsMask));
|
||||
Add('File Flags: '
|
||||
+ FileFlagsToStr(PJVersionInfo1.FileFlags));
|
||||
Add('File Type:'#13#10' '
|
||||
+ CodeToDesc(PJVersionInfo1.FileType, cFileType));
|
||||
Add('File sub type:');
|
||||
case PJVersionInfo1.FileType of
|
||||
VFT_FONT, VFT_DRV, VFT_VXD:
|
||||
Add(Format(' %0.8X', [PJVersionInfo1.FileSubType]));
|
||||
else Add(' None');
|
||||
end;
|
||||
Add('File OS:'#13#10' '
|
||||
+ FileOSDesc(PJVersionInfo1.FileOS));
|
||||
end
|
||||
else
|
||||
Memo1.Lines.Add('NO VERSION INFO');
|
||||
end;
|
||||
|
||||
procedure TEgForm3.Button3Click(Sender: TObject);
|
||||
// Displays example in help
|
||||
// this event handler is not included in help example
|
||||
const
|
||||
cURL = 'http://delphidabbler.com/url/verinfo-eg3';
|
||||
begin
|
||||
ShellExecute(Handle, 'open', cURL, nil, nil, SW_SHOWNORMAL);
|
||||
end;
|
||||
|
||||
end.
|
44
dd-verinfo/Demo/2/FmEg4.dfm
Normal file
44
dd-verinfo/Demo/2/FmEg4.dfm
Normal file
@@ -0,0 +1,44 @@
|
||||
object EgForm4: TEgForm4
|
||||
Left = 192
|
||||
Top = 108
|
||||
BorderStyle = bsDialog
|
||||
Caption = 'Example 4: FixedFileInfo property'
|
||||
ClientHeight = 409
|
||||
ClientWidth = 519
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Arial'
|
||||
Font.Style = []
|
||||
OldCreateOrder = True
|
||||
Position = poScreenCenter
|
||||
Scaled = False
|
||||
OnCreate = FormCreate
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 15
|
||||
object Memo1: TMemo
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 519
|
||||
Height = 366
|
||||
Align = alTop
|
||||
ReadOnly = True
|
||||
ScrollBars = ssVertical
|
||||
TabOrder = 0
|
||||
end
|
||||
object Button3: TButton
|
||||
Left = 190
|
||||
Top = 372
|
||||
Width = 139
|
||||
Height = 31
|
||||
Hint = 'Help file must be installed'
|
||||
Caption = 'View Example'
|
||||
TabOrder = 1
|
||||
OnClick = Button3Click
|
||||
end
|
||||
object PJVersionInfo1: TPJVersionInfo
|
||||
Left = 8
|
||||
Top = 8
|
||||
end
|
||||
end
|
204
dd-verinfo/Demo/2/FmEg4.pas
Normal file
204
dd-verinfo/Demo/2/FmEg4.pas
Normal file
@@ -0,0 +1,204 @@
|
||||
{
|
||||
* FmEg4.pas
|
||||
*
|
||||
* Form unit that implements example 4 for the Version Information Component
|
||||
* HelpEgs demo program.
|
||||
*
|
||||
* $Rev: 1119 $
|
||||
* $Date: 2013-01-14 00:39:57 +0000 (Mon, 14 Jan 2013) $
|
||||
*
|
||||
* Any copyright in this file is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
}
|
||||
|
||||
unit FmEg4;
|
||||
|
||||
{$UNDEF Supports_RTLNameSpaces}
|
||||
{$IFDEF CONDITIONALEXPRESSIONS}
|
||||
{$IF CompilerVersion >= 15.0} // >= Delphi 7
|
||||
{$WARN UNSAFE_CODE OFF}
|
||||
{$IFEND}
|
||||
{$IF CompilerVersion >= 23.0} // Delphi XE2
|
||||
{$DEFINE Supports_RTLNameSpaces}
|
||||
{$IFEND}
|
||||
{$ENDIF}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
// Delphi
|
||||
{$IFDEF Supports_RTLNameSpaces}
|
||||
Vcl.Forms, System.Classes, Vcl.Controls, Vcl.StdCtrls,
|
||||
{$ELSE}
|
||||
Forms, Classes, Controls, StdCtrls,
|
||||
{$ENDIF}
|
||||
// DelphiDabbler component
|
||||
PJVersionInfo;
|
||||
|
||||
type
|
||||
TEgForm4 = class(TForm)
|
||||
Memo1: TMemo;
|
||||
PJVersionInfo1: TPJVersionInfo;
|
||||
Button3: TButton;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure Button3Click(Sender: TObject);
|
||||
end;
|
||||
|
||||
var
|
||||
EgForm4: TEgForm4;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
// Delphi
|
||||
{$IFDEF Supports_RTLNameSpaces}
|
||||
Winapi.Windows, System.SysUtils, Winapi.ShellAPI;
|
||||
{$ELSE}
|
||||
Windows, SysUtils, ShellAPI;
|
||||
{$ENDIF}
|
||||
|
||||
{$R *.DFM}
|
||||
|
||||
type
|
||||
TTableEntry = record
|
||||
Code: DWORD;
|
||||
Desc: string;
|
||||
end;
|
||||
|
||||
const
|
||||
cFileType: array[0..6] of TTableEntry =
|
||||
(
|
||||
(Code: VFT_APP; Desc: 'Application'),
|
||||
(Code: VFT_DLL; Desc: 'DLL'),
|
||||
(Code: VFT_DRV; Desc: 'Device driver'),
|
||||
(Code: VFT_FONT; Desc: 'Font'),
|
||||
(Code: VFT_STATIC_LIB; Desc: 'Static link library'),
|
||||
(Code: VFT_VXD; Desc: 'Virtual device driver'),
|
||||
(Code: VFT_UNKNOWN; Desc: 'Unknown')
|
||||
);
|
||||
|
||||
cFileOSBase: array[0..4] of TTableEntry =
|
||||
(
|
||||
( Code: VOS_NT; Desc: 'Windows NT' ),
|
||||
( Code: VOS_DOS; Desc: 'MS-DOS' ),
|
||||
( Code: VOS_OS232; Desc: 'OS2 32 bit' ),
|
||||
( Code: VOS_OS216; Desc: 'OS2 16 bit' ),
|
||||
( Code: VOS_UNKNOWN; Desc: 'Any' )
|
||||
);
|
||||
|
||||
cFileOSTarget: array[0..4] of TTableEntry =
|
||||
(
|
||||
( Code: VOS__WINDOWS32; Desc: '32 bit Windows' ),
|
||||
( Code: VOS__WINDOWS16; Desc: 'Windows 3.x' ),
|
||||
( Code: VOS__PM32; Desc: 'Presentation Manager 32' ),
|
||||
( Code: VOS__PM16; Desc: 'Presentation Manager 16' ),
|
||||
( Code: VOS__BASE; Desc: 'Unknown' )
|
||||
);
|
||||
|
||||
function CodeToDesc(Code: DWORD; Table: array of TTableEntry): string;
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
Result := '';
|
||||
for I := Low(Table) to High(Table) do
|
||||
if Table[I].Code = Code then
|
||||
begin
|
||||
Result := Table[I].Desc;
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
|
||||
function FileOSDesc(const OS: DWORD): string;
|
||||
// describe OS
|
||||
var
|
||||
Target, Base: DWORD;
|
||||
begin
|
||||
// get target and base OS
|
||||
Target := OS and $0000FFFF;
|
||||
Base := OS and $FFFF0000;
|
||||
// build description
|
||||
if Base = VOS_UNKNOWN then
|
||||
Result := CodeToDesc(Target, cFileOSTarget)
|
||||
else if Target = VOS__BASE then
|
||||
Result := CodeToDesc(Base, cFileOSBase)
|
||||
else
|
||||
Result := Format('%s on %s',
|
||||
[CodeToDesc(Target, cFileOSTarget),
|
||||
CodeToDesc(Base, cFileOSBase)]);
|
||||
end;
|
||||
|
||||
function FileFlagsToStr(const Flags: DWORD): string;
|
||||
// build string of file flags
|
||||
const
|
||||
cFileFlags: array[0..5] of TTableEntry =
|
||||
(
|
||||
(Code: VS_FF_DEBUG; Desc: 'Debug'),
|
||||
(Code: VS_FF_PRERELEASE; Desc: 'Pre-release'),
|
||||
(Code: VS_FF_PATCHED; Desc: 'Patched'),
|
||||
(Code: VS_FF_PRIVATEBUILD; Desc: 'Private build'),
|
||||
(Code: VS_FF_INFOINFERRED; Desc: 'Inferred'),
|
||||
(Code: VS_FF_SPECIALBUILD; Desc: 'Special build') );
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
Result := '';
|
||||
for I := Low(cFileFlags) to High(cFileFlags) do
|
||||
if Flags and cFileFlags[I].Code = cFileFlags[I].Code then
|
||||
Result := Result + #13#10' ' + cFileFlags[I].Desc
|
||||
end;
|
||||
|
||||
function VerToStr(MS, LS: DWORD): string;
|
||||
// return ver number as string
|
||||
begin
|
||||
Result := Format('%d.%d.%d.%d',
|
||||
[HiWord(MS), LoWord(MS), HiWord(LS), LoWord(LS)]);
|
||||
end;
|
||||
|
||||
procedure TEgForm4.FormCreate(Sender: TObject);
|
||||
var
|
||||
FFI: TVSFixedFileInfo;
|
||||
begin
|
||||
// clear memo
|
||||
Memo1.Lines.Clear;
|
||||
// check if we have version info
|
||||
if PJVersionInfo1.HaveInfo then
|
||||
begin
|
||||
// we have version info: display fixed file info
|
||||
FFI := PJVersionInfo1.FixedFileInfo;
|
||||
with Memo1.Lines do
|
||||
begin
|
||||
Clear;
|
||||
Add('File Version:'#13#10' '
|
||||
+ VerToStr(FFI.dwFileVersionMS, FFI.dwFileVersionLS));
|
||||
Add('Product Version:'#13#10' '
|
||||
+ VerToStr(FFI.dwProductVersionMS, FFI.dwProductVersionLS));
|
||||
Add('File Flags Mask: '
|
||||
+ FileFlagsToStr(FFI.dwFileFlagsMask));
|
||||
Add('File Flags: '
|
||||
+ FileFlagsToStr(FFI.dwFileFlags));
|
||||
Add('File Type:'#13#10' '
|
||||
+ CodeToDesc(FFI.dwFileType, cFileType));
|
||||
Add('File sub type:');
|
||||
case FFI.dwFileType of
|
||||
VFT_FONT, VFT_DRV, VFT_VXD:
|
||||
Add(Format(' %0.8X', [FFI.dwFileSubType]));
|
||||
else Add(' None');
|
||||
end;
|
||||
Add('File OS:'#13#10' '
|
||||
+ FileOSDesc(FFI.dwFileOS));
|
||||
end
|
||||
end
|
||||
else
|
||||
Memo1.Lines.Add('NO VERSION INFO');
|
||||
end;
|
||||
|
||||
procedure TEgForm4.Button3Click(Sender: TObject);
|
||||
// Displays example in help
|
||||
// this event handler is not included in help example
|
||||
const
|
||||
cURL = 'http://delphidabbler.com/url/verinfo-eg4';
|
||||
begin
|
||||
ShellExecute(Handle, 'open', cURL, nil, nil, SW_SHOWNORMAL);
|
||||
end;
|
||||
|
||||
end.
|
63
dd-verinfo/Demo/2/FmMain.dfm
Normal file
63
dd-verinfo/Demo/2/FmMain.dfm
Normal file
@@ -0,0 +1,63 @@
|
||||
object MainForm: TMainForm
|
||||
Left = 293
|
||||
Top = 113
|
||||
BorderStyle = bsDialog
|
||||
ClientHeight = 194
|
||||
ClientWidth = 297
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -12
|
||||
Font.Name = 'Arial'
|
||||
Font.Style = []
|
||||
OldCreateOrder = True
|
||||
Position = poScreenCenter
|
||||
Scaled = False
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 15
|
||||
object lblDesc: TLabel
|
||||
Left = 10
|
||||
Top = 10
|
||||
Width = 261
|
||||
Height = 15
|
||||
Caption = 'Click the button to display the required example.'
|
||||
end
|
||||
object btnEg1: TButton
|
||||
Left = 10
|
||||
Top = 39
|
||||
Width = 277
|
||||
Height = 31
|
||||
Caption = 'Example 1: Translation, char set && language'
|
||||
TabOrder = 0
|
||||
OnClick = btnEg1Click
|
||||
end
|
||||
object btnEg2: TButton
|
||||
Left = 10
|
||||
Top = 79
|
||||
Width = 277
|
||||
Height = 31
|
||||
Caption = 'Example 2: String information properties'
|
||||
TabOrder = 1
|
||||
OnClick = btnEg2Click
|
||||
end
|
||||
object btnEg3: TButton
|
||||
Left = 10
|
||||
Top = 118
|
||||
Width = 277
|
||||
Height = 31
|
||||
Caption = 'Example 3: Fixed file information properties'
|
||||
TabOrder = 2
|
||||
OnClick = btnEg3Click
|
||||
end
|
||||
object btnEg4: TButton
|
||||
Left = 10
|
||||
Top = 158
|
||||
Width = 277
|
||||
Height = 30
|
||||
Caption = 'Example 4: FixedFileInfo property'
|
||||
TabOrder = 3
|
||||
OnClick = btnEg4Click
|
||||
end
|
||||
end
|
101
dd-verinfo/Demo/2/FmMain.pas
Normal file
101
dd-verinfo/Demo/2/FmMain.pas
Normal file
@@ -0,0 +1,101 @@
|
||||
{
|
||||
* FmMain.pas
|
||||
*
|
||||
* Main form for Version Information Component HelpEgs demo program.
|
||||
*
|
||||
* $Rev: 1123 $
|
||||
* $Date: 2013-01-14 01:26:28 +0000 (Mon, 14 Jan 2013) $
|
||||
*
|
||||
* Any copyright in this file is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
}
|
||||
|
||||
unit FmMain;
|
||||
|
||||
{$UNDEF Supports_RTLNameSpaces}
|
||||
{$IFDEF CONDITIONALEXPRESSIONS}
|
||||
{$IF CompilerVersion >= 15.0} // >= Delphi 7
|
||||
{$WARN UNSAFE_CODE OFF}
|
||||
{$IFEND}
|
||||
{$IF CompilerVersion >= 23.0} // Delphi XE2
|
||||
{$DEFINE Supports_RTLNameSpaces}
|
||||
{$IFEND}
|
||||
{$ENDIF}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
// Delphi
|
||||
{$IFNDEF Supports_RTLNameSpaces}
|
||||
Forms, Classes, Controls, StdCtrls;
|
||||
{$ELSE}
|
||||
Vcl.Forms, System.Classes, Vcl.Controls, Vcl.StdCtrls;
|
||||
{$ENDIF}
|
||||
|
||||
type
|
||||
TMainForm = class(TForm)
|
||||
btnEg1: TButton;
|
||||
btnEg2: TButton;
|
||||
btnEg3: TButton;
|
||||
btnEg4: TButton;
|
||||
lblDesc: TLabel;
|
||||
procedure btnEg1Click(Sender: TObject);
|
||||
procedure btnEg2Click(Sender: TObject);
|
||||
procedure btnEg3Click(Sender: TObject);
|
||||
procedure btnEg4Click(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
end;
|
||||
|
||||
var
|
||||
MainForm: TMainForm;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
// Delphi
|
||||
{$IFDEF Supports_RTLNameSpaces}
|
||||
Winapi.Windows,
|
||||
{$ELSE}
|
||||
Windows,
|
||||
{$ENDIF}
|
||||
// Project
|
||||
FmEg1, FmEg2, FmEg3, FmEg4;
|
||||
|
||||
{$R *.DFM}
|
||||
|
||||
procedure TMainForm.btnEg1Click(Sender: TObject);
|
||||
// Display example 1 dialog box
|
||||
begin
|
||||
EgForm1.ShowModal;
|
||||
end;
|
||||
|
||||
procedure TMainForm.btnEg2Click(Sender: TObject);
|
||||
// Display example 2 dialog box
|
||||
begin
|
||||
EgForm2.ShowModal;
|
||||
end;
|
||||
|
||||
procedure TMainForm.btnEg3Click(Sender: TObject);
|
||||
// Display example 3 dialog box
|
||||
begin
|
||||
EgForm3.ShowModal;
|
||||
end;
|
||||
|
||||
procedure TMainForm.btnEg4Click(Sender: TObject);
|
||||
// Display example 4 dialog box
|
||||
begin
|
||||
EgForm4.ShowModal;
|
||||
end;
|
||||
|
||||
procedure TMainForm.FormCreate(Sender: TObject);
|
||||
begin
|
||||
Caption := Application.Title;
|
||||
end;
|
||||
|
||||
procedure TMainForm.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
WinHelp(Handle, 'PJVersionInfo.hlp', HELP_QUIT, 0);
|
||||
end;
|
||||
|
||||
end.
|
170
dd-verinfo/Demo/2/HelpEgs.bdsproj
Normal file
170
dd-verinfo/Demo/2/HelpEgs.bdsproj
Normal file
@@ -0,0 +1,170 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<BorlandProject>
|
||||
<PersonalityInfo>
|
||||
<Option>
|
||||
<Option Name="Personality">Delphi.Personality</Option>
|
||||
<Option Name="ProjectType">VCLApplication</Option>
|
||||
<Option Name="Version">1.0</Option>
|
||||
<Option Name="GUID">{34FEC23F-116A-4111-9A4D-3405A020461D}</Option>
|
||||
</Option>
|
||||
</PersonalityInfo>
|
||||
<Delphi.Personality>
|
||||
<Source>
|
||||
<Source Name="MainSource">HelpEgs.dpr</Source>
|
||||
</Source>
|
||||
<FileVersion>
|
||||
<FileVersion Name="Version">7.0</FileVersion>
|
||||
</FileVersion>
|
||||
<Compiler>
|
||||
<Compiler Name="A">8</Compiler>
|
||||
<Compiler Name="B">0</Compiler>
|
||||
<Compiler Name="C">1</Compiler>
|
||||
<Compiler Name="D">1</Compiler>
|
||||
<Compiler Name="E">0</Compiler>
|
||||
<Compiler Name="F">0</Compiler>
|
||||
<Compiler Name="G">1</Compiler>
|
||||
<Compiler Name="H">1</Compiler>
|
||||
<Compiler Name="I">1</Compiler>
|
||||
<Compiler Name="J">0</Compiler>
|
||||
<Compiler Name="K">0</Compiler>
|
||||
<Compiler Name="L">1</Compiler>
|
||||
<Compiler Name="M">0</Compiler>
|
||||
<Compiler Name="N">1</Compiler>
|
||||
<Compiler Name="O">1</Compiler>
|
||||
<Compiler Name="P">1</Compiler>
|
||||
<Compiler Name="Q">0</Compiler>
|
||||
<Compiler Name="R">0</Compiler>
|
||||
<Compiler Name="S">0</Compiler>
|
||||
<Compiler Name="T">0</Compiler>
|
||||
<Compiler Name="U">0</Compiler>
|
||||
<Compiler Name="V">1</Compiler>
|
||||
<Compiler Name="W">0</Compiler>
|
||||
<Compiler Name="X">1</Compiler>
|
||||
<Compiler Name="Y">1</Compiler>
|
||||
<Compiler Name="Z">1</Compiler>
|
||||
<Compiler Name="ShowHints">True</Compiler>
|
||||
<Compiler Name="ShowWarnings">True</Compiler>
|
||||
<Compiler Name="UnitAliases"></Compiler>
|
||||
<Compiler Name="NamespacePrefix"></Compiler>
|
||||
<Compiler Name="GenerateDocumentation">False</Compiler>
|
||||
<Compiler Name="DefaultNamespace"></Compiler>
|
||||
<Compiler Name="SymbolDeprecated">True</Compiler>
|
||||
<Compiler Name="SymbolLibrary">True</Compiler>
|
||||
<Compiler Name="SymbolPlatform">True</Compiler>
|
||||
<Compiler Name="SymbolExperimental">True</Compiler>
|
||||
<Compiler Name="UnitLibrary">True</Compiler>
|
||||
<Compiler Name="UnitPlatform">True</Compiler>
|
||||
<Compiler Name="UnitDeprecated">True</Compiler>
|
||||
<Compiler Name="UnitExperimental">True</Compiler>
|
||||
<Compiler Name="HResultCompat">True</Compiler>
|
||||
<Compiler Name="HidingMember">True</Compiler>
|
||||
<Compiler Name="HiddenVirtual">True</Compiler>
|
||||
<Compiler Name="Garbage">True</Compiler>
|
||||
<Compiler Name="BoundsError">True</Compiler>
|
||||
<Compiler Name="ZeroNilCompat">True</Compiler>
|
||||
<Compiler Name="StringConstTruncated">True</Compiler>
|
||||
<Compiler Name="ForLoopVarVarPar">True</Compiler>
|
||||
<Compiler Name="TypedConstVarPar">True</Compiler>
|
||||
<Compiler Name="AsgToTypedConst">True</Compiler>
|
||||
<Compiler Name="CaseLabelRange">True</Compiler>
|
||||
<Compiler Name="ForVariable">True</Compiler>
|
||||
<Compiler Name="ConstructingAbstract">True</Compiler>
|
||||
<Compiler Name="ComparisonFalse">True</Compiler>
|
||||
<Compiler Name="ComparisonTrue">True</Compiler>
|
||||
<Compiler Name="ComparingSignedUnsigned">True</Compiler>
|
||||
<Compiler Name="CombiningSignedUnsigned">True</Compiler>
|
||||
<Compiler Name="UnsupportedConstruct">True</Compiler>
|
||||
<Compiler Name="FileOpen">True</Compiler>
|
||||
<Compiler Name="FileOpenUnitSrc">True</Compiler>
|
||||
<Compiler Name="BadGlobalSymbol">True</Compiler>
|
||||
<Compiler Name="DuplicateConstructorDestructor">True</Compiler>
|
||||
<Compiler Name="InvalidDirective">True</Compiler>
|
||||
<Compiler Name="PackageNoLink">True</Compiler>
|
||||
<Compiler Name="PackageThreadVar">True</Compiler>
|
||||
<Compiler Name="ImplicitImport">True</Compiler>
|
||||
<Compiler Name="HPPEMITIgnored">True</Compiler>
|
||||
<Compiler Name="NoRetVal">True</Compiler>
|
||||
<Compiler Name="UseBeforeDef">True</Compiler>
|
||||
<Compiler Name="ForLoopVarUndef">True</Compiler>
|
||||
<Compiler Name="UnitNameMismatch">True</Compiler>
|
||||
<Compiler Name="NoCFGFileFound">True</Compiler>
|
||||
<Compiler Name="ImplicitVariants">True</Compiler>
|
||||
<Compiler Name="UnicodeToLocale">True</Compiler>
|
||||
<Compiler Name="LocaleToUnicode">True</Compiler>
|
||||
<Compiler Name="ImagebaseMultiple">True</Compiler>
|
||||
<Compiler Name="SuspiciousTypecast">True</Compiler>
|
||||
<Compiler Name="PrivatePropAccessor">True</Compiler>
|
||||
<Compiler Name="UnsafeType">False</Compiler>
|
||||
<Compiler Name="UnsafeCode">False</Compiler>
|
||||
<Compiler Name="UnsafeCast">False</Compiler>
|
||||
<Compiler Name="OptionTruncated">True</Compiler>
|
||||
<Compiler Name="WideCharReduced">True</Compiler>
|
||||
<Compiler Name="DuplicatesIgnored">True</Compiler>
|
||||
<Compiler Name="UnitInitSeq">True</Compiler>
|
||||
<Compiler Name="LocalPInvoke">True</Compiler>
|
||||
<Compiler Name="MessageDirective">True</Compiler>
|
||||
<Compiler Name="CodePage"></Compiler>
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Linker Name="MapFile">0</Linker>
|
||||
<Linker Name="OutputObjs">0</Linker>
|
||||
<Linker Name="GenerateHpps">False</Linker>
|
||||
<Linker Name="ConsoleApp">1</Linker>
|
||||
<Linker Name="DebugInfo">False</Linker>
|
||||
<Linker Name="RemoteSymbols">False</Linker>
|
||||
<Linker Name="GenerateDRC">False</Linker>
|
||||
<Linker Name="MinStackSize">16384</Linker>
|
||||
<Linker Name="MaxStackSize">1048576</Linker>
|
||||
<Linker Name="ImageBase">4194304</Linker>
|
||||
<Linker Name="ExeDescription"></Linker>
|
||||
</Linker>
|
||||
<Directories>
|
||||
<Directories Name="OutputDir"></Directories>
|
||||
<Directories Name="UnitOutputDir"></Directories>
|
||||
<Directories Name="PackageDLLOutputDir"></Directories>
|
||||
<Directories Name="PackageDCPOutputDir"></Directories>
|
||||
<Directories Name="SearchPath"></Directories>
|
||||
<Directories Name="Packages"></Directories>
|
||||
<Directories Name="Conditionals"></Directories>
|
||||
<Directories Name="DebugSourceDirs"></Directories>
|
||||
<Directories Name="UsePackages">False</Directories>
|
||||
</Directories>
|
||||
<Parameters>
|
||||
<Parameters Name="RunParams"></Parameters>
|
||||
<Parameters Name="HostApplication"></Parameters>
|
||||
<Parameters Name="Launcher"></Parameters>
|
||||
<Parameters Name="UseLauncher">False</Parameters>
|
||||
<Parameters Name="DebugCWD"></Parameters>
|
||||
<Parameters Name="Debug Symbols Search Path"></Parameters>
|
||||
<Parameters Name="LoadAllSymbols">True</Parameters>
|
||||
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
|
||||
</Parameters>
|
||||
<VersionInfo>
|
||||
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
|
||||
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
|
||||
<VersionInfo Name="MajorVer">1</VersionInfo>
|
||||
<VersionInfo Name="MinorVer">0</VersionInfo>
|
||||
<VersionInfo Name="Release">0</VersionInfo>
|
||||
<VersionInfo Name="Build">0</VersionInfo>
|
||||
<VersionInfo Name="Debug">False</VersionInfo>
|
||||
<VersionInfo Name="PreRelease">False</VersionInfo>
|
||||
<VersionInfo Name="Special">False</VersionInfo>
|
||||
<VersionInfo Name="Private">False</VersionInfo>
|
||||
<VersionInfo Name="DLL">False</VersionInfo>
|
||||
<VersionInfo Name="Locale">2057</VersionInfo>
|
||||
<VersionInfo Name="CodePage">1252</VersionInfo>
|
||||
</VersionInfo>
|
||||
<VersionInfoKeys>
|
||||
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
|
||||
</VersionInfoKeys>
|
||||
</Delphi.Personality>
|
||||
</BorlandProject>
|
136
dd-verinfo/Demo/2/HelpEgs.dof
Normal file
136
dd-verinfo/Demo/2/HelpEgs.dof
Normal file
@@ -0,0 +1,136 @@
|
||||
[FileVersion]
|
||||
Version=7.0
|
||||
[Compiler]
|
||||
A=8
|
||||
B=0
|
||||
C=1
|
||||
D=1
|
||||
E=0
|
||||
F=0
|
||||
G=1
|
||||
H=1
|
||||
I=1
|
||||
J=0
|
||||
K=0
|
||||
L=1
|
||||
M=0
|
||||
N=1
|
||||
O=1
|
||||
P=1
|
||||
Q=0
|
||||
R=0
|
||||
S=0
|
||||
T=0
|
||||
U=0
|
||||
V=1
|
||||
W=0
|
||||
X=1
|
||||
Y=1
|
||||
Z=1
|
||||
ShowHints=1
|
||||
ShowWarnings=1
|
||||
UnitAliases=
|
||||
NamespacePrefix=
|
||||
SymbolDeprecated=1
|
||||
SymbolLibrary=1
|
||||
SymbolPlatform=1
|
||||
UnitLibrary=1
|
||||
UnitPlatform=1
|
||||
UnitDeprecated=1
|
||||
HResultCompat=1
|
||||
HidingMember=1
|
||||
HiddenVirtual=1
|
||||
Garbage=1
|
||||
BoundsError=1
|
||||
ZeroNilCompat=1
|
||||
StringConstTruncated=1
|
||||
ForLoopVarVarPar=1
|
||||
TypedConstVarPar=1
|
||||
AsgToTypedConst=1
|
||||
CaseLabelRange=1
|
||||
ForVariable=1
|
||||
ConstructingAbstract=1
|
||||
ComparisonFalse=1
|
||||
ComparisonTrue=1
|
||||
ComparingSignedUnsigned=1
|
||||
CombiningSignedUnsigned=1
|
||||
UnsupportedConstruct=1
|
||||
FileOpen=1
|
||||
FileOpenUnitSrc=1
|
||||
BadGlobalSymbol=1
|
||||
DuplicateConstructorDestructor=1
|
||||
InvalidDirective=1
|
||||
PackageNoLink=1
|
||||
PackageThreadVar=1
|
||||
ImplicitImport=1
|
||||
HPPEMITIgnored=1
|
||||
NoRetVal=1
|
||||
UseBeforeDef=1
|
||||
ForLoopVarUndef=1
|
||||
UnitNameMismatch=1
|
||||
NoCFGFileFound=1
|
||||
MessageDirective=1
|
||||
ImplicitVariants=1
|
||||
UnicodeToLocale=1
|
||||
LocaleToUnicode=1
|
||||
ImagebaseMultiple=1
|
||||
SuspiciousTypecast=1
|
||||
PrivatePropAccessor=1
|
||||
UnsafeType=0
|
||||
UnsafeCode=0
|
||||
UnsafeCast=0
|
||||
[Linker]
|
||||
MapFile=0
|
||||
OutputObjs=0
|
||||
ConsoleApp=1
|
||||
DebugInfo=0
|
||||
RemoteSymbols=0
|
||||
MinStackSize=16384
|
||||
MaxStackSize=1048576
|
||||
ImageBase=4194304
|
||||
ExeDescription=
|
||||
[Directories]
|
||||
OutputDir=
|
||||
UnitOutputDir=
|
||||
PackageDLLOutputDir=
|
||||
PackageDCPOutputDir=
|
||||
SearchPath=
|
||||
Packages=
|
||||
Conditionals=
|
||||
DebugSourceDirs=
|
||||
UsePackages=0
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=
|
||||
Launcher=
|
||||
UseLauncher=0
|
||||
DebugCWD=
|
||||
[Language]
|
||||
ActiveLang=
|
||||
ProjectLang=
|
||||
RootDir=
|
||||
[Version Info]
|
||||
IncludeVerInfo=0
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=2057
|
||||
CodePage=1252
|
||||
[Version Info Keys]
|
||||
CompanyName=
|
||||
FileDescription=
|
||||
FileVersion=1.0.0.0
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=1.0.0.0
|
||||
Comments=
|
49
dd-verinfo/Demo/2/HelpEgs.dpr
Normal file
49
dd-verinfo/Demo/2/HelpEgs.dpr
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
* HelpEgs.dpr
|
||||
*
|
||||
* Project file for Version Information Component HelpEgs demo program.
|
||||
*
|
||||
* $Rev: 1119 $
|
||||
* $Date: 2013-01-14 00:39:57 +0000 (Mon, 14 Jan 2013) $
|
||||
*
|
||||
* Any copyright in this file is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
}
|
||||
|
||||
program HelpEgs;
|
||||
|
||||
{$UNDEF Supports_RTLNameSpaces}
|
||||
{$IFDEF CONDITIONALEXPRESSIONS}
|
||||
{$IF CompilerVersion >= 15.0} // >= Delphi 7
|
||||
{$WARN UNSAFE_CODE OFF}
|
||||
{$IFEND}
|
||||
{$IF CompilerVersion >= 23.0} // Delphi XE2
|
||||
{$DEFINE Supports_RTLNameSpaces}
|
||||
{$IFEND}
|
||||
{$ENDIF}
|
||||
|
||||
uses
|
||||
{$IFDEF Supports_RTLNameSpaces}
|
||||
Vcl.Forms,
|
||||
{$ELSE}
|
||||
Forms,
|
||||
{$ENDIF}
|
||||
FmMain in 'FmMain.pas' {MainForm},
|
||||
FmEg1 in 'FmEg1.pas' {EgForm1},
|
||||
FmEg2 in 'FmEg2.pas' {EgForm2},
|
||||
FmEg3 in 'FmEg3.pas' {EgForm3},
|
||||
FmEg4 in 'FmEg4.pas' {EgForm4};
|
||||
|
||||
{$R *.RES}
|
||||
{$R MultiVer.res}
|
||||
|
||||
begin
|
||||
Application.Title := 'TPJVersionInfo Help Examples';
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TMainForm, MainForm);
|
||||
Application.CreateForm(TEgForm1, EgForm1);
|
||||
Application.CreateForm(TEgForm2, EgForm2);
|
||||
Application.CreateForm(TEgForm3, EgForm3);
|
||||
Application.CreateForm(TEgForm4, EgForm4);
|
||||
Application.Run;
|
||||
end.
|
159
dd-verinfo/Demo/2/HelpEgs.dproj
Normal file
159
dd-verinfo/Demo/2/HelpEgs.dproj
Normal file
@@ -0,0 +1,159 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{16969235-37DD-4A02-BE4C-310882F9046C}</ProjectGuid>
|
||||
<MainSource>HelpEgs.dpr</MainSource>
|
||||
<Base>True</Base>
|
||||
<Config Condition="'$(Config)'==''">Debug</Config>
|
||||
<TargetedPlatforms>1</TargetedPlatforms>
|
||||
<AppType>Application</AppType>
|
||||
<FrameworkType>VCL</FrameworkType>
|
||||
<ProjectVersion>14.4</ProjectVersion>
|
||||
<Platform Condition="'$(Platform)'==''">Win32</Platform>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
|
||||
<Base_Win32>true</Base_Win32>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''">
|
||||
<Cfg_1>true</Cfg_1>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''">
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
|
||||
<Cfg_2_Win32>true</Cfg_2_Win32>
|
||||
<CfgParent>Cfg_2</CfgParent>
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base)'!=''">
|
||||
<DCC_S>false</DCC_S>
|
||||
<DCC_ImageBase>00400000</DCC_ImageBase>
|
||||
<DCC_N>false</DCC_N>
|
||||
<VerInfo_Locale>2057</VerInfo_Locale>
|
||||
<DCC_Namespace>Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace)</DCC_Namespace>
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=;CFBundleDisplayName=;CFBundleIdentifier=;CFBundleVersion=;CFBundlePackageType=;CFBundleSignature=;CFBundleAllowMixedLocalizations=;CFBundleExecutable=</VerInfo_Keys>
|
||||
<DCC_F>false</DCC_F>
|
||||
<DCC_K>false</DCC_K>
|
||||
<DCC_E>false</DCC_E>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win32)'!=''">
|
||||
<DCC_Namespace>System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1)'!=''">
|
||||
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
|
||||
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
|
||||
<DCC_DebugInformation>false</DCC_DebugInformation>
|
||||
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2)'!=''">
|
||||
<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
|
||||
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
|
||||
<DCC_Optimize>false</DCC_Optimize>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
|
||||
<Icon_MainIcon>HelpEgs_Icon.ico</Icon_MainIcon>
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<DelphiCompile Include="$(MainSource)">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="FmMain.pas">
|
||||
<Form>MainForm</Form>
|
||||
</DCCReference>
|
||||
<DCCReference Include="FmEg1.pas">
|
||||
<Form>EgForm1</Form>
|
||||
</DCCReference>
|
||||
<DCCReference Include="FmEg2.pas">
|
||||
<Form>EgForm2</Form>
|
||||
</DCCReference>
|
||||
<DCCReference Include="FmEg3.pas">
|
||||
<Form>EgForm3</Form>
|
||||
</DCCReference>
|
||||
<DCCReference Include="FmEg4.pas">
|
||||
<Form>EgForm4</Form>
|
||||
</DCCReference>
|
||||
<BuildConfiguration Include="Debug">
|
||||
<Key>Cfg_2</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</BuildConfiguration>
|
||||
<BuildConfiguration Include="Base">
|
||||
<Key>Base</Key>
|
||||
</BuildConfiguration>
|
||||
<BuildConfiguration Include="Release">
|
||||
<Key>Cfg_1</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</BuildConfiguration>
|
||||
</ItemGroup>
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
|
||||
<Borland.ProjectType/>
|
||||
<BorlandProject>
|
||||
<Delphi.Personality>
|
||||
<Source>
|
||||
<Source Name="MainSource">HelpEgs.dpr</Source>
|
||||
</Source>
|
||||
<VersionInfo>
|
||||
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
|
||||
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
|
||||
<VersionInfo Name="MajorVer">1</VersionInfo>
|
||||
<VersionInfo Name="MinorVer">0</VersionInfo>
|
||||
<VersionInfo Name="Release">0</VersionInfo>
|
||||
<VersionInfo Name="Build">0</VersionInfo>
|
||||
<VersionInfo Name="Debug">False</VersionInfo>
|
||||
<VersionInfo Name="PreRelease">False</VersionInfo>
|
||||
<VersionInfo Name="Special">False</VersionInfo>
|
||||
<VersionInfo Name="Private">False</VersionInfo>
|
||||
<VersionInfo Name="DLL">False</VersionInfo>
|
||||
<VersionInfo Name="Locale">2057</VersionInfo>
|
||||
<VersionInfo Name="CodePage">1252</VersionInfo>
|
||||
</VersionInfo>
|
||||
<VersionInfoKeys>
|
||||
<VersionInfoKeys Name="CompanyName"/>
|
||||
<VersionInfoKeys Name="FileDescription"/>
|
||||
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="InternalName"/>
|
||||
<VersionInfoKeys Name="LegalCopyright"/>
|
||||
<VersionInfoKeys Name="LegalTrademarks"/>
|
||||
<VersionInfoKeys Name="OriginalFilename"/>
|
||||
<VersionInfoKeys Name="ProductName"/>
|
||||
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="Comments"/>
|
||||
<VersionInfoKeys Name="CFBundleName"/>
|
||||
<VersionInfoKeys Name="CFBundleDisplayName"/>
|
||||
<VersionInfoKeys Name="CFBundleIdentifier"/>
|
||||
<VersionInfoKeys Name="CFBundleVersion"/>
|
||||
<VersionInfoKeys Name="CFBundlePackageType"/>
|
||||
<VersionInfoKeys Name="CFBundleSignature"/>
|
||||
<VersionInfoKeys Name="CFBundleAllowMixedLocalizations"/>
|
||||
<VersionInfoKeys Name="CFBundleExecutable"/>
|
||||
</VersionInfoKeys>
|
||||
<Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k170.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDSBIN)\dclofficexp170.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||
<Excluded_Packages Name="D:\Software-Installs\Delphi XE3\RAD XE3 Bonus Pack\Mida Converter\MidaBasicDesign170.bpl">File D:\Software-Installs\Delphi XE3\RAD XE3 Bonus Pack\Mida Converter\MidaBasicDesign170.bpl not found</Excluded_Packages>
|
||||
</Excluded_Packages>
|
||||
</Delphi.Personality>
|
||||
<Platforms>
|
||||
<Platform value="Win32">True</Platform>
|
||||
<Platform value="Win64">False</Platform>
|
||||
</Platforms>
|
||||
</BorlandProject>
|
||||
<ProjectFileVersion>12</ProjectFileVersion>
|
||||
</ProjectExtensions>
|
||||
<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
|
||||
<Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
|
||||
</Project>
|
BIN
dd-verinfo/Demo/2/HelpEgs_Icon.ico
Normal file
BIN
dd-verinfo/Demo/2/HelpEgs_Icon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 766 B |
57
dd-verinfo/Demo/2/MultiVer.rc
Normal file
57
dd-verinfo/Demo/2/MultiVer.rc
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* MultiVer.rc
|
||||
*
|
||||
* Resource file containing version information with more than one translation
|
||||
* for use in the the Version Information Component HelpEgs demo program.
|
||||
*
|
||||
* $Rev: 1109 $
|
||||
* $Date: 2013-01-13 23:19:20 +0000 (Sun, 13 Jan 2013) $
|
||||
*
|
||||
* Any copyright in this file is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
#define VERINFO 1
|
||||
|
||||
VERINFO VERSIONINFO
|
||||
FILEVERSION 1, 2, 3, 4
|
||||
PRODUCTVERSION 1, 0, 123, 2001
|
||||
FILEFLAGSMASK 0x3F
|
||||
FILEFLAGS VS_FF_DEBUG + VS_FF_PRIVATEBUILD
|
||||
FILEOS VOS_DOS_WINDOWS32
|
||||
FILETYPE VFT_APP
|
||||
{
|
||||
BLOCK "StringFileInfo"
|
||||
{
|
||||
BLOCK "080904E4"
|
||||
{
|
||||
VALUE "Comments", "This is the English English realisation.\000"
|
||||
VALUE "CompanyName", "DelphiDabbler.com\000"
|
||||
VALUE "FileDescription", "A demo application showing multi-lingual version info resources.\000"
|
||||
VALUE "FileVersion", "1.0\000"
|
||||
VALUE "InternalName", "MultiLingDemo\000"
|
||||
VALUE "LegalCopyright", "No copyright\000"
|
||||
VALUE "OriginalFileName", "MultiLingDemo.exe\000"
|
||||
VALUE "PrivateBuild", "This is a UK private build\000"
|
||||
VALUE "ProductName", "Multilingual Demo App\000"
|
||||
VALUE "ProductVersion", "1.0\000"
|
||||
}
|
||||
BLOCK "040904B0"
|
||||
{
|
||||
VALUE "Comments", "This is the American English realization.\000"
|
||||
VALUE "CompanyName", "DelphiDabbler.com\000"
|
||||
VALUE "FileDescription", "A demo application showing multi-lingual version info resources.\000"
|
||||
VALUE "FileVersion", "1.0\000"
|
||||
VALUE "InternalName", "MultiLingDemo\000"
|
||||
VALUE "LegalCopyright", "No copyright\000"
|
||||
VALUE "OriginalFileName", "MultiLingDemo.exe\000"
|
||||
VALUE "PrivateBuild", "This is a US private build\000"
|
||||
VALUE "ProductName", "Multilingual Demo App\000"
|
||||
VALUE "ProductVersion", "1.0\000"
|
||||
}
|
||||
}
|
||||
BLOCK "VarFileInfo"
|
||||
{
|
||||
VALUE "Translation", 0x0809, 1252, 0x0409, 1200
|
||||
}
|
||||
}
|
11
dd-verinfo/Demo/2/ReadMe.txt
Normal file
11
dd-verinfo/Demo/2/ReadMe.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
The HelpEgs demo program implements the examples from both the Version
|
||||
Information Component's help file and online documentation.
|
||||
|
||||
The main window displays a button for each example. Click the required button to
|
||||
run an example and display the results.
|
||||
|
||||
Each example display its own dialogue box that includes a link to the related
|
||||
online example.
|
||||
|
||||
*** NOTE: To compile with Delphi 2007 first delete the .dproj file then load the
|
||||
project from the .bdsproj file.
|
Reference in New Issue
Block a user