How to have patches added into a preinstalled standalone KPML image?

Why should I?


Standalone images are provided for running KPML, developing grammar resources, and doing generation without the need of obtaining and installing a standard Lisp product. These will, however, often not be the very latest KPML version that is available. Bug fixes and small, but useful, increments in functionality are provided regularly in response to user requirements or suggestions. These additions are made available in the released patch files as described on the main page and become available after the release of the standalones.

To solve this problem, KPML standalone images now allow you to add the functionality of the latest patches even without having a Lisp product on hand. This means that you can maintain a version of KPML that is completely up to date without having to download the large image files each time an improvement is made.

The Method...


To have a KPML standalone image recognise that there are patches to be included and to use those patches, you have to tell KPML where those patches are. This is done in the KPML configuration file, called by default kpmlconf. Whenever KPML starts it looks in several standard places on your machine to see if it can find a configuration file; if it is successful it loads this file in. The configuration file contains a variety of settings that localize KPML's behaviour on your machine.The possible settings are described elsewhere. Here what is relevant are the settings that tell KPML if, and where, it should look for patches. The simplest place to place the configuration file so that KPML can find it is in the same directory as the standalone image that you are using. A good starting point for a configuration file is available here. Download it.

To use the latest patches you must download the latest patch set. This is as given on the main KPML page.The patchset is a zipped file that contains a single directory/folder called 'patches'. You should decide where you are going to keep your patches (it is easiest if you decide once and for all; that way you will only need to edit your configuration file once). A suitable place might be a folder/directory called 'kpml32'. You should then extract the contents of the zipped file to this location. The result must be a directory structure that contains the new folder/directory 'patches' directly under the 'kpml32' folder/directory.

Let us presume that this is then something like (for Windows) "C:\kpml32\patches\..." or (for Unix) "~/kpml32/patches/...".

The final step is to edit the configuration file that you have downloaded (above) so that the appropriate entries are present to tell KPML, first, that you want to load patches and, second, where you have put the patches you want used. The relevant lines are indicated in the file. The first relevant line should be changed as follows. The second and third lines are by default commented out so you have to activate them by removing the comment marks and entering the directory chosen for storing the patches.. For our assumed folder/directory above the final result should look as follows:

*load-patches* "C:\\kpml32\\patches\patch-defsys.lisp"
common-lisp-user::*root-of-kpml* "C:\\kpml32\\"
common-lisp-user::*kpml-binaries-root* "C:\\kpml32\\"

The double "\\" are for backslashes only, as a single backslash "\" has a special meaning.

The Results...


Once you have carried out the above steps, starting a KPML standalone image (or a non-standalone if you are using a full compiled and installed KPML version on Windows or Unix) will automatically retrieve and load the patches that you have downloaded. The starting messages will include a list of the patches being installed. You can see the final result in the patch level number in the Window title of the main KPML window. This number should then be the same (or higher) than the patch level reported in the main KPML window from which you retrieved the patches. In the window below, for example, KPML version 3.2 has been patched to patch level 62.