From b009c5be607316734874228d4bb144ee3a015e91 Mon Sep 17 00:00:00 2001 From: rrt Date: Fri, 14 Jan 2000 19:14:26 +0000 Subject: [PATCH] [project @ 2000-01-14 19:14:26 by rrt] SPJ's Windows installation notes added in. --- ghc/docs/users_guide/installing.sgml | 180 +++++++++++++++++++++++++++++++++- 1 file changed, 176 insertions(+), 4 deletions(-) diff --git a/ghc/docs/users_guide/installing.sgml b/ghc/docs/users_guide/installing.sgml index a7181a3..16914d3 100644 --- a/ghc/docs/users_guide/installing.sgml +++ b/ghc/docs/users_guide/installing.sgml @@ -564,7 +564,50 @@ To run GHC comfortably, your machine should have at least 32M of memory. -Software required +Your environment variables + + +Much of the Unixy stuff below involves setting environment variables. For example, on WinNT/Win2k, to edit your PATH variable, +do the following: + + + +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 a Cygwin (see ) shell +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 need to reboot to make +the new settings take effect. + + + + + +Software required @@ -574,9 +617,139 @@ To run GHC comfortably, your machine should have at least 32M of memory. GHC depends at the moment on the cygwin tools to operate, which dresses up the Win32 environment into something more UNIX-like. (notably, it provides gcc, as and ld), -so you'll need to install these tools first. +so you'll need to install these tools first. 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. + + + + + + +Download cygwin, beta20.1 (full.exe) from +sourceware.cygnus.com +Install this somewhere locally. + + + + + +Create the following directories (if they aren't already there): + + + +c:/etc +c:/bin +c:/usr/local/bin + + + +(using mkdir -p /bin, etc.) + + + +Add the two bin directories to your PATH. + + + + + +Copy bash.exe from the bin directory of the cygwin tree (cygwin-b20/H-i586-cygwin32/bin/bash.exe) to +/bin as sh.exe. This is where Emacs looks for a shell (I think). + + + + + +You might think that it was easier to use bash directly from it original +Cygwin directory, but (a) some UNIX utils have got /bin/sh hardwired in, and (b) the path following #! is limited to 32 characters. + + + + + +Add C:\cygnus\cygwin-b20\H-i586-cygwin32\bin to your PATH. +bash needs this, and when it is invoked from /bin it can't +find it. + + + + + +Set your SHELL user environment variable to c:/bin/sh. + + + + + +Set your HOME user environment variable to point to your +home directory. This is where, for example, +bash will look for your .bashrc +file. + + + + + +Set your MAKE_MODE user environment variable 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 + + + + + +Set the TMPDIR user environment variable to /tmp. 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. + + + + + +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. + + + + + + @@ -665,8 +838,7 @@ Download a GHC distribution: -Packaged up using an installer that should be familiar-looking to -Windows users. Unpack and double click on setup.exe. +(The version number may change.) It is packaged up using an installer that should be familiar-looking to Windows users. Unpack and double click on setup.exe. -- 1.7.10.4