The PRODUCT Part of an MSI Version File |
This section is "hidden" within the leading comments in the version file (click for example). The change history follows this section.
When a leading comment line (before first version entry) contains an "=" sign (equal sign by default) then a keyword has been found and some information is assigned to it. A keyword is case insensitive.
It is a trivial change to support more keywords if you wish to add your own (or even remove existing ones). For details on this you will need to look at the start of "VER.MMH". You can make keywords you supply mandatory or optional, if optional you could assign a default value. The "Version File Based Launch Conditions" section demonstrates the addition of a simple keyword.
The value for each keyword is placed into a "PPWIZARD" macro with a name that starts with "ProdInfo." and ends with the name of the keyword (for example "ProdInfo.Description" for the "Description" keyword).
You can reference one keyword within another using normal PPWIZARD syntax.
A keyword can continue over multiple lines if a leading '=' is used on the continued lines (a single space is used to join lines).
A line can be commented out by starting it with two semi-colon characters.
The keywords supported by default by "MAKEMSI.MMH" are:
This value can contain HTML and it can be as long as you like however you may not get to see all in explorer view (tooltips etc).
This information is recorded in the MSI as well as the generated doco. You can also organise your generated MSIs in what I call a "Platform Definition", which is basically a tree structure representing all the software supported on all platforms.
No validation (launch conditions etc) are inserted in the generated MSI as a result of this keyword. See the "Version File Based Launch Conditions" section for some code which will allow you to add launch conditions with a new "OnlyOn" keyword (which it defines).
The most common use of this is to specify a contant GUID for your packages' Upgrade code (with "Guid.UpgradeCode"). In general every one of your MSIs must use a unique GUID for this, if you forget this installation of one package could uninstall another.
The "company.mmh" header adds the following (by default) to the ones listed above:
The default MSI filename is made up of the product name and version information, this keyword allows you to name the MSI the way you'd like.
Note that I recommend that you pass GUIDs as named GUIDs (macros) to make debugging easier.
For Example (in "MyProduct.MM"):
;--- In "MyProduct.MM" ------------------------------------------------------ #define ProductX.Version1 {11111111-1111-1111-1111-111111111111} ;;Define UpgradeCode for product "ProductX" (major version 1) #define ProductX.Version1_VERSION_MIN 1.00.0000 #define ProductX.Version1_VERSION_MAX 1.99.9999 #define ProductX.Version1_PROPERTY MY_CONFIGURED_PROPERTY_NAME #define ProductY {11111111-1111-1111-1111-333333333333} ;;Define UpgradeCode for product "ProductY" (any version) #include "ME.MMH"
And in "MyProduct.VER":
;--- In "MyProduct.VER" (define 2 GUIDS) ------------------------------------ UpgradeCodes = ProductX.Version1 ProductY
Main PRODUCT Options |
Please see the "options for commands" section of the manual.
#define? VER_FILENAME.VER ;;If not empty overrides "VER_REXXEXP_SETS_VER_FILENAME" process #define? VER_FILE_EXTN ver ;;The extension for the "VER" file #define? VER_REXXEXP_SETS_VER_FILENAME \ ;;Generate absolute or relative filename {$FileVar} = FilePart('withoutextn', '<?InputFile>') || '.<$VER_FILE_EXTN>' #define? VER_MAX_ITEMS_IN_HISTORY 100 ;;set to "0" so as to not limit number of entries in the HTML report #define? VER_FILE_TAB_STOP 8 ;;0 = abort if tabs exist #define? VER_PI_REPLACE_MACROS Y ;;Product Keyword values can refer to macros (like other Keyword values) #define? VER_PI_MAKEWEBLINKS N ;;Look for http:// etc to make links? #define? VER_VI_REPLACE_MACROS Y ;;History values can refer to macros #define? VER_PI_EQUAL_CHARS = ;;How keywords are separated from values #define? VER_PRODINFO_VALID_KEYWORD_LIST_EXTRA ;;Allows simple addition of new keywords (value must start with ",") #define? VER_DISPLAY_DEFAULT_PRODINFO_USE \ ;;Used when no keyword, so default used call Info 'KEYWORD "' || @@Keyword || '" is defaulting...' #define? VER_DISPLAY_DEFAULT_PRODINFO_USE_NO_VALUE \ ;;Used when no keyword, but no default either call Info 'KEYWORD "' || @@Keyword || '" was not supplied...' #ifndef VER_PI_JOIN_CHARS ;--- Characters used to "join" prodinfo lines ---------------------------- #evaluate ^VER_PI_JOIN_CHARS^ ^' '^ ;;A single space #endif #( "," ;--- Complete list of supported PRODUCT keywords ------------------------- #define? VER_PRODINFO_VALID_KEYWORD_LIST ProductName ;;The name of the product Description ;;A description of the product (NON-HTML) Installed ;;Where do we support the installation of this product? Note ;;Extra details for the HTML summary <$VER_PRODINFO_VALID_KEYWORD_LIST_EXTRA> ;;Allow easy addition #) ;--- Set up default values -------------------------------------------------- #ifndef VER_DONT_SET_UP_PRODINFO_DEFAULTS ;--- Used if keyword is not supplied ------------------------------------- #define? ProdInfo.Default.Note ;--- Call PPWIZARD's MakeWebLinks()? ------------------------------------- #define? ProdInfo.MakeWebLinks.Note Y #define? ProdInfo.MakeWebLinks.Description Y #endif
The above options are meaningless if you have completely replaced the default handling, for example as demonstrated by the "XML Version File" example.