>> RMVersion 0.02   © Acorn Computers Ltd. 1998

# *********************************** #
# ***    C h a n g e   L i s t    *** #
# *********************************** #
# Date       Name         Description #
# ----       ----         ----------- #
# 25-Jan-98  SNB          Created.    #
# *********************************** #

Version 0.02 can build as a library file exported to the library directory
so that applications can link against it to obtain an API for reading
module versions.  The API is defined in RMVersion.h.  No system variables
are set by the application code/module code version - only the utility
code version sets system variables.

This Utility file is capable of examining RISC OS modules and extracting
their version numbers.  This assists any application or script wishing 
to compare the version numbers of modules and also to allow the version
number of a disc-based module to be verified without having to load it.

Syntax:   RMVersion <ModuleName> [<VarName>] [-file|-rom] [-quiet] 

-quiet ensures that RMVersion exits silently without error if an error has
occurred during its execution.

-rom indicates that <ModuleName> should be looked up only from ROM modules
(including unplugged modules).

-file indicates that <ModuleName> is the name of a file which is a RISC OS
module.

If neither -file nor -rom are specified, then <ModuleName> is looked up in
the currently active modules list.  Hence this will have the same effect
as specifying -rom unless a newer version of <ModuleName> has been
soft-loaded.

If <VarName> is specified, then it is taken as the name of the system
variable that will set to be a numeric value representing the version number
of the module multiplied by 100.  The ability to set the variable name is
provided to simplify handling of modules such as DCS which are stored with
the filename DCS_Quit, as the default would normally be suitable.

If <VarName> is not specified, then the system variable to be set is
generated as:

<Location>$<ModuleLeafName>

where ModuleLeafName is the leafname of the specified <ModuleName> (even
when -file isn't being used), and <Location> depends on the other flags:

	-file	SystemVersion
	-rom	ROMVersion
     <neither>  ModuleVersion

Hence executing the command "RMVersion Toolbox" sets the system variable
ModuleVersion$Toolbox.  "RMVersion -file System:Modules.Toolbox.Toolbox"
sets the system variable SystemVersion$Toolbox.   "RMVersion -rom Toolbox"
sets the system variable ROMVersion$Toolbox.

Having executed those RMVersion commands on my system (on which I am
using the latest Toolbox module but developing an even newer version)
and doing "*show *version$*", I get:

ModuleVersion$Toolbox(Number) : 139
ROMVersion$Toolbox(Number) : 136
SystemVersion$Toolbox(Number) : 138

Once these values are in system variables, they can be used in *If 
statements, and from anywhere else where system variables are
accessible.  For example, C applications can use getenv() to retrieve
the version strings, removing the necessity for them to have to 
contain code to parse module help strings themselves.

This Utility does not generate any new errors, but does generate module
errors using Resources:$.Resources.Kernel.Messages as its source of the
textual strings.


--
Stewart Brodie
7th December 1998
