Version Information Component (TPJVersionInfo)


Contents


Description

TPJVersionInfo is a 32 bit non-visual component for Delphi 2 to 7 that encapsulates the version information contained in an executable file's resources.

The component reads information from a designated file's VERSIONINFO resource. The name file for which version information is to be extracted is set using 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 32 bit version of TPJVersionInfo can access variable file information for each language provided in the resource. The component depends on the version information following the Microsoft guidelines -- and not all software does!

Run-time properties enable access to to version information. Properties enable:

Limitations

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.

Further information

For detailed information about version information refer to the Win32 SDK.


Compatibility

This version of the component works only with 32 bit versions of Delphi. It has been tested with Delphi versions 2, 3, 4, 6 and 7. It is assumed to work correctly with Delphi 5.

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.

This component is backward compatible with previous 32 bit releases. >From release 3 component's 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.


Availability

The component is available from download from www.delphidabbler.com. Updates will always be published there first.

Note: A 16 bit version of the component for use with Delphi 1 is also available from the above site.


Installation

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.

The component and associated files are supplied in a .zip file.

Installation with Delphi 2

Note: although the provided help file gives information about using the component it cannot be linked into the Delphi 2 environment.

  1. Unzip the component's .zip file into a folder, preserving the directory structure.
  2. Copy the files 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.
  3. Start Delphi. Select the Options | Install Components menu option. Click the Add button, then the Browse button and navigate to the PJVersionInfo.pas file in the folder where you placed it. Click OK to recompile the components library.
  4. You can now delete PJVersionInfo.pas from the place where you copied it if you wish. The component will appear on a palette called DelphiDabbler. You can move the component to a different palette as required.

Installation with Delphi 3 to 7

NOTE: If you are updating from an earlier version of PJVersionInfo.pas and have installed the DelphiDabbler about box component TPJAboutBoxDlg you may need to uninstall it before updating PJVersionInfo.pas, and re-install the about box component once the update has been installed. This is necessary because the about box component depends on TPJVersionInfo.

  1. Unzip the component's .zip into a folder of your choice, preserving the directory structure.
  2. Copy the files PJVersionInfo.pas and PJVersionInfo.dcr to where you wish to install into Delphi. This will probably be a sub-folder of the $(DELPHI)\lib folder.
  3. Install the unit's components and property editor into the palette by chosing the Component | Install Component menu option to display the Install Component dialog box. Then:
  4. You can now delete PJVersionInfo.pas from the place where you copied it if you wish (but ensure that the .dcu file is not deleted). The component will appear on a palette called DelphiDabbler. The other code in the unit can be made available simply by use-ing the unit in your projects. You can move the components to a different palette as required.
  5. The simplest way to install the help file is to use my Component Help Installer Expert. To install manually, proceed as follows:
  6. The supplied demo programs can be loaded into Delphi and compiled and run as required.


Known Issues


Update History

Unreleased
VerInfo v1.0 of 26/04/1998

Unreleased
VerInfo v2.0 of 06/12/1998

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).

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

Release 3.0.1 of 08/07/2003
PJVersionInfo v3.0.1 of 08/07/2003

Release 3.1 of 07/09/2003
PJVersionInfo v3.1 of 07/09/2003


License & Disclaimer

This component is copyright © P.D.Johnson, 1998-2003.

The source code and help files can be freely distributed on a not-for-profit basis providing that:

  1. the source code is not altered.
  2. this readme file is distributed with it unchanged

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.

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.


About the Author

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.