##// END OF EJS Templates
contrib/win32: update build instructions after cbe400a8e217
Martin Geisler -
r10976:5ff192fb default
parent child Browse files
Show More
@@ -1,120 +1,114 b''
1 1 The standalone Windows installer for Mercurial is built in a somewhat
2 2 jury-rigged fashion.
3 3
4 4 It has the following prerequisites, at least as I build it:
5 5
6 6 Python for Windows
7 7 http://www.python.org/ftp/python/2.4.3/python-2.4.3.msi
8 8
9 9 MinGW
10 10 http://www.mingw.org/
11 11
12 12 Python for Windows Extensions
13 13 http://sourceforge.net/projects/pywin32/
14 14
15 15 mfc71.dll (just download, don't install; not needed for Python 2.6)
16 16 http://starship.python.net/crew/mhammond/win32/
17 17
18 18 Visual C++ 2008 redistributable package (needed for Python 2.6)
19 19 http://www.microsoft.com/downloads/details.aspx?familyid=9b2da534-3e03-4391-8a4d-074b9f2bc1bf&displaylang=en
20 20
21 21 The py2exe distutils extension
22 22 http://sourceforge.net/projects/py2exe/
23 23
24 24 GnuWin32 gettext utility
25 25 http://gnuwin32.sourceforge.net/packages/gettext.htm
26 26
27 27 Inno Setup
28 28 http://www.jrsoftware.org/isdl.php#qsp
29 29
30 30 Get and install ispack-5.3.4.exe which includes Inno Setup Processor,
31 31 which is necessary to package Mercurial.
32 32
33 33 ISTool - optional
34 34 http://www.istool.org/default.aspx/
35 35
36 36 add_path (you need only add_path.exe in the zip file)
37 37 http://www.barisione.org/apps.html#add_path
38 38
39 39 Docutils
40 40 http://docutils.sourceforge.net/
41 41
42 42 And, of course, Mercurial itself.
43 43
44 44 Once you have all this installed and built, clone a copy of the
45 45 Mercurial repository you want to package, and name the repo
46 46 C:\hg\hg-release.
47 47
48 48 In a shell, build a standalone copy of the hg.exe program:
49 49
50 50 python setup.py build -c mingw32
51 51 python setup.py py2exe -b 1
52 52
53 53 Note: the previously suggested combined command of "python setup.py build -c
54 54 mingw32 py2exe -b 1" doesn't work correctly anymore as it doesn't include the
55 55 extensions in the mercurial subdirectory.
56 56
57 57 If you want to create a file named setup.cfg with the contents:
58 58
59 59 [build]
60 60 compiler=mingw32
61 61
62 62 you can skip the first build step.
63 63
64 64 Copy add_path.exe into the dist directory that just got created.
65 65
66 66 If you are using Python up to version 2.5.4, copy mfc71.dll into the dist
67 67 directory that just got created.
68 68
69 69 If you are using Python 2.6 or later, after installing the Visual C++ 2008
70 70 redistributable package copy into the dist directory that just got created the
71 71 following files:
72 72 - from the directory starting with
73 73 Windows/WinSxS/x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8
74 74 the files named: msvcm90.dll, msvcp90.dll and msvcr90.dll
75 75 - from the directory starting with
76 76 Windows/WinSxS/x86_Microsoft.VC90.MFC_1fc8b3b9a1e18e3b_9.0.21022.8
77 77 the files named: mfc90.dll, mfc90u.dll, mfcm90.dll and mfcm90u.dll
78 78 - from the directory named Windows/WinSxS/Manifests, the manifest file
79 79 starting with x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8
80 80 (rename it to Microsoft.VC90.CRT.manifest) and the manifest file starting
81 81 with x86_Microsoft.VC90.MFC_1fc8b3b9a1e18e3b_9.0.21022.8 (rename it to
82 82 Microsoft.VC90.MFC.manifest)
83 83
84 84 Before building the installer, you have to build Mercurial HTML documentation
85 (or fix mercurial.iss to not reference the doc directory). Docutils does not
86 come with a ready-made script for rst2html.py, so you will have to write your
87 own and put it in %PATH% like:
88
89 @python c:\pythonXX\scripts\rst2html.py %*
90
91 Then build the documentation with:
85 (or fix mercurial.iss to not reference the doc directory):
92 86
93 87 cd doc
94 mingw32-make RST2HTML=rst2html.bat html
88 mingw32-make html
95 89 cd ..
96 90
97 91 If you use ISTool, you open the C:\hg\hg-release\contrib\win32\mercurial.iss
98 92 file and type Ctrl-F9 to compile the installer file.
99 93
100 94 Otherwise you run the Inno Setup compiler. Assuming it's in the path
101 95 you should execute:
102 96
103 97 iscc contrib\win32\mercurial.iss /DVERSION=foo
104 98
105 99 Where 'foo' is the version number you would like to see in the
106 100 'Add/Remove Applications' tool. The installer will be placed into
107 101 a directory named Output/ at the root of your repository.
108 102
109 103 To automate the steps above you may want to create a batchfile based on the
110 104 following:
111 105
112 106 echo [build] > setup.cfg
113 107 echo compiler=mingw32 >> setup.cfg
114 108 python setup.py py2exe -b 1
115 109 cd doc
116 mingw32-make RST2HTML=rst2html.bat html
110 mingw32-make html
117 111 cd ..
118 112 iscc contrib\win32\mercurial.iss /DVERSION=snapshot
119 113
120 114 and run it from the root of the hg repository (c:\hg\hg-release).
General Comments 0
You need to be logged in to leave comments. Login now