This is a 32 bit non-visual component for Delphi 2 to 6 that encapsulates file version resource information contained in a file.
The component reads information from the file's VERSIONINFO resource. If the file has no such resource then this component returns no information. The HaveInfo property informs whether the component has been able to get version information from the file. The 32 bit version of TPJVersionInfo can access variable file information for each language provided in the resource.
The file from which resource information is gleaned is determined by the FileName property. Setting the file name property to the empty string makes the component read information from the executable file in which it embedded. Apart from the usual Name and Tag properties the FileName property is the only design-time property of the component. With the exception of the property that selects the language for which variable file information is to be returned, all other properties are read only. These properties present the information from the VERSIONINFO resource to the user. See the help file for further information.
The component introduces no new methods and it has no events.
This version of the component makes calls to the 32 bit Windows API. It is not suitable for compilation using the 16 bit Delphi 1 compiler.
For detailed information about file version information refer to the Win32 SDK.
This version of the component works only with 32 bit versions of Delphi. It has been tested with Delphi versions 2, 3, 4 and 6. It is assumed to work correctly with Delphi 5. A separate version of the component is available for 16 bit Delphi 1.
The unit name has changed to PJVersionInfo
in this release of
the code - 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.
This component is backward compatible with previous 32 bit releases. In previous releases the help file was designed for integration with the Delphi 2 IDE but was not compatible with the OpenHelp system used from Delphi 3 onwards. From this release the help file has been updated to integrate with the Delphi 3 and later IDE. It is no longer compatible with the Delphi 2 IDE, although can be used separately.
In these instructions $(DELPHI)
is to be taken to represent the path where your 32 bit version of Delphi was installed. For example, if you have Delphi 4 installed on the path C:\Program Files\Borland\Delphi4
then $(DELPHI)
represents that path.
Note that although the provided help file gives information about using the component it cannot be linked into the Delphi 2 environment.
.zip
file into a folder, preserving the
directory structure.
PJVersionInfo.pas
and PJVersionInfo.dcr
to the folder from where you wish to install the component into the Delphi
Component Palette. This will probably be an existing folder where you keep
the library components - say the default $(DELPHI)\lib
folder.
PJVersionInfo.pas
file in the folder where you placed
it. Click OK to recompile the components library. PJVersionInfo.pas
from the place where you
copied it if you wish. The component will appear on a palette called PJ
Stuff. You can move the component to a different palette as required,
or hack the source code (before installing the component) by finding the Register
procedure at the end of the code and changing the string 'PJ stuff'
to the name of the required palette.
.zip
file into a folder, preserving the
directory structure.
PJVersionInfo.pas
and PJVersionInfo.dcr
to the folder from where you wish to install the component into the Delphi
Component Palette. This will probably be a sub-folder of the $(DELPHI)\lib
folder. PJVersionInfo.pas
and select the file.
$(DELPHI)\lib\dclusrX0.dpk
(where X is the version number of Delphi).
PJVersionInfo.pas
from the place where you
copied it if you wish. The component will appear on a palette called PJ
Stuff. You can move the component to a different palette as required,
or hack the source code (before installing the program) by finding the Register
procedure at the end of the code and changing the string 'PJ stuff'
to the name of the required palette.
PJVersionInfo.hlp
to whichever folder you wish to install
it to. PJVersionInfo.cfg
in your Delphi
Help folder. Enter the following two lines:
:Index PJSoft Version Info Component=PJVersionInfo.hlp
:Link PJVersionInfo.hlp
DelphiX.cnt
file (where is is your Delphi version)
and add the line: :Include PJVersionInfo.cfg
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Help
and add a new string value named PJVersionInfo.hlp
whose value
is the path where you copied the help file (probably ($DELPHI)\Help
).
Unreleased
VerInfo v1.0 of 26/04/1998
Unreleased
VerInfo v2.0 of 06/12/1998
vinfo16.htm
for continued update
history of v1).
Release 2.0.1 of 08/07/1999
VerInfo v2.0.1 of 09/04/1999
(This release also included Release 1.0 of 16 bit VerInfo v1.0.1 - see vinfo16.htm
for details).
Release 2.1 of 28/11/1999
VInfo v2.1 of 28/11/1999
(Separated 16 bit and 32 bits versions into separate releases).
Release 3.0 of 17/02/2002
PJVersionInfo v3.0 of 17/02/2002
This component is copyright © P.D.Johnson, 1998-2002.
The source code and help files can be freely distributed on a not-for-profit basis providing that:
By not-for-profit I mean that you may recover out of pocket expenses incurred in distributing the code, but should not make a profit from this.
If you discover any bugs in this implementation, or if you have any update suggestions, please contact me on [email protected].
Please do modify the code for you own use. I'd like to see any changes you make - I could incorporate them into future versions. Please notify me of changes on at the above e-mail address.
This software is provided as is - no warranty is given as to its suitability for any purposes to which you may wish to put it.
I'm Peter Johnson - a hobbyist programmer living in Ceredigion in West Wales, UK, writing mainly in Delphi. .My programs are available for download on my website: http://www.pjsoft.contactbox.co.uk/.
I can be contacted by e-mail on [email protected].