Raptor self version check

Starting with 2.16.16, Raptor has the capability to validate its own version against a regular expression specified in the SDK. This regular expression defines a range of versions of Raptor deemed compatible.

In addition to this, SDK creators can also specify a version description message that is displayed to users when using an incompatible version.

Usage

The recommendation is that the 'generic' variant in the XML file in epoc32/sbs_config/ is extended to enable the version check. To do this, an 'env' tag should be added as a child element of the 'generic' variant. This 'env' tag must specify the following attributes and values (note that the values are case sensitive):

Attribute Value
'name' 'SBS'
'default' 'sbs'
'type' 'tool'
'versionCommand' '$(SBS) --version'
'versionResult' A regular expression matching the required versions. It is an error if
the version of the currently running version of Raptor does not match this.
'versionDescription' A message to display to users if the version check fails


Below is an example of an 'env' attribute (with one attribute per line for clarity):
<env 
name='SBS' 
default='sbs' 
type='tool' 
versionCommand='$(SBS) --version' 
versionResult='2\.17\.[0-9]+' 
versionDescription='SBS v2.17.0 or newer is required for this SDK.' 
/>
In this example, the 'versionResult' attribute specifies that any of the versions 2.17.x can be used with the SDK. The 'versionDescription' attribute's value could be extended to give more specific details.

Command line usage

In the SDK's, the 'armv5' group is redefined to have the 'generic' variant on by default. The effect of this is that any build that uses the 'generic' variant will have the Raptor self version check by default.

An error is always raised if the version check fails. If '-k' is passed to Raptor, the build will continue, and without '-k', the build will stop.

Note

Starting with 2.16.4, the sbs.bat and sbs shell scripts set the SBS environment variable, so it is available in the build, and in particular for the version check.