The Version Info Editor permits the creation of a version resource that is linked to compiled applications. When a file (usually an EXE or DLL) contains a version resource, the information can be viewed with Windows Explorer through the file's Properties menu.
Using the information entered in the Version Info Editor, PowerBASIC Forms automatically creates the version resource and generates the necessary code to link the resource file into the main project code.
When launched by either the toolbar button, the Tools drop-down menu, or with the CTRL+SHIFT+V hot-key combination, the Version Info Editor dialog will appear something like this:
The version resource is split into two blocks: the Fixed Info block and the String Info block.
Stored as a set of numeric (binary) values, the Fixed Info block provides information about the file to the operating system or other applications, and identifies the version of the file.
The String Info block is stored as a set of strings that are used to convey details such as the author's name and copyright details, and usually includes a string representation of the version number, etc.
When the Version Info Editor is initially launched for a project, PowerBASIC Forms automatically creates a version resource file for the project. When PowerBASIC Forms saves the main project file, the resource file (.RC) containing the version resource is also saved and compiled into a .PBR file, ready for use.
If the version resource becomes unwanted at some point, it can be deleted with the Delete Current Block button, which removes the current String Info block. The version resource is automatically destroyed when there are no String Info blocks remaining, therefore, if more than one String Info block has been defined, each block will need to be deleted, before the version resource can be destroyed.
Let's examine all the fields in this dialog, and describe what each is used for.
FILEVERSION |
This field comprises four 16-bit numeric values that represent the version number of the file. From left to right, these are the Major, Minor, Third and Build numbers. For example, file version 2.1.12.1265 is stored as 2,1,12,1265 in this field. The individual numeric sections can be incremented with the Buttons in the Increment Versions section discussed below. A string version of this value is usually stored in the "File Version" field in the String Info block. | ||||||||
PRODUCTVERSION |
The product version field uses the same storage format as the FILEVERSION field, and is adjusted in the same manner. It is common for the product version values to be identical to the file version values, unless the distribution version of the file is specifically intended to be different to the file version. | ||||||||
FILEFLAGSMASK |
This field specifies which sections of the FILEFLAGS field are valid. PowerBASIC Forms manages this field automatically, and therefore this field is not user-adjustable. | ||||||||
FILEFLAGS |
The FILEFLAGS field is used to indicate any special characteristics that the file may have, including:
| ||||||||
FILEOS |
The operating system for which the file is intended. This is usually set to VOS_WINDOWS32 for 32-bit Windows. | ||||||||
FILETYPE |
The general type of file being represented. This is most commonly VFT_APP (application), but other flags such as VFT_DLL (library) are common too. | ||||||||
FILESUBTYPE |
The specific sub-type of file. The choices present in this field depend on the File Type field. For applications and DLLs, this field is usually VFT2_UNKNOWN |
Both File and Product |
When selected, the build increment buttons affect both FILEVERSION and PRODUCTVERSION build values. |
File Version Only |
When selected, the build increment buttons affect only the FILEVERSION values. |
Product Version Only |
When selected, the build increment buttons affect only the PRODUCTVERSION values. |
Auto Update Version Strings |
When enabled, the string info "File Version" field, and the string info "Product Version" field, are automatically updated to match the numeric File and Product version fields. For example, a File Version of "1,2,3,4" will result in the string info File Version field containing "1.02.0003.0004" (or "1,2,3,4" - see Auto Format Version Strings). |
Auto Format Version Strings |
When enabled, the string info File Version and Product Version fields are stored in the format x.yy.zzzz.bbbb, otherwise the comma-separated format is used "x,y,z,b". If the third value (yyyy) is zero, then it will be skipped. For example, "1,2,0,3" will be formatted as "1.02.0003". The Auto Format Version Strings option is disabled unless Auto Update Version Strings is selected. |
Note that the Version options take effect when the applicable Fixed Info text box loses focus. |
Block Header |
This field is used to indicate the language set used to create and display the string info fields. The default is "(0x040904B0) 0x0409 US English 1200 Unicode". | ||||||||||||||||||||||||
String Name |
The string name section may contain the following sections:
| ||||||||||||||||||||||||
String Value |
As items are selected in the String Name section, the String Value field displays the items string content. | ||||||||||||||||||||||||
Add New Block |
This creates a completely new String Info block, typically used when the completed application is likely to be shipped to countries with a different shell language, so a version resource may freely contain multiple String Info blocks. The Add New Block button launches a small dialog where the language ID and the character set can be chosen for the string info block. | ||||||||||||||||||||||||
Delete Current Block |
Once confirmed, the currently displayed String Info block is deleted. If no more String Info blocks remain, the entire Version Resource is destroyed. |
Selecting/linking dialogs and menus