Version Info Editor

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.

Fixed Info block

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:

Patched

(VS_FF_PATCHED) indicates the file has been patched or updated in some manner.

Pre-release

(VS_FF_PRERELEASE) indicates the file is a prerelease version, possibly for Alpha or Beta testing.

Private build

(VS_FF_PRIVATEBUILD) indicates the file is intended for internal use only. When selected, PowerBASIC Forms automatically includes the string info "PrivateBuild" field in the compiled resource.

Special build

(VS_FF_SPECIALBUILD) indicates the file has been created specially for a task, typically for customized software releases. When selected, PowerBASIC Forms automatically includes the string info "SpecialBuild" field in the compiled resource.

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

Increment Versions

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.

Version Options

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.

String Info

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:

Comments

This is often used to hold special notes, such as contact details of the author, tech support contact details, or a web address (URL) of the product.

CompanyName

The name of the company or author of the file.

FileDescription

A description of the file and its purpose.

FileVersion

A string containing the version number of the file, for example, "1.02.0003.0004". See Version Options above.

InternalName

Typically contains a codename for the file, commonly used in prerelease versions.

LegalCopyright

The copyright statement for the file, typically this is in the format "Copyright © 2004, Authors Name."

LegalTrademarks

All legal (registered) trademarks applicable to the file or product should be listed here, usually with a ® symbol after each name.

OriginalFilename

Typically this is the name of the file when initially distributed. This is useful for verifying that the file has not been renamed at some point.

PrivateBuild

An internal-use build-number. This may be a reference number or ID string that associates the file with records in version-control software, or some other meaningful string. This field is only included in the final resource file if the File Flags option "Private Build" is selected.

ProductName

The official name of the product or project.

ProductVersion

A string containing the version number of the file, for example, "1.02.0003.0004". See Version Options above.

SpecialBuild

Like the Private Build string, this can be used to signify the special build information for the file. Typically this is used to track version numbers of customized versions of the application.

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.

 

See Also

Menu Editor

Creating a menu

Menu accelerators

Menu Tutorial

ID Editor

Tab Order Editor

Selecting/linking dialogs and menus

Test mode