thg-winbuild /

Filename Size Date modified Message
145 B
374 B
4.4 KB
104 B
979 B
28.0 KB
TortoiseHg and Mercurial installer builder for Windows

Repository subdirs:

contrib/   - Bundled libraries and utilities external to (T)HG
misc/      - Miscellaneous files used to build packages

Clones ( will create these clones at runtime):

hg-main    - Mercurial repository
tortoisehg - TortoiseHg repository
hgfold     - case folding conflict detection and resolution extension
hgcr-gui   - code review extension
keyring    - python-keyring-lib
hgkeyring  - mercurial keyring extension
perfarce   - perforce integration extension
hgeol      - EOL handling extension (eventual successor to win32text)

=== Mercurial Prerequisites ===

- Python 2.6.4
  C:\Python26 must be in your PATH
- C++ Compiler

  Get the gratis "Microsoft Windows SDK for Windows 7 and .NET
  Framework 3.5 SP1" from

  See the win32/shellext/README.txt file in the TortoiseHg source
  for details on installing this package.

  If you already have Visual Studio 2008, installing the SDK will
  confuse DISTUTILS when it tries to build Mercurial's C extensions.
  Simply comment out the line in that sets the
  DISTUTILS_USE_SDK environment variable, and distutils will use VC2008
  to build Mercurial and our build scripts will use SDK's compiler to
  build the THG shell extension.  These are supposedly the same
  compiler, so it should be ok.

- pywin32

  Get the latest version for your Python release

- gettext

  We recommend the 'Setup program' from
- py2exe

  Get the latest version for your Python release

- Windows Installer XML

  Get the latest stable 3.0 package from

- Docutils

  Building HTML man pages for Mercurial requires the
  script from docutils.  The easiest way to get docutils is to
  install setuptools (below), then:
  C:\Python26\Scripts\easy_install.exe docutils

=== Building TortoiseHg documentation ===

To build just the TortoiseHg docs, install the packages below then:

python --thg-doc

- setuptools (provides easy_install.exe)

  Get the latest version for your Python release
  We're using:

- sphinx, docutils, jinja2, pygments, etc

  (requires easy_install from setuptools)
  The sphinx package has dependencies for docutils, jinja, etc,
  so installing sphinx pulls in all the other prerequisites.

  easy_install sphinx

- MiKTeX (to build PDF docs)
  You can chose for it to automatically download packages when
  it needs them, else the first time it builds PDF docs it will
  require much user interaction.
  We're using:

- HTML Help Workshop (to build CHM docs)

  This should come with the Windows SDK, but also available here:

=== Building TortoiseHg Installer Packages ===

To build TortoiseHg MSI packages, you need the Mercurial prerequisites,
TortoiseHg documentation prerequisites, and these packages:

- GTK+ for Windows
  Unzip to C:\GTK or set GTK_PATH to the unzip location
  The WiX scripts require:


  Get the latest version for your Python release
  The WiX scripts require:

- iniparse

  (requires easy_install from setuptools)
  easy_install --always-unzip iniparse

- pyreadline (optional)

  required by wincolor extension
  (requires easy_install from setuptools)
  easy_install --always-unzip pyreadline

- OpenSSL Python bindings (optional)

  easy_install --always-unzip pyopenssl

- Subversion Python bindings (optional)

  If you want your TortoiseHg package to include Subversion
  Python bindings (for svn conversions), install the bindings from:
  We're using:

== Build Steps ==

It's entirely automated.  Ensure C:\Python26 is in your path, then run:

python --help
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.