Differences between revisions 1 and 58 (spanning 57 versions)
Revision 1 as of 2005-08-26 00:50:20
Size: 4127
Editor: waste
Comment:
Revision 58 as of 2007-03-22 15:07:09
Size: 1262
Editor: 200-233-249-166
Comment: None
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
To install Mercurial from sources under Windows, you need

 * a Python interpreter (such as the one from [http://www.python.org python.org], or [http://www.activestate.com/Products/ActivePython/ ActivePython])
 * a C compiler (this is needed to compile some extensions used by ["Mercurial"], so it's needed at setup-time only and not to run Mercurial itself)
 * Mercurial's own sources, of course
 * a three-way MergeProgram

This pages describes some issues you may meet when trying to install Mercurial, and how to solve them.

Normally, you would only need to run

{{{
python setup.py install
}}}

in the directory where you unpacked the sources, and everything would "just work".

=== Where is my Mercurial? ===

By default, Mercurial (the executable) gets installed in a [=Scripts] folder under your Python installation folder.

You can create a small batch file in a folder which is present in your path (e.g. your Windows installation folder) to help you launch Mercurial.

If you are running a Windows of the 9x series (Windows 95, 98 or ME), create a file called [=hg.bat] with the following content:

{{{
@echo off
{{{
shift
{{{
python <path-to-Scripts-folder>\hg %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
}}}

For example, if you installed Python in [=c:\python], the content of the file would be

{{{
@echo off
{{{
shift
{{{
python c:\python\hg %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
}}}

Under Windows NT, create a file called [=hg.cmd] with the following content:

{{{
@python <path-to-Scripts-folder>\hg %*
}}}

For example, if you installed Python in [=c:\python], the content of the file would be

{{{
@python c:\python\Scripts\hg %*
}}}

=== Python and Ming``W32 ===

By default, Python and Active``Python will look for Microsoft Visual C to compile the extensions, so you have to tell [=setup.py] to use the Ming``W32 compiler instead. You can do this by running

{{{
python setup.py build -c mingw32
{{{
python setup.py install --skip-build
}}}

If you are not familiar with !mingw32, you will first need to download and install the following packages, in the order given:

{{{
msys
{{{
msysDTK
}}}

Afterwards, download and install the following packages, unpacking them to the directory where you installed mingw:

{{{
mingw-runtime
{{{
gcc-core
{{{
binutils
{{{
w32api
}}}

You can find them at http://www.mingw.org

Then add the Python and mingw directories to your PATH, and run your build from the command prompt:

{{{
set PATH=%PATH%;c:\python24;c:\mingw\1.0\bin
}}}

=== Active``Python and MS Visual C ===

If you are going to use MS Visual C, you may need to install an appropriate version of Active``Python:
 * Active``Python 2.4.1 requires VC7.1
 * Active``Python 2.3.5 requires VC6

A less than ideal work-around for the version check is to change your
distutils notion of what version of MSVC Python was built with.
Do this by editing your msvccompiler.py file in your python/Lib/distutils directory to match the version of MSVC you actually have, for example:

{{{
   def __init__ (self, verbose=0, dry_run=0, force=0):
{{{
       CCompiler.__init__ (self, verbose, dry_run, force)
{{{
       self.__version = get_build_version()
{{{
 + self.__version = 6 # override build version to match compiler
}}}

=== Other miscellaneous issues ===

Win``Zip7 does not seem to create empty files when extracting from .tar files. But Win``Zip9 is fine.

=== Fix the path problem on Windows ===

See the mail list thread "Fix the path problem on Windows..."
but essentially Python on Windows ends up with the current directory
automatically added to the python search path '''before''' the site libraries.
So if you run hg in its own repository python gets confused, and can't find
the extensions needed. There is a candidate patch that removes the current
directory, but there is an arguably better workaround from K.Thananchayan.
Simply add a registry entry (replacing 2.4 with the version of Python)

{{{
 HKLM/SOFTWARE/Python/PythonCore/2.4/PythonPath/XXX
{{{
   (Default) REG_SZ "YYY"
Hi, good news for u specially, only here best proposition!!! Please visit my sites:
 [URL=http://www.hometown.aol.com/WendaWatts4277/Soma/index.html]Soma[/URL] [URL=http://www.hometown.aol.com/WendaWatts4277/Celebrex/index.html]Celebrex[/URL] [URL=http://www.hometown.aol.com/WendaWatts4277/Levitra/index.html]Levitra[/URL] [URL=http://www.hometown.aol.com/WendaWatts4277/Lipitor/index.html]Lipitor[/URL] [URL=http://www.hometown.aol.com/WendaWatts4277/Ultram/index.html]Ultram[/URL]
 <a href="http://www.hometown.aol.com/WendaWatts4277/Celebrex/index.html">Celebrex</a> <a href="http://www.hometown.aol.com/WendaWatts4277/Levitra/index.html">Levitra</a> <a href="http://www.hometown.aol.com/WendaWatts4277/Lipitor/index.html">Lipitor</a> <a href="http://www.hometown.aol.com/WendaWatts4277/Soma/index.html">Soma</a> <a href="http://www.hometown.aol.com/WendaWatts4277/Prozac/index.html">Prozac</a>
 http://www.hometown.aol.com/WendaWatts4277/Soma/index.html http://www.hometown.aol.com/WendaWatts4277/Prozac/index.html http://www.hometown.aol.com/WendaWatts4277/Lipitor/index.html http://www.hometown.aol.com/WendaWatts4277/Celebrex/index.html http://www.hometown.aol.com/WendaWatts4277/Levitra/index.html
Thanks!
----
<No addition>

WindowsInstall (last edited 2013-07-19 10:57:21 by rcl)