The win32 API allows to store version information in your binaries. This information can be made visible with the WINDOWS Explorer, by right-clicking on the executable or library, and selecting the ’Properties’ menu. In the tab ’Version’ the version information will be displayed.
Here is how to insert version information in your binary:
1 VERSIONINFO FILEVERSION 4, 0, 3, 17 PRODUCTVERSION 3, 0, 0, 0 FILEFLAGSMASK 0 FILEOS 0x40000 FILETYPE 1 { BLOCK "StringFileInfo" { BLOCK "040904E4" { VALUE "CompanyName", "Free Pascal" VALUE "FileDescription", "Free Pascal version information extractor" VALUE "FileVersion", "1.0" VALUE "InternalName", "Showver" VALUE "LegalCopyright", "GNU Public License" VALUE "OriginalFilename", "showver.pp" VALUE "ProductName", "Free Pascal" VALUE "ProductVersion", "1.0" } } } |
The Free Component Library comes with a unit (fileinfo) that allows to extract and view version information in a straightforward and easy manner; the demo program that comes with it (showver) shows version information for an arbitrary executable or DLL.