hgbook

annotate 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
rev   line source
bos@559 1 <!-- vim: set filetype=docbkxml shiftwidth=2 autoindent expandtab tw=77 : -->
bos@85 2
bos@559 3 <appendix id="chap:srcinstall">
bos@559 4 <title>Installing Mercurial from source</title>
bos@85 5
bos@559 6 <sect1 id="sec:srcinstall:unixlike">
bos@559 7 <title>On a Unix-like system</title>
bos@85 8
bos@559 9 <para>If you are using a Unix-like system that has a sufficiently
bos@559 10 recent version of Python (2.3 or newer) available, it is easy to
bos@559 11 install Mercurial from source.</para>
bos@559 12 <orderedlist>
bos@559 13 <listitem><para>Download a recent source tarball from <ulink
bos@559 14 url="http://www.selenic.com/mercurial/download">http://www.selenic.com/mercurial/download</ulink>.</para>
bos@559 15 </listitem>
bos@559 16 <listitem><para>Unpack the tarball:</para>
bos@559 17 <programlisting>gzip -dc mercurial-MYVERSION.tar.gz | tar xf -</programlisting>
bos@559 18 </listitem>
bos@559 19 <listitem><para>Go into the source directory and run the
bos@559 20 installer script. This will build Mercurial and install it
bos@559 21 in your home directory.</para>
bos@559 22 <programlisting>cd mercurial-MYVERSION
bos@559 23 python setup.py install --force --home=$HOME</programlisting>
bos@559 24 </listitem>
bos@559 25 </orderedlist>
bos@559 26 <para>Once the install finishes, Mercurial will be in the
bos@559 27 <literal>bin</literal> subdirectory of your home directory.
bos@559 28 Don't forget to make sure that this directory is present in your
bos@559 29 shell's search path.</para>
bos@85 30
bos@559 31 <para>You will probably need to set the <envar>PYTHONPATH</envar>
bos@559 32 environment variable so that the Mercurial executable can find
bos@559 33 the rest of the Mercurial packages. For example, on my laptop,
bos@559 34 I have set it to <literal>/home/bos/lib/python</literal>. The
bos@559 35 exact path that you will need to use depends on how Python was
bos@559 36 built for your system, but should be easy to figure out. If
bos@559 37 you're uncertain, look through the output of the installer
bos@559 38 script above, and see where the contents of the
bos@559 39 <literal>mercurial</literal> directory were installed to.</para>
bos@85 40
bos@559 41 </sect1>
bos@559 42 <sect1>
bos@559 43 <title>On Windows</title>
bos@85 44
bos@559 45 <para>Building and installing Mercurial on Windows requires a
bos@559 46 variety of tools, a fair amount of technical knowledge, and
bos@559 47 considerable patience. I very much <emphasis>do not
bos@559 48 recommend</emphasis> this route if you are a <quote>casual
bos@559 49 user</quote>. Unless you intend to hack on Mercurial, I
bos@559 50 strongly suggest that you use a binary package instead.</para>
bos@85 51
bos@559 52 <para>If you are intent on building Mercurial from source on
bos@559 53 Windows, follow the <quote>hard way</quote> directions on the
bos@559 54 Mercurial wiki at <ulink
bos@559 55 url="http://www.selenic.com/mercurial/wiki/index.cgi/WindowsInstall">http://www.selenic.com/mercurial/wiki/index.cgi/WindowsInstall</ulink>,
bos@559 56 and expect the process to involve a lot of fiddly work.</para>
bos@559 57
bos@559 58 </sect1>
bos@559 59 </appendix>
bos@559 60
bos@559 61 <!--
bos@559 62 local variables:
bos@559 63 sgml-parent-document: ("00book.xml" "book" "appendix")
bos@559 64 end:
bos@559 65 -->