next up previous
Next: Installation of SWASH on Up: swashimp Previous: The material

Use of patch files

Between releases of authorised SWASH versions, it is possible that bug fixes or new features are published on the SWASH website. These are provided by patch files that can be downloaded from the website. 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. 4.01.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 4.01ABC, 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 SWASH is located
  3. execute patch -p0 < patchfile
After applying a patch or patches, you need to recompile the SWASH 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 4.01.[A-C] | tr -d ' \r' | patch that apply the patch files 4.01.A to 4.01.C to the SWASH 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 SWASH website, which is appropriate for Windows operating system (7/8.1/10).

next up previous
Next: Installation of SWASH on Up: swashimp Previous: The material
The SWASH team 2017-04-06