If you are developing an application to be provided as a complete user-installable package, you probably want to automate as much as possible of this. Ideally, you would like the user to need only to execute a single program to install both QM and the application software. This section describes one way to do this.
On Windows systems, we recommend use of the Astrum InstallWizard from Thraex Software (as used by QM itself) but the following process should map onto other self-installer packages.
Whatever installer package you use, it needs to install both QM and the application. The complication is that this process needs to run QM to create the account that will hold the application. The steps to achieve this are:
1. | Unpack all the application files to wherever they need to go. The directory that will become the application account can be created during this process but the only QM specific subdirectory that should be created is the private catalogue (cat). You can place your own application install program into the cat subdirectory for later use. If you need to pre-load dictionary items or data file records, these should be unpacked into a temporary location. |
2. | The self-extracting file must also include the relevant version of QM as its own self-extracting file. This should be unpacked into a temporary directory. |
3. | Once everything has been unpacked, the process now needs to install QM by executing the QM self-extracting program. On Windows systems, use of the /silent command line option will suppress most user interaction. |
4. | Now that QM is installed (or upgraded), you need to use it to create the application account. The process should check whether the account already exists by looking for the VOC file and, if not, execute QM with a single command line option of |
"CREATE.ACCOUNT account.name account.path NO.QUERY".
The quotes are required in this command and the working directory should be the QMSYS account. The CREATE.ACCOUNT command will not fail if the cat subdirectory already exists.
5. | Next, you need to execute your own application installer program that should have been included in the contents of the unpacked private catalogue directory. This is done by executing QM with a command line option that is the catalogued item name and with a working directory of the newly created account. |
6. | Finally, you need to remove any temporary files. |
So, what does the catalogued install program need to do?
• | We recommend that it should start by executing a COMO command to create a log file of its progress. |
• | Create any application files that do not already exist. |
• | Copy dictionary items from a temporary set of dictionaries unpacked from the install file. By doing this rather than simply overwriting the dictionaries, anything that had been added will not be lost when updating an existing installation. |
• | Build any indices that are required. |
• | Create any application specific VOC entries such as paragraphs and sentences. |
|