hgbook

diff en/srcinstall.tex @ 381:7ca1186c422f

testing push
author Javier Rojas <jerojasro@devnull.li>
date Wed Oct 29 23:47:29 2008 -0500 (2008-10-29)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/en/srcinstall.tex	Wed Oct 29 23:47:29 2008 -0500
     1.3 @@ -0,0 +1,53 @@
     1.4 +\chapter{Installing Mercurial from source}
     1.5 +\label{chap:srcinstall}
     1.6 +
     1.7 +\section{On a Unix-like system}
     1.8 +\label{sec:srcinstall:unixlike}
     1.9 +
    1.10 +If you are using a Unix-like system that has a sufficiently recent
    1.11 +version of Python (2.3~or newer) available, it is easy to install
    1.12 +Mercurial from source.
    1.13 +\begin{enumerate}
    1.14 +\item Download a recent source tarball from
    1.15 +  \url{http://www.selenic.com/mercurial/download}.
    1.16 +\item Unpack the tarball:
    1.17 +  \begin{codesample4}
    1.18 +    gzip -dc mercurial-\emph{version}.tar.gz | tar xf -
    1.19 +  \end{codesample4}
    1.20 +\item Go into the source directory and run the installer script.  This
    1.21 +  will build Mercurial and install it in your home directory.
    1.22 +  \begin{codesample4}
    1.23 +    cd mercurial-\emph{version}
    1.24 +    python setup.py install --force --home=\$HOME
    1.25 +  \end{codesample4}
    1.26 +\end{enumerate}
    1.27 +Once the install finishes, Mercurial will be in the \texttt{bin}
    1.28 +subdirectory of your home directory.  Don't forget to make sure that
    1.29 +this directory is present in your shell's search path.
    1.30 +
    1.31 +You will probably need to set the \envar{PYTHONPATH} environment
    1.32 +variable so that the Mercurial executable can find the rest of the
    1.33 +Mercurial packages.  For example, on my laptop, I have set it to
    1.34 +\texttt{/home/bos/lib/python}.  The exact path that you will need to
    1.35 +use depends on how Python was built for your system, but should be
    1.36 +easy to figure out.  If you're uncertain, look through the output of
    1.37 +the installer script above, and see where the contents of the
    1.38 +\texttt{mercurial} directory were installed to.
    1.39 +
    1.40 +\section{On Windows}
    1.41 +
    1.42 +Building and installing Mercurial on Windows requires a variety of
    1.43 +tools, a fair amount of technical knowledge, and considerable
    1.44 +patience.  I very much \emph{do not recommend} this route if you are a
    1.45 +``casual user''.  Unless you intend to hack on Mercurial, I strongly
    1.46 +suggest that you use a binary package instead.
    1.47 +
    1.48 +If you are intent on building Mercurial from source on Windows, follow
    1.49 +the ``hard way'' directions on the Mercurial wiki at
    1.50 +\url{http://www.selenic.com/mercurial/wiki/index.cgi/WindowsInstall},
    1.51 +and expect the process to involve a lot of fiddly work.
    1.52 +
    1.53 +%%% Local Variables: 
    1.54 +%%% mode: latex
    1.55 +%%% TeX-master: "00book"
    1.56 +%%% End: