» Contents
TPJVersionInfo is a 32 bit non-visual component for all Win32 versions of Delphi and C++Builder that encapsulates the version information contained in an executable file's resources.
The component reads information from a designated file's VERSIONINFO resource. The required file is specified in the component's FileName property. Setting FileName to the empty string fetches version information for the executable containing the component. The boolean HaveInfo property indicates whether the file contains version information. This component can access variable file information for each language provided in the resource.
Run-time properties enable access to to version information. Properties enable:
The component makes calls to the Windows API. Therefore the version information being read must follow the Microsoft guidelines - be warned that not all software complies!
For detailed information about version information refer to the Win32 SDK.
» Contents
TPJVersionInfo compiles on all Win32 versions and personalities of Delphi. It has been tested with Delphi versions 2, 3, 4, 6, 7 and 2006 (Win32 personality). It is assumed to work correctly with Delphis 5 and 2005.
The unit name changed to PJVersionInfo
at release 3 - this
means that programs using earlier versions will need to be modified (or
to have an alias set in Delphi's Project Options) before being
recompiled using the new version. Functionally, the component is backward
compatible with earlier versions.
The help file is not compatible with the Delphi 2, 2005 or 2006 IDEs, although it can be used separately.
» Contents
In these instructions $(DELPHI)
is to be
taken to represent the path where the appropriate version of Delphi was
installed. Similarly $(BDS)
refers to the
installation path of a version of the Borland Developement System.
Note that the help file included in the download can only integrate with the IDE in Delphi 3-7.
The installation method differs depending on the version of Delphi. Therefore the instructions are divided as follows:
PJVersionInfo.pas
and PJVersionInfo.dcr
to where you wish to install into Delphi. This will probably be a
sub-folder of $(BDS)\lib
.
$(BDS)\Lib
and is named dclusr.dpk
. You can
select this file or the associated dclusr.bdsproj
file.
.bpl
extension) will now be
displayed in the Project Manager. If the package has not been
installed right click the .bpl
entry in the Project
Manager and select Install. Dismiss any resulting message
dialog.
.bpl
entry again and select
Add. The "Add" dialog box will be displayed. Click
the dialog's Browse button then select
PJVersionInfo.pas
from the resulting file open dialog. The
full path to the file should now be displayed in the
"Add" dialog's Unit file name edit box.
Click OK to add the component to the package.
PJVersionInfo.pas
and PJVersionInfo.dcr
appear
under the package's "Contains" node. If so, right
click the .bpl
entry again and select
Compile. The package will now be recompiled and, if all is
well, a message should be displayed indicating that
TPJVersionInfo has been registered. The component should now
appear in the "DelphiDabbler" section of the Tool
Palette. (Note this will only appear when a form is selected in the
designer).
PJVersionInfo.pas
from the
place where you copied it.
PJVersionInfo.pas
and PJVersionInfo.dcr
to where you wish to install into Delphi. This will probably be a
sub-folder of $(DELPHI)\lib
.
*.dpk
extenstion are being
displayed, and choose a suitable package source file. You may
decide to install into the "user" package. This is found
in $(DELPHI)\Lib
and is named dclusr.dpk
or dclusrXX.dpk
where XX
is a version
number.
PJVersionInfo.pas
from the resulting file open dialog. The
full path to the file should now be displayed in the
"Add" dialog's Unit file name edit box.
Click OK to add the component to the package.
PJVersionInfo.pas
from the
place where you copied it.
.als
a-link
keyword file for use with Delphi 6 and 7. Component Help
Installer v2.2 or later can also install the keyword file for you.
If you prefer to install manually, this
article explains the process.
PJVersionInfo.pas
and PJVersionInfo.dcr
to where you wish to install into Delphi. This will probably be a
sub-folder of $(DELPHI)\lib
.
PJVersionInfo.pas
from the resulting standard file open
dialog box and click Open.PJVersionInfo.pas
from the
place where you copied it.
» Contents
The source code for two demo projects is included. The demos are:
VIDemo.dpr
is an application that can extract and display
version information from any program (provided that the program has
valid version information).
HelpEgs.dpr
implements all the examples from the component
help file.
» Contents
A complete change log is provided in a text file that is included in the download.
» Contents
This source code is subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this program except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/.
Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
The Original Code is Version Information Component.
The Initial Developer of the Original Code is Peter Johnson (http://www.delphidabbler.com/).
Portions created by the Initial Developer are Copyright © 1998-2005 Peter Johnson. All Rights Reserved.
Contributor(s):
Roland Beduerftig (C++ builder compatibility)
All relevant trademarks are acknowledged.
» Contents
I'm Peter Johnson - a hobbyist programmer living in Ceredigion in West Wales, UK, writing write mainly in Delphi. My programs are available for download from: http://www.delphidabbler.com/.
I can be contacted via the website.