0,0 → 1,282 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> |
<HTML> |
|
<HEAD> |
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> |
<TITLE>PJSoft Info Sheet: TPJVersionInfo Component (32 bit)</TITLE> |
<BASE target="_blank"> |
</HEAD> |
|
<BODY> |
<h1>TPJVersionInfo Component (32 bit)</h1> |
<p></P> |
|
<P> |
<HR noshade> |
<p></P> |
|
<H2>Contents</H2> |
|
<UL> |
<LI><A HREF="#Description" target="_self">Description</A> |
<LI><A HREF="#Compatibility" target="_self">Compatibility</A> |
<LI><A HREF="#Installation" target="_self">Installation</A> |
<LI><A HREF="#Issues" target="_self">Known Issues</A> |
<LI><A HREF="#Update" target="_self">Update History</A> |
<LI><A HREF="#License" target="_self">License and Disclaimer</A> |
<LI><A HREF="#Author" target="_self">About the Author</A> |
</UL> |
|
<P> |
<HR noshade> |
<p></P> |
|
<H2><A NAME="Description"></A>Description</H2> |
|
<P>This is a 32 bit non-visual component for Delphi 2 to 6 that encapsulates file |
version resource information contained in a file.</P> |
|
<P>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.</P> |
|
<P>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.</P> |
<P>The component introduces no new methods and it has no events.</P> |
|
<H3>Limitations</H3> |
|
<P>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.</P> |
|
<H3>Further information</H3> |
|
<P>For detailed information about file version information refer to the Win32 |
SDK.</P> |
|
<P> |
<HR noshade> |
<p></P> |
|
<H2><A NAME="Compatibility"></A>Compatibility</H2> |
|
<P>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.</P> |
|
<P>The unit name has changed to <code>PJVersionInfo</code> 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.</P> |
<P>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.</P> |
|
<P> |
<HR noshade> |
<p></P> |
|
<H2><A NAME="Installation"></A>Installation</H2> |
|
<P>In these instructions <CODE><STRONG>$(DELPHI)</STRONG></CODE> 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 <CODE>C:\Program Files\Borland\Delphi4</CODE> then <CODE>$(DELPHI)</CODE> represents that path.</P> |
|
<H3>Installation with Delphi 2</H3> |
|
<p>Note that although the provided help file gives information about using the |
component it cannot be linked into the Delphi 2 environment.</p> |
<OL> |
<LI>Unzip the component's <code>.zip</code> file into a folder, preserving the |
directory structure. |
<li>Copy the files <CODE>PJVersionInfo.pas</CODE> and <CODE>PJVersionInfo.dcr</CODE> |
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 <CODE>$(DELPHI)\lib</CODE> folder. |
</li> |
<li>Start Delphi. Select the <EM>Options | Install Components</EM> menu option. |
Click the <EM>Add</EM> button, then the <EM>Browse</EM> button and navigate |
to the <CODE>PJVersionInfo.pas</CODE> file in the folder where you placed |
it. Click <EM>OK</EM> to recompile the components library. </li> |
<LI>You can now delete <code>PJVersionInfo.pas</code> from the place where you |
copied it if you wish. The component will appear on a palette called <EM>PJ |
Stuff</EM>. You can move the component to a different palette as required, |
or hack the source code (before installing the component) by finding the <CODE>Register</CODE> |
procedure at the end of the code and changing the string <CODE>'PJ stuff'</CODE> |
to the name of the required palette. |
</OL> |
|
<H3>Installation with Delphi 3 and later</H3> |
|
<OL> |
<LI>Unzip the component's <code>.zip</code> file into a folder, preserving the |
directory structure. |
<li>Copy the files <CODE>PJVersionInfo.pas</CODE> and <CODE>PJVersionInfo.dcr</CODE> |
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 <CODE>$(DELPHI)\lib</CODE> |
folder. </li> |
<LI>Install the component into the palette by choosing the <EM>Component | Install |
Component</EM> menu option. The following instructions assume you are installing |
into the default "users components" package: |
<UL> |
<LI>Select the "Into existing package" page of the <EM>Install Components</EM> |
dialogue box. |
<LI>Browse to the folder where you saved <CODE>PJVersionInfo.pas</CODE> |
and select the file. |
<LI>Ensure that the "Package file name" edit box contains <CODE>$(DELPHI)\lib\dclusrX0.dpk</CODE> |
(where X is the version number of Delphi). |
<LI>Accept that the package will be rebuilt. |
<LI>A dialogue box should be displayed saying that <em>TPJVersionInfo</em> |
has been added to the component palette. |
</UL> |
<LI>You can now delete <CODE>PJVersionInfo.pas</CODE> from the place where you |
copied it if you wish. The component will appear on a palette called <EM>PJ |
Stuff</EM>. You can move the component to a different palette as required, |
or hack the source code (before installing the program) by finding the <CODE>Register</CODE> |
procedure at the end of the code and changing the string <CODE>'PJ stuff'</CODE> |
to the name of the required palette. |
<li>The simplest way to install the help file is to use the <em>PJSoft Component |
Help Installer Expert,</em> available from my website. To install manually, |
proceed as follows (replace X is your version of Delphi): </li> |
<ul> |
<li>Copy <code>PJVersionInfo.hlp</code> to whichever folder you wish to install |
it to. </li> |
<li>Create a text file named <code>PJVersionInfo.cfg</code> in your Delphi |
Help folder. Enter the following two lines:<code><br> |
:Index PJSoft Version Info Component=PJVersionInfo.hlp<br> |
:Link PJVersionInfo.hlp</code><br> |
</li> |
<li>Edit the <code>DelphiX.cnt</code> file (where is is your Delphi version) |
and add the line:<br> |
<code> :Include PJVersionInfo.cfg </code></li> |
<li>Using RegEdit open the key <code>HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Help</code> |
and add a new string value named <code>PJVersionInfo.hlp</code> whose value |
is the path where you copied the help file (probably <code>($DELPHI)\Help</code>). |
</li> |
</ul> |
</OL> |
<P> |
<HR noshade> |
<p></P> |
|
<H2><A NAME="Issues"></A>Known Issues</H2> |
|
<UL> |
<LI>None known. |
</UL> |
|
<P> |
<HR noshade> |
<p></P> |
|
<H2><A NAME="Update"></A>Update History</H2> |
|
<P><STRONG>Unreleased</STRONG><BR> |
<EM>VerInfo v1.0 of 26/04/1998</EM></P> |
<UL> |
<LI>Original version - 16 bit only. |
</UL> |
|
<P><STRONG>Unreleased</STRONG><BR> |
<EM>VerInfo v2.0 of 06/12/1998</EM></P> |
<UL> |
<LI>Revised for use with Win32. Not compatible with v1.0 which continued to |
be used with 16 bit Delphi (see <CODE>vinfo16.htm</CODE> for continued update |
history of v1). |
</UL> |
|
<P><STRONG>Release 2.0.1 of 08/07/1999</STRONG><BR> |
<EM>VerInfo v2.0.1 of 09/04/1999</EM> <BR> |
(This release also included Release 1.0 of 16 bit VerInfo v1.0.1 - see <CODE>vinfo16.htm</CODE> for details).</P> |
<UL> |
<LI>Changed palette where component installs to "PJ Stuff" from "Own". |
<LI>Added HTML documentation (shared documentation with Release 1.0.1). |
</UL> |
|
<P><STRONG>Release 2.1 of 28/11/1999</STRONG><BR><EM>VInfo v2.1 of 28/11/1999</EM> |
<BR>(Separated 16 bit and 32 bits versions into separate releases).</P> |
<UL> |
<LI>Changed unit name from VerInfo to VInfo to allow component to install under Delphi 3 & 4 |
(VerInfo clashes with an existing unit in these versions). |
<LI>Removed superfluous conditional compilation directives. |
<LI>Updated HTML documentation to separate 16 bit from 32 bit version, to to include |
installation notes for Delphi 3/4 and to include update history. |
</UL> |
|
<P><strong>Release 3.0 of 17/02/2002</strong><br> |
<em>PJVersionInfo v3.0 of 17/02/2002</em> |
<ul> |
<li>Added ability to access all "translations" stored in a file's version information, |
rather than just first one. This has been done so that code using earlier |
versions of this component should continue to work unchanged. |
<li>Added new property to expose fixed file information record. |
<li>Added new "string array" property to give access to string information by |
name: this property can access any custom string information if the name is |
known. |
<li>Added properties to return number of "translations" and to select index |
of "translation" to be used. |
<li>Added properties to return language and character set codes in addition |
to descriptive strings. |
<li>All string info, language and character set properties now return values |
from the currently selected translation (which defaults to the first translation |
maintaining backward compatibilty). |
<li>Empty FileName property now accesses name of host application per command |
line rather than using Application.ExeName. |
<li>CharSet property now returns '' for unknown value rather than 'Unknown'. |
<li>Renamed TVersionNumber record to TPJVersionNumber. |
<li>Replaced Tvs_FixedFileInfo record with use of Windows unit defined type |
TVSFixedFileInfo |
<li>Renamed unit to PJVersionInfo. |
<li>Changed component palette from PJ Stuff to PJSoft. |
</ul> |
<p> |
<P> |
<HR noshade> |
<p></P> |
|
<H2><A NAME="License"></A>License & Disclaimer</H2> |
|
<P>This component is copyright © P.D.Johnson, 1998-2002.</P> |
|
<P>The source code and help files can be freely distributed on a not-for-profit basis providing that:</P> |
|
<OL> |
<LI>the source code is not altered. |
<LI>this readme file is distributed with it unchanged |
</OL> |
|
<P>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.</P> |
|
<P>If you discover any bugs in this implementation, or if you have any update suggestions, please contact me on <A HREF="mailto:peter.johnson@openlink.org">peter.johnson@openlink.org</A>.</P> |
|
<P>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.</P> |
|
<P>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.</P> |
|
<P> |
<HR noshade> |
<p></P> |
|
<H2><A NAME="Author"></A>About the Author</H2> |
|
<P>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: <a href="http://www.pjsoft.contactbox.co.uk/">http://www.pjsoft.contactbox.co.uk/</a>.</P> |
|
<P>I can be contacted by e-mail on <A HREF="mailto:peter.johnson@openlink.org">peter.johnson@openlink.org</A>. |
|
</BODY> |
|
</HTML> |
|
|