hgbook
annotate en/srcinstall.tex @ 514:db12ab3b3b25
corrected some typos on the title page.
translated a couple of index entries
translated a couple of index entries
author | Javier Rojas <jerojasro@devnull.li> |
---|---|
date | Sun Jan 18 19:45:33 2009 -0500 (2009-01-18) |
parents | |
children |
rev | line source |
---|---|
bos@85 | 1 \chapter{Installing Mercurial from source} |
bos@85 | 2 \label{chap:srcinstall} |
bos@85 | 3 |
bos@85 | 4 \section{On a Unix-like system} |
bos@85 | 5 \label{sec:srcinstall:unixlike} |
bos@85 | 6 |
bos@85 | 7 If you are using a Unix-like system that has a sufficiently recent |
bos@85 | 8 version of Python (2.3~or newer) available, it is easy to install |
bos@85 | 9 Mercurial from source. |
bos@85 | 10 \begin{enumerate} |
bos@85 | 11 \item Download a recent source tarball from |
bos@85 | 12 \url{http://www.selenic.com/mercurial/download}. |
bos@85 | 13 \item Unpack the tarball: |
bos@85 | 14 \begin{codesample4} |
bos@85 | 15 gzip -dc mercurial-\emph{version}.tar.gz | tar xf - |
bos@85 | 16 \end{codesample4} |
bos@85 | 17 \item Go into the source directory and run the installer script. This |
bos@85 | 18 will build Mercurial and install it in your home directory. |
bos@85 | 19 \begin{codesample4} |
bos@85 | 20 cd mercurial-\emph{version} |
bos@85 | 21 python setup.py install --force --home=\$HOME |
bos@85 | 22 \end{codesample4} |
bos@85 | 23 \end{enumerate} |
bos@85 | 24 Once the install finishes, Mercurial will be in the \texttt{bin} |
bos@85 | 25 subdirectory of your home directory. Don't forget to make sure that |
bos@85 | 26 this directory is present in your shell's search path. |
bos@85 | 27 |
bos@85 | 28 You will probably need to set the \envar{PYTHONPATH} environment |
bos@85 | 29 variable so that the Mercurial executable can find the rest of the |
bos@85 | 30 Mercurial packages. For example, on my laptop, I have set it to |
bos@85 | 31 \texttt{/home/bos/lib/python}. The exact path that you will need to |
bos@85 | 32 use depends on how Python was built for your system, but should be |
bos@85 | 33 easy to figure out. If you're uncertain, look through the output of |
bos@85 | 34 the installer script above, and see where the contents of the |
bos@85 | 35 \texttt{mercurial} directory were installed to. |
bos@85 | 36 |
bos@85 | 37 \section{On Windows} |
bos@85 | 38 |
bos@85 | 39 Building and installing Mercurial on Windows requires a variety of |
bos@85 | 40 tools, a fair amount of technical knowledge, and considerable |
bos@85 | 41 patience. I very much \emph{do not recommend} this route if you are a |
bos@85 | 42 ``casual user''. Unless you intend to hack on Mercurial, I strongly |
bos@85 | 43 suggest that you use a binary package instead. |
bos@85 | 44 |
bos@85 | 45 If you are intent on building Mercurial from source on Windows, follow |
bos@85 | 46 the ``hard way'' directions on the Mercurial wiki at |
bos@85 | 47 \url{http://www.selenic.com/mercurial/wiki/index.cgi/WindowsInstall}, |
bos@85 | 48 and expect the process to involve a lot of fiddly work. |
bos@85 | 49 |
bos@85 | 50 %%% Local Variables: |
bos@85 | 51 %%% mode: latex |
bos@85 | 52 %%% TeX-master: "00book" |
bos@85 | 53 %%% End: |