[[project @ 2001-04-20 15:20:34 by rrt] rrt**20010420152034 Drastically simplify the Windows installation instructions, now that we don't need Cygwin. ] { hunk ./ghc/docs/users_guide/installing.sgml 523 -be a bit of a trying experience. This document tries to simplify the task by -enumerating the steps you need to follow in order to set up and configure -your machine to run GHC. +be a bit of a trying experience. It should be much easier now than in the +past, since all the software required to build and use GHC is included in +the InstallShield. hunk ./ghc/docs/users_guide/installing.sgml 528 -System requirements - - -An installation of GHC requires about 50M of disk space (which can be -lowered by choosing a “compact” installation). The Cygwin -support tools take another 200M or so (though if you really need to this can -be halved by installing only the following packages: bash, binutils, cygwin, -diff, fileutils, findutils, gcc, grep, make, perl, mingw, sed, textutils, -w32api; however, it's fiddly and not recommended, and if you're trying to -build rather than just use GHC, you need many more, so you might as well -install the lot). To run GHC -comfortably, your machine should have at least 64M of memory. - - - - - -Software required - - -You need two chunks of software other than GHC itself: the Cygwin toolchain, and Perl. Here's how to get and install them. - - -The Cygwin toolchain (1.1.x) - - -At the moment you'll need Cygwin to use GHC. Cygwin dresses up the Win32 -environment into something more UNIX-like; (notably, it provides -gcc, as and ld). -You also need Cygwin to use CVS. - - - -Important grungy information about Cygwin: - - - - - - -Cygwin doesn't deal well with filenames that include -spaces. "Program Files" and "Local files" are -common gotchas. - - - - - -Cygwin implements a symbolic link as a text file with some -magical text in it. So programs that don't use Cygwin's -I/O libraries won't recognise such files as symlinks. -In particular, programs compiled by GHC are meant to be runnable -without having Cygwin, so they don't use the Cygwin library, so -they don't recognise symlinks. - - - - - - -Here's how to install Cygwin. - - - - - - -Install the latest Cygwin 1.1.x from sources.redhat.com/cygwin. -If you have a pre-1.1 version, you should deinstall this first. Choose DOS -text file type. - - - - - -Create C:/Temp if it doesn't already exist; substitute -the drive you installed Cygwin on for C:. - - - - - -If you're an Emacs user and want to be able to run bash -from within a shell buffer, see the NT Emacs home page for -instructions on how to set this up. - - - - - - - - -Environment variables - hunk ./ghc/docs/users_guide/installing.sgml 529 -In case you don't already know how to set environment variables on a Windows -machine, here's how. On WinNT/Win2k, to edit your PATH -variable (for example), do the following: +An installation of GHC requires about 70M of disk space (which can be +reduced by choosing a “compact” installation). +To run GHC comfortably, your machine should have at least +64M of memory. hunk ./ghc/docs/users_guide/installing.sgml 535 - -Press Start/Settings/Control Panels -Double-click System -Press Advanced -Press Environment Variables -Under System Variables, select PATH -Press Edit -Add ";C:\whatever" to the end of the string (for example) -Press OK - - - -Some environment variables are “user variables” and -some are “system variables”. I'm not sure of the difference -but both are changed though the same dialogue. - - - -In addition, when running bash -you can set environment variables in your .bashrc file. -But it is better to set your environment variables from the -control panel (they get inherited by bash) because then they are visible -to applications that aren't started by bash. For example, -when you're invoking CVS (and ssh) via Emacs keybindings; -it invokes cvs.exe without going via bash. - - - -On a Win9x machine you need to edit autoexec.bat using -Windows/System/Sysedit. You must reboot to make -the new settings take effect. - - - -The following environment variables must be set: - - - - - - - - - - -PATH -System - -Add C:\usr\bin. -This should come before the Windows system directories -(e.g. \WINNT\system32). - - - - -SHELL -User - -C:/usr/bin/bash. - - - - -HOME -User - -Set to point to your home directory (normally under -C:/WINNT/Profiles on Win2k). This is where, for example, -bash will look for your .bashrc -file. - - - - -MAKE_MODE -User - -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 - - - -TMPDIR -User - -Set to C:/Temp. For some reason, Win2k invisibly sets this variable to point to a temporary directory in your profile, that contains embedded spaces. If GHC sees the TMPDIR variable set, it tries to use it for temporary files, but Cygwin doesn't grok filenames with spaces, so disaster results. - -Furthermore, it seems that TMPDIR must be set to a directory in the same file system in which you invoke GHC. Otherwise you get very weird messages when you invoke GHC, such as: - -does not exist -Action: openFile -Reason: file does not exist /Temp/ghc11068.cpp -We think this is due to a bug in Cygwin. - - - - - - - - - -In addition, we've had problems in the past with certain environment -variables being set that seem to have bad effects on GHC. If you have -installed other systems ported from Unix, you might too. If you get weird -inexplicable failures to build GHC, then it might be worth weeding out unused -environment variables. Known culprits from the past include -GCC_EXEC_PREFIX and INCLUDE. - - - - - - hunk ./ghc/docs/users_guide/installing.sgml 539 -Download the latest GHC distribution: - - - - - -ghc-4.08 InstallShield installer, 15M: - - - hunk ./ghc/docs/users_guide/installing.sgml 547 -Note: The cygwin support for long file names containing +Note: The Cygwin support for long file names containing hunk ./ghc/docs/users_guide/installing.sgml 558 +Also, if the directory C:/TEMP doesn't already exist, +you should create it. hunk ./ghc/docs/users_guide/installing.sgml 563 -Note: If you haven't got perl already installed, you will have to manually -copy the perl.exe binary from the ghc -bin/ into your /bin directory -before continuing—the installer will not currently do this. - - - - - - - - -Make sure that you set all the environment variables described above -under Cygwin installation, including TMPDIR. - - hunk ./ghc/docs/users_guide/installing.sgml 583 - Further information on using GHC under Windows can be found in +Further information on using GHC under Windows can be found in +manual. + }