📄 versinfo.txt
字号:
TdfsVersionInfoResource v2.36
Description:
A component to read version info resources. It is intended for Delphi 3,
but should work with any file that contains a properly formatted resource.
Contact Information:
The lateset version will always be available on the web at:
http://www.delphifreestuff.com
If you have any questions, comments or suggestions, please use the Delphi
Free Stuff Support Forum at:
http://www.delphifreestuff.com/discus/
If, for some reason, you can not use the web-based support forum, you can
email me at bstowers@delphifreestuff.com. However, the support forum will
always take precedence over direct email since it provides a resource that
others can use when they have a problem. Every message posted to the forum
is emailed directly to this account, so emailing me directly will not get
your message to me any faster. It will only make the message less important
for me to respond to since only one person (you) is benefiting from it
instead of everyone interested. Having said all that, please do email me
directly if it is regarding something that isn't really support related,
i.e. just to say thanks (as novel as that idea is).
Installation:
Delphi 1:
* Select the 'Options | Install Components' menu item.
* In the Install Components dialog, click the Add button.
* In the Add Module dialog, enter the full path name of the component's
registration unit (the unit that ends with 'Reg.pas', i.e.
'BrowseDrReg.pas') and click OK.
* In the Add Module dialog, click OK.
* The component library will be rebuilt and a new tab named 'DFS' will
be available on the Component Palette.
Delphi 2, C++Builder 1:
* Select the 'Component | Install' menu item.
* In the Install Components dialog, click the Add button.
* In the Add Module dialog, enter the full path name of the component's
registration unit (the unit that ends with 'Reg.pas', i.e.
'BrowseDrReg.pas') and click OK.
* In the Add Module dialog, click OK.
* The component library will be rebuilt and a new tab named 'DFS' will be
available on the Component Palette.
Delphi 3, 4, 5, C++Builder 3 & 4:
* Do one of the following:
+ Create a new package by selecting File | New and choosing Package from
the New tab in the dialog.
+ Open an existing package file. I suggest you do this if you already
have a package that you like to use for small, third party components.
I specifically have a package named "3rdParty.dpk" that I use for
small components that come from other people. Or, if you are using
several of my components, you might create a "DFS.dpk" package and
use it for all of my DFS components.
* In the resulting package window, click the Add button.
* In the Add dialog, on the Add Unit tab, enter the full path name of the
component's registration unit (the unit that ends with 'Reg.pas', i.e.
'BrowseDrReg.pas') and click OK.
* You may want to add the other source files (*.pas) to the package as
well in the same manner as you did the registration unit. While this is
not required, not doing it will cause compiler warnings when the package
is compiled. The component will function fine either way, but I
personally find the warnings very irritating and am not happy until
every compiler warning and hint is gone.
* If this package is new, or it has never been installed, click the
Install button in the package window. If this package is already
installed in Delphi, click the Compile button.
C++Builder 5 and up:
* Perform the "Delphi 3 and up, C++Builder 3 and up" steps above, except
for the last step (Compile or Install).
* Select the package the component has been added to, and choose
Project | Edit Option Source to open the package options in the editor.
* In the entry for PFLAGS, add the "-LUvcl50" option. For example:
<PFLAGS value="-$YD -$W -$O -v -JPHNE -M -LUvcl50"/>
* Perform the final step from above, Compile or Install.
* For Borland's official word on this situation, open the C++Builder help
file and search the index for "dsgnintf.dcu" and see the "Compiling
packages with DsgnIntf" section.
Delphi 6 and up:
* Perform the "Delphi 3, 4, 5, C++Builder 3 & 4" steps above, except
for the last step (Compile or Install).
* Add the DesignIDE package to the Requires list of the package into which
the component is being installed.
* Perform the final step from above, Compile or Install.
* This is necessary because of changes to the design-time support units
introduced in Delphi 6. For complete information, see the Del6New.hlp
file in your Delphi 6 Help directory. In the index, search for
"upgrade issues" and in the resulting list of topics, select the
"DsgnIntf renamed and related changes" topic.
Notes:
* You can now compile TdfsVersionInfoResource as a non-component class. I had the
need for using version info in an app that was needed to remain very small
in size, but as it was, many of the Delphi units were being used by this
component that bloated the compiled size horribly. The worst offenders were
the Forms and DsgnIntf units. So, I added a DFS_VERSION_INFO_AS_CLASS
conditional directive that will cause TdfsVersionInfoResource as a descendant
of TObject instead of TComponent. This means that you lose the ability to
drop it on a form and fool with it at design time, but it also means you
will cut 150k to 200k from the compiled size of your app. Now, you won't
get this savings if you are already using those VCL units in your app. In
practice, this is really only useful for console apps since any "normal"
delphi app uses these core units anyway. Also, it could be useful for
DLLs since they may not need those units. The biggest problem you are
likely to run into using this directive is switching between projects that
use the different versions. You will need to make sure you do a full build
of the project, otherwise you will get nasty errors since it could link the
component version DCU into your app that uses the TObject version, and vice
versa. I can not stress this enough: If you use this conditional define,
REBUILD YOUR PROJECT IMMEDIATELY when switching between projects that use
different versions.
* I have not tested this on anything but Delphi 3, 4 and C++Builder 3
generated EXEs with proper version info resources, and on Triplex generated
16-bit version info resources in a Delphi 1 EXE.
* The CreationDate property is faked under Delphi 1. If anyone has a
function, or even pseudo-code, for converting the dwFileDateLS and MS
variables into TDateTime format, please send it to me. For now, I just
get the date/time stamp of the file containing the ver info resource.
Known Issues:
* Using the version information built with Delphi 3 or C++Builder 3 and above
IDEs, (Project | Options | VersionInfo tab) will cause your ProductVersion
to always match your FileVersion. Here is what I've found:
It seems to me that this is a bug in the way Delphi builds the version
information resource. Here is what Delphi 3 builds in the project's .RES
file:
1 VERSIONINFO LOADONCALL MOVEABLE DISCARDABLE IMPURE
FILEVERSION 2, 1, 5, 3
PRODUCTVERSION 2, 1, 5, 3
[..snip...]
{
BLOCK "StringFileInfo"
{
BLOCK "040904E4"
{
[..snip...]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -