[project @ 2003-12-16 16:18:08 by simonpj]
[ghc-hetmet.git] / ghc / docs / users_guide / installing.sgml
index e430ac1..f96494e 100644 (file)
@@ -548,23 +548,28 @@ URL="http://www.haskell.org/ghc">haskell.org</ULink>.
 </para></listitem>
 
 <listitem><para>Run <Filename>setup.exe</Filename>.
-(If you have a previous version of GHC, Installshield will offer to "modify", 
+On Windows, all of GHC's files are installed in a single directory.
+If you choose ``Custom'' from the list of install options, you will be given a 
+choice about where this directory is; otherwise it will be installed 
+in <filename>c:/ghc/<replaceable>ghc-version</replaceable></filename>.
+The executable binary for GHC will be installed in the <filename>bin/</filename> sub-directory
+of the installation directory you choose.
+</para>
+<para>(If you have already installed the same version of GHC, Installshield will offer to "modify", 
 or "remove" GHC.  Choose "remove"; then run <Filename>setup.exe</Filename> a
 second time.  This time it should offer to install.)
 </para>
 <para>
-At this point you should find GHCi and the GHC documentation are 
+When installation is complete, you should find GHCi and the GHC documentation are 
 available in your Start menu under "Start/Programs/Glasgow Haskell Compiler".
 </para>
 </listitem>
 
 <listitem><para>
-The final dialogue box from the install process tells you where GHC has
-been installed.  If you want to invoke GHC from a command line, add this 
-to your PATH environment variable.  Usually, GHC installs into
-<Filename>c:/ghc/ghc-5.02</Filename>, though the last part of this path
-depends on which version of GHC you are installing, of course. 
-You need to add <Filename>c:/ghc/ghc-5.02/bin</Filename> to your path if yo
+The final dialogue box from the install process reminds you where the GHC binary 
+has been installed (usually <filename>c:/ghc/<replaceable>ghc-version</replaceable>/bin/</filename>.  
+If you want to invoke GHC from a command line, add this 
+to your PATH environment variable.  
 </para></listitem>
 
 <listitem><para>
@@ -703,22 +708,23 @@ the implementation.
 <para> GHC is installed in two directory trees:</para>
 <variablelist>
 <varlistentry>
-<term>Binary directory</term>
-<listitem> <para> known as <Filename>$(bindir)</Filename>, holds executables that 
-the user is expected to invoke.  Notably,
-<Filename>ghc</Filename> and <Filename>ghci</FileName>.  On Unix, this directory
-is typically something like <Filename>/usr/local/bin</Filename>.  On Windows,
-however, this directory is always <Filename>$(libdir)/bin</Filename>.
-</para>
-</listitem>
-</varlistentry>
-<varlistentry>
 <term>Library directory,</term>
 <listitem> <para> known as <Filename>$(libdir)</Filename>, holds all the 
 support files needed to run GHC.  On Unix, this 
 directory is usually something like <Filename>/usr/lib/ghc/ghc-5.02</Filename>. </para>
 </listitem>
 </varlistentry>
+<varlistentry>
+<term>Binary directory</term>
+<listitem> <para> known as <Filename>$(bindir)</Filename>, holds executables that 
+the user is expected to invoke.
+Notably, it contains
+<Filename>ghc</Filename> and <Filename>ghci</FileName>.  On Unix, this directory
+can be anywhere, but is typically something like <Filename>/usr/local/bin</Filename>.  On Windows,
+however, this directory <emphasis>must be</emphasis> <Filename>$(libdir)/bin</Filename>.
+</para>
+</listitem>
+</varlistentry>
 </variablelist>
 
 <para>
@@ -740,14 +746,41 @@ one wins.]
 <para> On Windows (but not Unix), if no <option>-B</option> flag is given, GHC uses a system
 call to find the directory in which the running GHC executable lives, and derives 
 <Filename>$(libdir)</Filename> from that. [Unix lacks such a system call.]
+That is why <Filename>$(bindir)</Filename> must be <Filename>$(libdir)/bin</Filename>.
 </para>
 </listitem>
 </itemizedlist>
 
-<sect2> <title>Layout of the library directory</title>
+<sect2> <title>The binary directory</title>
 
-<para>The layout of the library directory is almost identical on
-Windows and Unix, as follows: layout:</para>
+<para>The binary directory, <Filename>$(bindir)</Filename> contains user-visible
+executables, notably <filename>ghc</filename> and <filename>ghci</filename>.
+You should add it to your <literal>$PATH</literal>
+</para>
+
+<para>On Unix, the user-invokable <filename>ghc</filename> invokes <filename>$(libdir)/ghc-<replaceable>version</replaceable></filename>,
+passing a suitable <option>-B</option> flag to tell <filename>ghc-<replaceable>version</replaceable></filename> where
+<Filename>$(libdir)</Filename> is.
+Similarly <filename>ghci</filename>, except the extra flag <literal>--interactive</literal> is passed.
+</para>
+
+<para>On Win32, the user-invokable <filename>ghc</filename> binary 
+is the Real Thing (no intervening
+shell scripts or <filename>.bat</filename> files). 
+Reason: we sometimes invoke GHC with very long command lines,
+and <filename>cmd.exe</filename> (which executes <filename>.bat</filename> files)
+truncates them.  Similarly <filename>ghci</filename> is a C wrapper program that invokes <filename>ghc --interactive</filename>
+(passing on all other arguments), not a <filename>.bat</filename> file.
+</para>
+
+
+</sect2>
+
+<sect2> <title>The library directory</title>
+
+<para>The layout of the library directory, <filename>$(libdir)</filename> is almost identical on
+Windows and Unix, as follows.  Differences between Windows and Unix
+are noted thus <literal>[Win32 only]</literal> and are commented below.</para>
 
 <programlisting>
   $(libdir)/
@@ -756,7 +789,7 @@ Windows and Unix, as follows: layout:</para>
     
     bin/                   [Win32 only]  User-visible binaries
          ghc.exe
-         ghci.bat
+         ghci.exe
 
     unlit                  Remove literate markup
     
@@ -805,24 +838,8 @@ Windows and Unix, as follows: layout:</para>
     HSlang.o                  not grok .a files yet)
 </programlisting>
 
-<para>Note that:</para>
+<para>Note that:
 <itemizedlist>
-<listitem>
-<para>On Win32, the <filename>$(libdir)/bin</filename> directory contains user-visible binaries; 
-add it to your <filename>PATH</filename>.  The <filename>ghci</filename> executable is a <filename>.bat</filename>
-file which invokes <filename>ghc</filename>.   </para>
-
-<para>The GHC executable is the Real Thing (no intervening
-shell scripts or <filename>.bat</filename> files).  
-Reason: we sometimes invoke GHC with very long command lines,
-and <filename>cmd.exe</filename> (which executes <filename>.bat</filename> files)
-truncates them.  [We assume people won't invoke ghci with very long
-command lines.]</para>
-
-<para>On Unix, the user-invokable <filename>ghc</filename> invokes <filename>$(libdir)/ghc-<replaceable>version</replaceable></filename>,
-passing a suitable <option>-B</option> flag. 
-</para>
-</listitem>
 
        <listitem>
          <para><filename>$(libdir)</filename> also contains support
@@ -859,6 +876,7 @@ with the Win32 distribution of GHC. </para>
           with GHC, rather than assume some installed one.  </para>
        </listitem>
 </itemizedlist>
+</para>
 
 </sect2>