hgbook

diff en/appC-srcinstall.xml @ 559:b90b024729f1

WIP DocBook snapshot that all compiles. Mirabile dictu!
author Bryan O'Sullivan <bos@serpentine.com>
date Wed Feb 18 00:22:09 2009 -0800 (2009-02-18)
parents en/appC-srcinstall.tex@5cd47f721686
children 13513d2a128d
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/en/appC-srcinstall.xml	Wed Feb 18 00:22:09 2009 -0800
     1.3 @@ -0,0 +1,65 @@
     1.4 +<!-- vim: set filetype=docbkxml shiftwidth=2 autoindent expandtab tw=77 : -->
     1.5 +
     1.6 +<appendix id="chap:srcinstall">
     1.7 +  <title>Installing Mercurial from source</title>
     1.8 +
     1.9 +  <sect1 id="sec:srcinstall:unixlike">
    1.10 +    <title>On a Unix-like system</title>
    1.11 +
    1.12 +    <para>If you are using a Unix-like system that has a sufficiently
    1.13 +      recent version of Python (2.3 or newer) available, it is easy to
    1.14 +      install Mercurial from source.</para>
    1.15 +    <orderedlist>
    1.16 +      <listitem><para>Download a recent source tarball from <ulink
    1.17 +	    url="http://www.selenic.com/mercurial/download">http://www.selenic.com/mercurial/download</ulink>.</para>
    1.18 +      </listitem>
    1.19 +      <listitem><para>Unpack the tarball:</para>
    1.20 +	<programlisting>gzip -dc mercurial-MYVERSION.tar.gz | tar xf -</programlisting>
    1.21 +      </listitem>
    1.22 +      <listitem><para>Go into the source directory and run the
    1.23 +	  installer script.  This will build Mercurial and install it
    1.24 +	  in your home directory.</para>
    1.25 +	<programlisting>cd mercurial-MYVERSION
    1.26 +python setup.py install --force --home=$HOME</programlisting>
    1.27 +      </listitem>
    1.28 +    </orderedlist>
    1.29 +    <para>Once the install finishes, Mercurial will be in the
    1.30 +      <literal>bin</literal> subdirectory of your home directory.
    1.31 +      Don't forget to make sure that this directory is present in your
    1.32 +      shell's search path.</para>
    1.33 +
    1.34 +    <para>You will probably need to set the <envar>PYTHONPATH</envar>
    1.35 +      environment variable so that the Mercurial executable can find
    1.36 +      the rest of the Mercurial packages.  For example, on my laptop,
    1.37 +      I have set it to <literal>/home/bos/lib/python</literal>.  The
    1.38 +      exact path that you will need to use depends on how Python was
    1.39 +      built for your system, but should be easy to figure out.  If
    1.40 +      you're uncertain, look through the output of the installer
    1.41 +      script above, and see where the contents of the
    1.42 +      <literal>mercurial</literal> directory were installed to.</para>
    1.43 +
    1.44 +  </sect1>
    1.45 +  <sect1>
    1.46 +    <title>On Windows</title>
    1.47 +
    1.48 +    <para>Building and installing Mercurial on Windows requires a
    1.49 +      variety of tools, a fair amount of technical knowledge, and
    1.50 +      considerable patience.  I very much <emphasis>do not
    1.51 +	recommend</emphasis> this route if you are a <quote>casual
    1.52 +	user</quote>.  Unless you intend to hack on Mercurial, I
    1.53 +      strongly suggest that you use a binary package instead.</para>
    1.54 +
    1.55 +    <para>If you are intent on building Mercurial from source on
    1.56 +      Windows, follow the <quote>hard way</quote> directions on the
    1.57 +      Mercurial wiki at <ulink
    1.58 +	url="http://www.selenic.com/mercurial/wiki/index.cgi/WindowsInstall">http://www.selenic.com/mercurial/wiki/index.cgi/WindowsInstall</ulink>, 
    1.59 +      and expect the process to involve a lot of fiddly work.</para>
    1.60 +
    1.61 +  </sect1>
    1.62 +</appendix>
    1.63 +
    1.64 +<!--
    1.65 +local variables: 
    1.66 +sgml-parent-document: ("00book.xml" "book" "appendix")
    1.67 +end:
    1.68 +-->