11. Notes for building under Windows

This section summarises how to get the utilities you need on your Win95/98/NT/2000 machine to use CVS and build GHC. Similar notes for installing and running GHC may be found in the user guide. In general, Win95/Win98 behave the same, and WinNT/Win2k behave the same. You should read the GHC installation guide sections on Windows (in the user guide) before continuing to read these notes.

Because of various hard-wired infelicities, you need to copy bash.exe (from GHC's extra-bin directory), and perl.exe and cat.exe (from GHC's bin directory) to /bin (discover where your Cygwin root directory is by typign mount).

Before you start, you need to make sure that the user environment variable MAKE_MODE is set to UNIX. If you don't do this you get very weird messages when you type make, such as:

/c: /c: No such file or directory

11.1. Configuring ssh

11.2. Configuring CVS

There is a very nice graphical front-end to CVS for Win32 platforms, with a UI that people will be familiar with, at wincvs.org. I have not tried it yet.

11.3. Building GHC

11.4. Building the Windows InstallShield® Installer

This section is intended for GHC developers only; no-one else should need to build an InstallShield.

Having built a second-stage tree and done make install on it, open the InstallShield (.ism) file. Open the Project screen, and then the Project subfolder of the Path variables folder, and set SourceFiles to the top of your tree. You might also need to set GHCBITS to point to the tree of various external bits that are added into the IS mix. You should then be able to build an InstallShield.

11.4.1. Extra features of the InstallShield

The InstallShield has some IS-specific twiddles:

  • Two registry entries are set under HKEY_LOCAL_MACHINE\SOFTWARE\GHC: Path and Version, which record respectively the directory in which GHC was installed, and the version number.

  • The InstallShield adds some entries to the Program menu, for GHCi and for the documentation. See under Setup Design and the individual components (each component can add entries to the menu).

11.4.2. External add-ins

The external add-ins consist of Mingwin gcc and Mingwin Perl. The layout of the add-ins tree is as follows:
extra-bin/
  gcc.exe
  perl.exe    (Mingwin perl)
  perl56.dll
gcc-lib/
  Mingwin gcc binaries, libraries and headers
imports/
  com/
    imports for HDirect's com library
include/
  Mingwin includes