next up previous
Next: Installation of SWAN on Up: swanimp Previous: The material


Use of patch files

Between releases of authorised SWAN versions, it is possible that bug fixes or new features are published on the SWAN web page. These are provided by patch files that can be downloaded from the web site. Typically, a patch can be installed over the top of the existing source code. Patches are indicated by a link to patchfile. The names refer to the current version number supplemented with letter codes. The first will be coded 'A' (i.e. 41.20.A), the second will be coded 'B', the third will be coded 'C', etc. The version number in the resulting output files will be updated to 41.20ABC, indicating the implemented patches.


To use a patch file, follow the next instructions:

  1. download the file (right-click the file and choose save link as)
  2. place it in the directory where the source code of SWAN is located
  3. execute patch -p0 < patchfile
After applying a patch or patches, you need to recompile the SWAN source code.


It is important to download the patch and not cut and paste it from the display of your web browser. The reason for this is that some patches may contain tabs, and most browsers will not preserve the tabs when they display the file. Copying and pasting that text will cause the patch to fail because the tabs would not be found. If you have trouble with patch, you can look at the patch file itself.


Note to UNIX/Linux users: the downloaded patch files are MS-DOS ASCII files and contain carriage return (CR) characters. To convert these files to UNIX format, use the command dos2unix. Alternatively, execute cat 41.20.[A-C] | tr -d ' \r' | patch that apply the patch files 41.20.A to 41.20.C to the SWAN source code at once after which the conversion is carried out.


Note to Windows users: patch is a UNIX command. Download the patch program from the SWAN web site, which is appropriate for Windows operating system (7/8.1/10).


next up previous
Next: Installation of SWAN on Up: swanimp Previous: The material
The SWAN team 2017-10-26