summaryrefslogtreecommitdiff
path: root/contrib/win32
diff options
context:
space:
mode:
authorLorry <lorry@roadtrain.codethink.co.uk>2012-08-22 14:49:51 +0100
committerLorry <lorry@roadtrain.codethink.co.uk>2012-08-22 14:49:51 +0100
commita498da43c7fdb9f24b73680c02a4a3588cc62d9a (patch)
treedaf8119dae1749b5165b68033a1b23a7375ce9ce /contrib/win32
downloadmercurial-tarball-a498da43c7fdb9f24b73680c02a4a3588cc62d9a.tar.gz
Tarball conversion
Diffstat (limited to 'contrib/win32')
-rw-r--r--contrib/win32/ReadMe.html162
-rw-r--r--contrib/win32/buildlocal.bat9
-rw-r--r--contrib/win32/hg.bat12
-rw-r--r--contrib/win32/hgwebdir_wsgi.py95
-rw-r--r--contrib/win32/mercurial.icobin0 -> 2238 bytes
-rw-r--r--contrib/win32/mercurial.ini97
-rw-r--r--contrib/win32/mercurial.iss148
-rw-r--r--contrib/win32/postinstall.txt9
-rw-r--r--contrib/win32/win32-build.txt133
9 files changed, 665 insertions, 0 deletions
diff --git a/contrib/win32/ReadMe.html b/contrib/win32/ReadMe.html
new file mode 100644
index 0000000..d5d30cc
--- /dev/null
+++ b/contrib/win32/ReadMe.html
@@ -0,0 +1,162 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <head>
+ <title>Mercurial for Windows</title>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
+ <style type="text/css">
+ <!--
+ html {
+ font-family: sans-serif;
+ margin: 1em 2em;
+ }
+
+ p {
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+ }
+
+ pre {
+ margin: 0.25em 0em;
+ padding: 0.5em;
+ background-color: #EEE;
+ border: thin solid #CCC;
+ }
+
+ .indented {
+ padding-left: 10pt;
+ }
+ -->
+ </style>
+ </head>
+
+ <body>
+ <h1>Mercurial for Windows</h1>
+
+ <p>Welcome to Mercurial for Windows!</p>
+
+ <p>
+ Mercurial is a command-line application. You must run it from
+ the Windows command prompt (or if you're hard core, a <a
+ href="http://www.mingw.org/">MinGW</a> shell).
+ </p>
+
+ <p class="indented">
+ <i>Note: the standard <a href="http://www.mingw.org/">MinGW</a>
+ msys startup script uses rxvt which has problems setting up
+ standard input and output. Running bash directly works
+ correctly.</i>
+ </p>
+
+ <p>
+ For documentation, please visit the <a
+ href="http://mercurial.selenic.com/">Mercurial web site</a>.
+ You can also download a free book, <a
+ href="http://hgbook.red-bean.com/">Mercurial: The Definitive
+ Guide</a>.
+ </p>
+
+ <p>
+ By default, Mercurial installs to <tt>C:\Program
+ Files\Mercurial</tt>. The Mercurial command is called
+ <tt>hg.exe</tt>.
+ </p>
+
+ <h1>Testing Mercurial after you've installed it</h1>
+
+ <p>
+ The easiest way to check that Mercurial is installed properly is
+ to just type the following at the command prompt:
+ </p>
+
+ <pre>
+hg
+</pre>
+
+ <p>
+ This command should print a useful help message. If it does,
+ other Mercurial commands should work fine for you.
+ </p>
+
+ <h1>Configuration notes</h1>
+ <h4>Default editor</h4>
+ <p>
+ The default editor for commit messages is 'notepad'. You can set
+ the <tt>EDITOR</tt> (or <tt>HGEDITOR</tt>) environment variable
+ to specify your preference or set it in <tt>mercurial.ini</tt>:
+ </p>
+ <pre>
+[ui]
+editor = whatever
+</pre>
+
+ <h4>Configuring a Merge program</h4>
+ <p>
+ It should be emphasized that Mercurial by itself doesn't attempt
+ to do a Merge at the file level, neither does it make any
+ attempt to Resolve the conflicts.
+ </p>
+
+ <p>
+ By default, Mercurial will use the merge program defined by the
+ <tt>HGMERGE</tt> environment variable, or uses the one defined
+ in the <tt>mercurial.ini</tt> file. (see <a
+ href="http://mercurial.selenic.com/wiki/MergeProgram">MergeProgram</a>
+ on the Mercurial Wiki for more information)
+ </p>
+
+ <h1>Reporting problems</h1>
+
+ <p>
+ Before you report any problems, please consult the <a
+ href="http://mercurial.selenic.com/">Mercurial web site</a>
+ and see if your question is already in our list of <a
+ href="http://mercurial.selenic.com/wiki/FAQ">Frequently
+ Answered Questions</a> (the "FAQ").
+ </p>
+
+ <p>
+ If you cannot find an answer to your question, please feel free
+ to send mail to the Mercurial mailing list, at <a
+ href="mailto:mercurial@selenic.com">mercurial@selenic.com</a>.
+ <b>Remember</b>, the more useful information you include in your
+ report, the easier it will be for us to help you!
+ </p>
+
+ <p>
+ If you are IRC-savvy, that's usually the fastest way to get
+ help. Go to <tt>#mercurial</tt> on <tt>irc.freenode.net</tt>.
+ </p>
+
+ <h1>Author and copyright information</h1>
+
+ <p>
+ Mercurial was written by <a href="http://www.selenic.com">Matt
+ Mackall</a>, and is maintained by Matt and a team of volunteers.
+ </p>
+
+ <p>
+ The Windows installer was written by <a
+ href="http://www.serpentine.com/blog">Bryan O'Sullivan</a>.
+ </p>
+
+ <p>
+ Mercurial is Copyright 2005-2012 Matt Mackall and others. See
+ the <tt>Contributors.txt</tt> file for a list of contributors.
+ </p>
+
+ <p>
+ Mercurial is free software; you can redistribute it and/or
+ modify it under the terms of the <a
+ href="http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt">GNU
+ General Public License version 2</a> or any later version.
+ </p>
+
+ <p>
+ Mercurial is distributed in the hope that it will be useful, but
+ <b>without any warranty</b>; without even the implied warranty
+ of <b>merchantability</b> or <b>fitness for a particular
+ purpose</b>. See the GNU General Public License for more
+ details.
+ </p>
+ </body>
+</html>
diff --git a/contrib/win32/buildlocal.bat b/contrib/win32/buildlocal.bat
new file mode 100644
index 0000000..b161d3e
--- /dev/null
+++ b/contrib/win32/buildlocal.bat
@@ -0,0 +1,9 @@
+@echo off
+rem Double-click this file to (re)build Mercurial for Windows in place.
+rem Useful for testing and development.
+cd ..\..
+del /Q mercurial\*.pyd
+del /Q mercurial\*.pyc
+rmdir /Q /S mercurial\locale
+python setup.py build_py -c -d . build_ext -i build_mo
+pause
diff --git a/contrib/win32/hg.bat b/contrib/win32/hg.bat
new file mode 100644
index 0000000..511a4e7
--- /dev/null
+++ b/contrib/win32/hg.bat
@@ -0,0 +1,12 @@
+@echo off
+rem Windows Driver script for Mercurial
+
+setlocal
+set HG=%~f0
+
+rem Use a full path to Python (relative to this script) as the standard Python
+rem install does not put python.exe on the PATH...
+rem %~dp0 is the directory of this script
+
+"%~dp0..\python" "%~dp0hg" %*
+endlocal
diff --git a/contrib/win32/hgwebdir_wsgi.py b/contrib/win32/hgwebdir_wsgi.py
new file mode 100644
index 0000000..efa866e
--- /dev/null
+++ b/contrib/win32/hgwebdir_wsgi.py
@@ -0,0 +1,95 @@
+# An example WSGI script for IIS/isapi-wsgi to export multiple hgweb repos
+# Copyright 2010 Sune Foldager <cryo@cyanite.org>
+#
+# This software may be used and distributed according to the terms of the
+# GNU General Public License version 2 or any later version.
+#
+# Requirements:
+# - Python 2.6
+# - PyWin32 build 214 or newer
+# - Mercurial installed from source (python setup.py install)
+# - IIS 7
+#
+# Earlier versions will in general work as well, but the PyWin32 version is
+# necessary for win32traceutil to work correctly.
+#
+#
+# Installation and use:
+#
+# - Download the isapi-wsgi source and run python setup.py install:
+# http://code.google.com/p/isapi-wsgi/
+#
+# - Run this script (i.e. python hgwebdir_wsgi.py) to get a shim dll. The
+# shim is identical for all scripts, so you can just copy and rename one
+# from an earlier run, if you wish.
+#
+# - Setup an IIS application where your hgwebdir is to be served from.
+# On 64-bit systems, make sure it's assigned a 32-bit app pool.
+#
+# - In the application, setup a wildcard script handler mapping of type
+# IpsapiModule with the shim dll as its executable. This file MUST reside
+# in the same directory as the shim. Remove all other handlers, if you wish.
+#
+# - Make sure the ISAPI and CGI restrictions (configured globally on the
+# web server) includes the shim dll, to allow it to run.
+#
+# - Adjust the configuration variables below to match your needs.
+#
+
+# Configuration file location
+hgweb_config = r'c:\src\iis\hg\hgweb.config'
+
+# Global settings for IIS path translation
+path_strip = 0 # Strip this many path elements off (when using url rewrite)
+path_prefix = 1 # This many path elements are prefixes (depends on the
+ # virtual path of the IIS application).
+
+import sys
+
+# Adjust python path if this is not a system-wide install
+#sys.path.insert(0, r'c:\path\to\python\lib')
+
+# Enable tracing. Run 'python -m win32traceutil' to debug
+if getattr(sys, 'isapidllhandle', None) is not None:
+ import win32traceutil
+
+# To serve pages in local charset instead of UTF-8, remove the two lines below
+import os
+os.environ['HGENCODING'] = 'UTF-8'
+
+
+import isapi_wsgi
+from mercurial import demandimport; demandimport.enable()
+from mercurial.hgweb.hgwebdir_mod import hgwebdir
+
+# Example tweak: Replace isapi_wsgi's handler to provide better error message
+# Other stuff could also be done here, like logging errors etc.
+class WsgiHandler(isapi_wsgi.IsapiWsgiHandler):
+ error_status = '500 Internal Server Error' # less silly error message
+
+isapi_wsgi.IsapiWsgiHandler = WsgiHandler
+
+# Only create the hgwebdir instance once
+application = hgwebdir(hgweb_config)
+
+def handler(environ, start_response):
+
+ # Translate IIS's weird URLs
+ url = environ['SCRIPT_NAME'] + environ['PATH_INFO']
+ paths = url[1:].split('/')[path_strip:]
+ script_name = '/' + '/'.join(paths[:path_prefix])
+ path_info = '/'.join(paths[path_prefix:])
+ if path_info:
+ path_info = '/' + path_info
+ environ['SCRIPT_NAME'] = script_name
+ environ['PATH_INFO'] = path_info
+
+ return application(environ, start_response)
+
+def __ExtensionFactory__():
+ return isapi_wsgi.ISAPISimpleHandler(handler)
+
+if __name__=='__main__':
+ from isapi.install import *
+ params = ISAPIParameters()
+ HandleCommandLine(params)
diff --git a/contrib/win32/mercurial.ico b/contrib/win32/mercurial.ico
new file mode 100644
index 0000000..046808d
--- /dev/null
+++ b/contrib/win32/mercurial.ico
Binary files differ
diff --git a/contrib/win32/mercurial.ini b/contrib/win32/mercurial.ini
new file mode 100644
index 0000000..b8eac56
--- /dev/null
+++ b/contrib/win32/mercurial.ini
@@ -0,0 +1,97 @@
+; System-wide Mercurial config file.
+;
+; !!! Do Not Edit This File !!!
+;
+; This file will be replaced by the installer on every upgrade.
+; Editing this file can cause strange side effects on Vista.
+;
+; http://bitbucket.org/tortoisehg/stable/issue/135
+;
+; To change settings you see in this file, override (or enable) them in
+; your user Mercurial.ini file, where USERNAME is your Windows user name:
+;
+; XP or older - C:\Documents and Settings\USERNAME\Mercurial.ini
+; Vista or later - C:\Users\USERNAME\Mercurial.ini
+
+
+[ui]
+; editor used to enter commit logs, etc. Most text editors will work.
+editor = notepad
+; show changed files and be a bit more verbose if True
+; verbose = True
+
+; username data to appear in commits
+; it usually takes the form: Joe User <joe.user@host.com>
+; username = Joe User <j.user@example.com>
+
+; In order to push/pull over ssh you must specify an ssh tool
+;ssh = "C:\Progra~1\TortoiseSVN\bin\TortoisePlink.exe" -ssh -2
+;ssh = C:\cygwin\bin\ssh
+
+;
+; For more information about mercurial extensions, start here
+; http://www.selenic.com/mercurial/wiki/index.cgi/UsingExtensions
+;
+; Extensions shipped with Mercurial
+;
+[extensions]
+;acl =
+;bugzilla =
+;children =
+;churn =
+;color =
+;convert =
+;eol =
+;extdiff =
+;fetch =
+;gpg =
+;graphlog =
+;hgcia =
+;hgk =
+;highlight =
+;histedit =
+;interhg =
+;largefiles =
+;keyword =
+;mq =
+;notify =
+;pager =
+;patchbomb =
+;progress =
+;purge =
+;rebase =
+;record =
+;relink =
+;schemes =
+;share =
+;transplant =
+;win32mbcs =
+;zeroconf =
+
+;
+; Define external diff commands
+;
+[extdiff]
+;cmd.bc3diff = C:\Program Files\Beyond Compare 3\BCompare.exe
+;cmd.vdiff = C:\Progra~1\TortoiseSVN\bin\TortoiseMerge.exe
+;cmd.vimdiff = gvim.exe
+;opts.vimdiff = -f "+next" "+execute 'DirDiff' fnameescape(argv(0)) fnameescape(argv(1))"
+
+
+[hgk]
+; Replace the following with your path to hgk, uncomment it and
+; install ActiveTcl (or another win32 port like tclkit)
+; path="C:\Program Files\Mercurial\Contrib\hgk.tcl"
+; vdiff=vdiff
+
+
+;
+; The git extended diff format can represent binary files, file
+; permission changes, and rename information that the normal patch format
+; cannot describe. However it is also not compatible with tools which
+; expect normal patches. so enable git patches at your own risk.
+;
+[diff]
+;git = false
+;nodates = false
+
diff --git a/contrib/win32/mercurial.iss b/contrib/win32/mercurial.iss
new file mode 100644
index 0000000..855218a
--- /dev/null
+++ b/contrib/win32/mercurial.iss
@@ -0,0 +1,148 @@
+; Script generated by the Inno Setup Script Wizard.
+; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
+
+#ifndef VERSION
+#define FileHandle
+#define FileLine
+#define VERSION = "unknown"
+#if FileHandle = FileOpen(SourcePath + "\..\..\mercurial\__version__.py")
+ #expr FileLine = FileRead(FileHandle)
+ #expr FileLine = FileRead(FileHandle)
+ #define VERSION = Copy(FileLine, Pos('"', FileLine)+1, Len(FileLine)-Pos('"', FileLine)-1)
+#endif
+#if FileHandle
+ #expr FileClose(FileHandle)
+#endif
+#pragma message "Detected Version: " + VERSION
+#endif
+
+#ifndef ARCH
+#define ARCH = "x86"
+#endif
+
+[Setup]
+AppCopyright=Copyright 2005-2010 Matt Mackall and others
+AppName=Mercurial
+#if ARCH == "x64"
+AppVerName=Mercurial {#VERSION} (64-bit)
+OutputBaseFilename=Mercurial-{#VERSION}-x64
+ArchitecturesAllowed=x64
+ArchitecturesInstallIn64BitMode=x64
+#else
+AppVerName=Mercurial {#VERSION}
+OutputBaseFilename=Mercurial-{#VERSION}
+#endif
+InfoAfterFile=contrib/win32/postinstall.txt
+LicenseFile=COPYING
+ShowLanguageDialog=yes
+AppPublisher=Matt Mackall and others
+AppPublisherURL=http://mercurial.selenic.com/
+AppSupportURL=http://mercurial.selenic.com/
+AppUpdatesURL=http://mercurial.selenic.com/
+AppID={{4B95A5F1-EF59-4B08-BED8-C891C46121B3}
+AppContact=mercurial@selenic.com
+DefaultDirName={pf}\Mercurial
+SourceDir=..\..
+VersionInfoDescription=Mercurial distributed SCM (version {#VERSION})
+VersionInfoCopyright=Copyright 2005-2010 Matt Mackall and others
+VersionInfoCompany=Matt Mackall and others
+InternalCompressLevel=max
+SolidCompression=true
+SetupIconFile=contrib\win32\mercurial.ico
+AllowNoIcons=true
+DefaultGroupName=Mercurial
+PrivilegesRequired=none
+
+[Files]
+Source: contrib\mercurial.el; DestDir: {app}/Contrib
+Source: contrib\vim\*.*; DestDir: {app}/Contrib/Vim
+Source: contrib\zsh_completion; DestDir: {app}/Contrib
+Source: contrib\bash_completion; DestDir: {app}/Contrib
+Source: contrib\tcsh_completion; DestDir: {app}/Contrib
+Source: contrib\tcsh_completion_build.sh; DestDir: {app}/Contrib
+Source: contrib\hgk; DestDir: {app}/Contrib; DestName: hgk.tcl
+Source: contrib\xml.rnc; DestDir: {app}/Contrib
+Source: contrib\shrink-revlog.py; DestDir: {app}/Contrib
+Source: contrib\mercurial.el; DestDir: {app}/Contrib
+Source: contrib\mq.el; DestDir: {app}/Contrib
+Source: contrib\hgweb.fcgi; DestDir: {app}/Contrib
+Source: contrib\hgweb.wsgi; DestDir: {app}/Contrib
+Source: contrib\win32\ReadMe.html; DestDir: {app}; Flags: isreadme
+Source: contrib\mergetools.hgrc; DestDir: {tmp};
+Source: contrib\win32\mercurial.ini; DestDir: {app}; DestName: Mercurial.ini; Check: CheckFile; AfterInstall: ConcatenateFiles;
+Source: contrib\win32\postinstall.txt; DestDir: {app}; DestName: ReleaseNotes.txt
+Source: dist\hg.exe; DestDir: {app}; AfterInstall: Touch('{app}\hg.exe.local')
+#if ARCH == "x64"
+Source: dist\*.dll; Destdir: {app}
+Source: dist\*.pyd; Destdir: {app}
+#else
+Source: dist\python*.dll; Destdir: {app}; Flags: skipifsourcedoesntexist
+Source: dist\msvc*.dll; DestDir: {app}; Flags: skipifsourcedoesntexist
+Source: dist\w9xpopen.exe; DestDir: {app}
+#endif
+Source: dist\Microsoft.VC*.CRT.manifest; DestDir: {app}; Flags: skipifsourcedoesntexist
+Source: dist\library.zip; DestDir: {app}
+Source: dist\add_path.exe; DestDir: {app}
+Source: dist\cacert.pem; Destdir: {app}
+Source: doc\*.html; DestDir: {app}\Docs
+Source: doc\style.css; DestDir: {app}\Docs
+Source: mercurial\help\*.txt; DestDir: {app}\help
+Source: mercurial\locale\*.*; DestDir: {app}\locale; Flags: recursesubdirs createallsubdirs skipifsourcedoesntexist
+Source: mercurial\templates\*.*; DestDir: {app}\Templates; Flags: recursesubdirs createallsubdirs
+Source: CONTRIBUTORS; DestDir: {app}; DestName: Contributors.txt
+Source: COPYING; DestDir: {app}; DestName: Copying.txt
+
+[INI]
+Filename: {app}\Mercurial.url; Section: InternetShortcut; Key: URL; String: http://mercurial.selenic.com/
+Filename: {app}\Mercurial.ini; Section: web; Key: cacerts; String: {app}\cacert.pem
+
+[UninstallDelete]
+Type: files; Name: {app}\Mercurial.url
+Type: files; Name: {app}\Contrib\shrink-revlog.pyc
+
+[Icons]
+Name: {group}\Uninstall Mercurial; Filename: {uninstallexe}
+Name: {group}\Mercurial Command Reference; Filename: {app}\Docs\hg.1.html
+Name: {group}\Mercurial Configuration Files; Filename: {app}\Docs\hgrc.5.html
+Name: {group}\Mercurial Ignore Files; Filename: {app}\Docs\hgignore.5.html
+Name: {group}\Mercurial Web Site; Filename: {app}\Mercurial.url
+
+[Run]
+Filename: "{app}\add_path.exe"; Parameters: "{app}"; Flags: postinstall; Description: "Add the installation path to the search path"
+
+[UninstallRun]
+Filename: "{app}\add_path.exe"; Parameters: "/del {app}"
+
+[UninstallDelete]
+Type: files; Name: "{app}\hg.exe.local"
+
+[Code]
+var
+ WriteFile: Boolean;
+ CheckDone: Boolean;
+
+function CheckFile(): Boolean;
+begin
+ if not CheckDone then begin
+ WriteFile := True;
+ if FileExists(ExpandConstant(CurrentFileName)) then begin
+ WriteFile := MsgBox('' + ExpandConstant(CurrentFileName) + '' #13#13 'The file already exists.' #13#13 'Would you like Setup to overwrite it?', mbConfirmation, MB_YESNO) = idYes;
+ end;
+ CheckDone := True;
+ end;
+ Result := WriteFile;
+end;
+
+procedure ConcatenateFiles();
+var
+ MergeConfigs: TArrayOfString;
+begin
+ if LoadStringsFromFile(ExpandConstant('{tmp}\mergetools.hgrc'),MergeConfigs) then begin
+ SaveStringsToFile(ExpandConstant(CurrentFileName),MergeConfigs,True);
+ end;
+end;
+
+procedure Touch(fn: String);
+begin
+ SaveStringToFile(ExpandConstant(fn), '', False);
+end;
diff --git a/contrib/win32/postinstall.txt b/contrib/win32/postinstall.txt
new file mode 100644
index 0000000..786dc48
--- /dev/null
+++ b/contrib/win32/postinstall.txt
@@ -0,0 +1,9 @@
+Welcome to Mercurial for Windows!
+---------------------------------
+
+For configuration and usage directions, please read the ReadMe.html
+file that comes with this package.
+
+Also check the release notes at:
+
+ http://mercurial.selenic.com/wiki/WhatsNew
diff --git a/contrib/win32/win32-build.txt b/contrib/win32/win32-build.txt
new file mode 100644
index 0000000..e0f2143
--- /dev/null
+++ b/contrib/win32/win32-build.txt
@@ -0,0 +1,133 @@
+The standalone Windows installer for Mercurial is built in a somewhat
+jury-rigged fashion.
+
+It has the following prerequisites. Ensure to take the packages
+matching the mercurial version you want to build (32-bit or 64-bit).
+
+ Python 2.6 for Windows
+ http://www.python.org/download/releases/
+
+ A compiler:
+ either MinGW
+ http://www.mingw.org/
+ or Microsoft Visual C++ 2008 SP1 Express Edition
+ http://www.microsoft.com/express/Downloads/Download-2008.aspx
+
+ Python for Windows Extensions
+ http://sourceforge.net/projects/pywin32/
+
+ mfc71.dll (just download, don't install; not needed for Python 2.6)
+ http://starship.python.net/crew/mhammond/win32/
+
+ Visual C++ 2008 redistributable package (needed for >= Python 2.6 or if you compile with MSVC)
+ for 32-bit:
+ http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf
+ for 64-bit:
+ http://www.microsoft.com/downloads/details.aspx?familyid=bd2a6171-e2d6-4230-b809-9a8d7548c1b6
+
+ The py2exe distutils extension
+ http://sourceforge.net/projects/py2exe/
+
+ GnuWin32 gettext utility (if you want to build translations)
+ http://gnuwin32.sourceforge.net/packages/gettext.htm
+
+ Inno Setup
+ http://www.jrsoftware.org/isdl.php#qsp
+
+ Get and install ispack-5.3.10.exe or later (includes Inno Setup Processor),
+ which is necessary to package Mercurial.
+
+ ISTool - optional
+ http://www.istool.org/default.aspx/
+
+ add_path (you need only add_path.exe in the zip file)
+ http://www.barisione.org/apps.html#add_path
+
+ Docutils
+ http://docutils.sourceforge.net/
+
+ CA Certs file
+ http://curl.haxx.se/ca/cacert.pem
+
+And, of course, Mercurial itself.
+
+Once you have all this installed and built, clone a copy of the
+Mercurial repository you want to package, and name the repo
+C:\hg\hg-release.
+
+In a shell, build a standalone copy of the hg.exe program.
+
+Building instructions for MinGW:
+ python setup.py build -c mingw32
+ python setup.py py2exe -b 2
+Note: the previously suggested combined command of "python setup.py build -c
+mingw32 py2exe -b 2" doesn't work correctly anymore as it doesn't include the
+extensions in the mercurial subdirectory.
+If you want to create a file named setup.cfg with the contents:
+[build]
+compiler=mingw32
+you can skip the first build step.
+
+Building instructions with MSVC 2008 Express Edition:
+ for 32-bit:
+ "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86
+ python setup.py py2exe -b 2
+ for 64-bit:
+ "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86_amd64
+ python setup.py py2exe -b 3
+
+Copy add_path.exe and cacert.pem files into the dist directory that just got created.
+
+If you are using Python up to version 2.5.4, copy mfc71.dll into the dist
+directory that just got created.
+
+If you are using Python 2.6 or later, or if you are using MSVC 2008 to compile
+mercurial, you must include the C runtime libraries in the installer. To do so,
+install the Visual C++ 2008 redistributable package. Then in your windows\winsxs
+folder, locate the folder containing the dlls version 9.0.21022.8.
+For x86, it should be named like x86_Microsoft.VC90.CRT_(...)_9.0.21022.8(...).
+For x64, it should be named like amd64_Microsoft.VC90.CRT_(...)_9.0.21022.8(...).
+Copy the files named msvcm90.dll, msvcp90.dll and msvcr90.dll into the dist
+directory.
+Then in the windows\winsxs\manifests folder, locate the corresponding manifest
+file (x86_Microsoft.VC90.CRT_(...)_9.0.21022.8(...).manifest for x86,
+amd64_Microsoft.VC90.CRT_(...)_9.0.21022.8(...).manifest for x64), copy it in the
+dist directory and rename it to Microsoft.VC90.CRT.manifest.
+
+Before building the installer, you have to build Mercurial HTML documentation
+(or fix mercurial.iss to not reference the doc directory):
+
+ cd doc
+ mingw32-make html
+ cd ..
+
+If you use ISTool, you open the C:\hg\hg-release\contrib\win32\mercurial.iss
+file and type Ctrl-F9 to compile the installer file.
+
+Otherwise you run the Inno Setup compiler. Assuming it's in the path
+you should execute:
+
+ iscc contrib\win32\mercurial.iss /dVERSION=foo
+
+Where 'foo' is the version number you would like to see in the
+'Add/Remove Applications' tool. The installer will be placed into
+a directory named Output/ at the root of your repository.
+If the /dVERSION=foo parameter is not given in the command line, the
+installer will retrieve the version information from the __version__.py file.
+
+If you want to build an installer for a 64-bit mercurial, add /dARCH=x64 to
+your command line:
+ iscc contrib\win32\mercurial.iss /dARCH=x64
+
+To automate the steps above you may want to create a batchfile based on the
+following (MinGW build chain):
+
+ echo [build] > setup.cfg
+ echo compiler=mingw32 >> setup.cfg
+ python setup.py py2exe -b 2
+ cd doc
+ mingw32-make html
+ cd ..
+ iscc contrib\win32\mercurial.iss /dVERSION=snapshot
+
+and run it from the root of the hg repository (c:\hg\hg-release).