Стартовый пул
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 |
Reference in New Issue
Block a user