hgbook

view en/appC-srcinstall.xml @ 685:6b7818eb3d8e

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