Mercurial > hgbook
view ja/srcinstall.tex @ 800:1a30d2627512
Propagate 2ff0a43f1152
Update ch03
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Thu, 18 Jun 2009 20:04:44 +0900 |
parents | 57fb4684b8e3 |
children | 8a3041e6f3cb |
line wrap: on
line source
%\chapter{Installing Mercurial from source} \chapter{$B%=!<%9$+$i(BMercurial$B$r%$%s%9%H!<%k$9$k(B} \label{chap:srcinstall} %\section{On a Unix-like system} \section{Unix$B7O%7%9%F%`$G$N%$%s%9%H!<%k(B} \label{sec:srcinstall:unixlike} %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. %\begin{enumerate} %\item Download a recent source tarball from % \url{http://www.selenic.com/mercurial/download}. %\item Unpack the tarball: % \begin{codesample4} % gzip -dc mercurial-\emph{version}.tar.gz | tar xf - % \end{codesample4} %\item Go into the source directory and run the installer script. This % will build Mercurial and install it in your home directory. % \begin{codesample4} % cd mercurial-\emph{version} % python setup.py install --force --home=\$HOME % \end{codesample4} %\end{enumerate} %Once the install finishes, Mercurial will be in the \texttt{bin} %subdirectory of your home directory. Don't forget to make sure that %this directory is present in your shell's search path. Python (2.3~$B0\9T(B)$B$N%$%s%9%H!<%k$5$l$F$$$k!$==J,?7$7$$(BUnix$B7O$N%7%9%F%`$G(B $B$O!$(BMercurial$B$N%=!<%9$+$i$N%$%s%9%H!<%k$O4JC1$G$"$k!%(B \begin{enumerate} \item \url{http://www.selenic.com/mercurial/download}$B$+$i?7$7$$%=!<%9$N(B tarball$B$r%@%&%s%m!<%I$9$k(B \item tarball$B$r2rE`$9$k(B: \begin{codesample4} gzip -dc mercurial-\emph{version}.tar.gz | tar xf - \end{codesample4} \item $B%=!<%9%G%#%l%/%H%j$KF~$C$F!$%$%s%9%H!<%i%9%/%j%W%H$r<B9T$9$k!%(B Mercurial$B$,%S%k%I$5$l!$%f!<%6%[!<%`%G%#%l%/%H%j$K%$%s%9%H!<%k$5$l(B $B$k!%(B \begin{codesample4} cd mercurial-\emph{version} python setup.py install --force --home=\$HOME \end{codesample4} \end{enumerate} $B%$%s%9%H!<%k$r9T$J$&$H!$(BMercurial$B$O%f!<%6%[!<%`%G%#%l%/%H%jFb$N(B \texttt{bin}$B%5%V%G%#%l%/%H%j$K<}$a$i$l$k!%$3$N%G%#%l%/%H%j$,%7%'%k$N%3%^(B $B%s%I%5!<%A%Q%9$K$"$k$N$r3NG'$9$k$3$H!%(B %You will probably need to set the \envar{PYTHONPATH} 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 %\texttt{/home/bos/lib/python}. 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 %\texttt{mercurial} directory were installed to. Mercurial$B$N<B9T%U%!%$%k$,B>$N(BMercurial$B%Q%C%1!<%8$rH/8+$G$-$k$h$&$K!$$*$=(B $B$i$/4D6-JQ?t(B\envar{PYTHONPATH}$B$r@_Dj$9$k$3$H$,I,MW$K$J$k!%Nc$($P!$I.<T$N(B $B%i%C%W%H%C%W$G$O$3$l$r(B\texttt{/home/bos/lib/python}$B$K@_Dj$7$F$$$k!%(B $B<B:]$N@5$7$$%Q%9$O$I$N$h$&$K(BPython$B$r%S%k%I$7$?$+$K$h$k$,!$$3$l$r8+$D$1=P(B $B$9$N$O4JC1$JH&$@!%$b$7ITL@$G$"$l$P!$A0=R$N%$%s%9%H!<%i%9%/%j%W%H$N=PNO$+(B $B$i!$(B\texttt{mercurial}$B%G%#%l%/%H%j$NCf?H$,$I$3$K%$%s%9%H!<%k$5$l$?$+$r8+(B $B$l$PNI$$!%(B %\section{On Windows} \section{Windows$B$G$N%$%s%9%H!<%k(B} %Building and installing Mercurial on Windows requires a variety of %tools, a fair amount of technical knowledge, and considerable %patience. I very much \emph{do not recommend} this route if you are a %``casual user''. Unless you intend to hack on Mercurial, I strongly %suggest that you use a binary package instead. Mercurial$B$r(BWindows$B>e$G%=!<%9$+$i%S%k%I$7%$%s%9%H!<%k$9$k$?$a$K$O!$B?$/$N(B $B%D!<%k$,I,MW$G!$$=$l$J$j$N5;=QE*CN<1$,I,MW$G$"$j!$:$Fq$G$"$k!%$b$7%+%8%e(B $B%"%k$J%f!<%6$G$"$l$P!$$3$N$d$jJ}$O$*$9$9$a$7$J$$!%(BMercurial$B<+BN$r%O%C%/$7(B $B$?$$$N$G$J$1$l$P!$%P%$%J%j%Q%C%1!<%8$r$*$9$9$a$9$k!%(B %If you are intent on building Mercurial from source on Windows, follow %the ``hard way'' directions on the Mercurial wiki at %\url{http://www.selenic.com/mercurial/wiki/index.cgi/WindowsInstall}, %and expect the process to involve a lot of fiddly work. $B$b$7(BMercurial$B$r(BWindows$B>e$G%=!<%9$+$i%S%k%I$7$?$$$N$G$"$l$P!$(BMercurial wiki \url{http://www.selenic.com/mercurial/wiki/index.cgi/WindowsInstall} $B$N(B ``hard way''$B$N@bL@$K=>$C$F9T$J$&!%$3$NJ}K!$G$OB?$/$NLLE]$J:n6H$,BT$A9=$((B $B$F$$$k$3$H$r3P8g$9$kI,MW$,$"$k!%(B %%% Local Variables: %%% mode: yatex %%% TeX-master: "00book" %%% End: