# Installation steps for Windows

This is a contribution by Kevin S. Millikin:

1. Download the fxp sources. Save the file where you would like the fxp source directory to reside. For instance, I just installed mine in `/cygdrive/d/xml`.
2. In the Cygwin bash shell, cd to the directory containing the source tarball, and unzip and detar it. Then, cd to the directory containing the fxp sources

       cd /cygdrive/d/xml
       tar -zxvf fxp.tar.gz
       cd fxp-1.4.6

3. Read the `COPYRIGHT`.
4. Edit the `Makefile` to reflect the situation at your site. Change the line specifying where to install the fxp binaries and libraries from

       PREFIX     = /home/berlea/xmlsoft

   to something like

       PREFIX     = /cygdrive/d/xml

   Change the line specifying the path to the SML/NJ executable to the correct path to the executable, from

       SML_BINDIR = /usr/share/smlnj/bin

   to something like

       SML_BINDIR = /cygdrive/d/smlnj-110.43/bin

   Finally, the Cygwin version of `mkdirhier` is buggy. Replace the line

       MKDIRHIER = mkdirhier

   with

       MKDIRHIER = mkdir -p

5. Unix versions of SML/NJ come equipped with a shell script called `.arch-n-opsys` that reports the processor architecture and operating system. The Win32 versions do not include this shell script. `fxp`'s build process relies on the presence of this script. The easiest thing to do is place a script in the same directory as your `sml` binary.

       #!/bin/sh
       #
       # .arch-n-opsys  -- get architecture and system info
       # This file is hacked to run with the Windows version

       echo "ARCH=x86; OPSYS=win32; HEAP_SUFFIX=x86-win32"

   Call this file `.arch-n-opsys`. Notice that it's really a big cheat. Make sure that it is executable

       chmod a+x .arch-n-opsys

6. Now, you can make all

       make

7. If that succeeded, you can install the binaries and libraries

       make install