view en/appC-srcinstall.xml @ 724:cfdb601a3c8b

Fix imagedata fileref in xml files, and replace ':' with '.' in id attribute
author Dongsheng Song <dongsheng.song@gmail.com>
date Thu, 12 Mar 2009 15:51:39 +0800
parents 13513d2a128d
children 7e7c47481e4f
line wrap: on
line source

<!-- vim: set filetype=docbkxml shiftwidth=2 autoindent expandtab tw=77 : -->

<appendix id="chap.srcinstall">
  <?dbhtml filename="installing-mercurial-from-source.html"?>
  <title>Installing Mercurial from source</title>

  <sect1 id="sec.srcinstall.unixlike">
    <title>On a Unix-like system</title>

    <para>If you are using a Unix-like system that has a sufficiently
      recent version of Python (2.3 or newer) available, it is easy to
      install Mercurial from source.</para>
    <orderedlist>
      <listitem><para>Download a recent source tarball from <ulink
	    url="http://www.selenic.com/mercurial/download">http://www.selenic.com/mercurial/download</ulink>.</para>
      </listitem>
      <listitem><para>Unpack the tarball:</para>
	<programlisting>gzip -dc mercurial-MYVERSION.tar.gz | tar xf -</programlisting>
      </listitem>
      <listitem><para>Go into the source directory and run the
	  installer script.  This will build Mercurial and install it
	  in your home directory.</para>
	<programlisting>cd mercurial-MYVERSION
python setup.py install --force --home=$HOME</programlisting>
      </listitem>
    </orderedlist>
    <para>Once the install finishes, Mercurial will be in the
      <literal>bin</literal> subdirectory of your home directory.
      Don't forget to make sure that this directory is present in your
      shell's search path.</para>

    <para>You will probably need to set the <envar>PYTHONPATH</envar>
      environment variable so that the Mercurial executable can find
      the rest of the Mercurial packages.  For example, on my laptop,
      I have set it to <literal>/home/bos/lib/python</literal>.  The
      exact path that you will need to use depends on how Python was
      built for your system, but should be easy to figure out.  If
      you're uncertain, look through the output of the installer
      script above, and see where the contents of the
      <literal>mercurial</literal> directory were installed to.</para>

  </sect1>
  <sect1>
    <title>On Windows</title>

    <para>Building and installing Mercurial on Windows requires a
      variety of tools, a fair amount of technical knowledge, and
      considerable patience.  I very much <emphasis>do not
	recommend</emphasis> this route if you are a <quote>casual
	user</quote>.  Unless you intend to hack on Mercurial, I
      strongly suggest that you use a binary package instead.</para>

    <para>If you are intent on building Mercurial from source on
      Windows, follow the <quote>hard way</quote> directions on the
      Mercurial wiki at <ulink
	url="http://www.selenic.com/mercurial/wiki/index.cgi/WindowsInstall">http://www.selenic.com/mercurial/wiki/index.cgi/WindowsInstall</ulink>, 
      and expect the process to involve a lot of fiddly work.</para>

  </sect1>
</appendix>

<!--
local variables: 
sgml-parent-document: ("00book.xml" "book" "appendix")
end:
-->