Include a line like
{$R 'version.res'}
in your project. And create a version.rc file with your version information. You will have to build the resource yourself in older Delphi versions using brcc32. In newer Delphi versions you can use
{$R 'version.res' 'version.rc'}
to have the IDE build it automatically for you.
The simplest version.rc would look something like:
1 VERSIONINFO
FILEVERSION 9999, 9999, 99, 18048
PRODUCTVERSION 9999, 9999, 99, 18048
FILEOS 0x00000004L // comment: VOS_WINDOWS32
FILETYPE VFT_APP
{
BLOCK "VarFileInfo"
{
VALUE "Translation", 0x409, 0x4E4 // comment: 0x4E4 = 1252
}
BLOCK "StringFileInfo"
{
BLOCK "040904E4"
{
VALUE "CompanyName", "Company Name"
VALUE "FileVersion", "9999.9999.99.18048"
VALUE "LegalCopyright", "Copyright "
VALUE "ProductName", "Product Name"
VALUE "ProductVersion", "9999.9999.99.18048"
VALUE "Homepage", "http://www.mydomain.com"
}
}
}
For more information, please refer to MSDN on the VERSIONINFO structure.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…