Show More
@@ -1,130 +1,130 b'' | |||||
1 | The standalone Windows installer for Mercurial is built in a somewhat |
|
1 | The standalone Windows installer for Mercurial is built in a somewhat | |
2 | jury-rigged fashion. |
|
2 | jury-rigged fashion. | |
3 |
|
3 | |||
4 | It has the following prerequisites. Ensure to take the packages |
|
4 | It has the following prerequisites. Ensure to take the packages | |
5 | matching the mercurial version you want to build (32-bit or 64-bit). |
|
5 | matching the mercurial version you want to build (32-bit or 64-bit). | |
6 |
|
6 | |||
7 | Python 2.6 for Windows |
|
7 | Python 2.6 for Windows | |
8 | http://www.python.org/download/releases/ |
|
8 | http://www.python.org/download/releases/ | |
9 |
|
9 | |||
10 | A compiler: |
|
10 | A compiler: | |
11 | either MinGW |
|
11 | either MinGW | |
12 | http://www.mingw.org/ |
|
12 | http://www.mingw.org/ | |
13 | or Microsoft Visual C++ 2008 SP1 Express Edition |
|
13 | or Microsoft Visual C++ 2008 SP1 Express Edition | |
14 | http://www.microsoft.com/express/Downloads/Download-2008.aspx |
|
14 | http://www.microsoft.com/express/Downloads/Download-2008.aspx | |
15 |
|
15 | |||
16 | Python for Windows Extensions |
|
16 | Python for Windows Extensions | |
17 | http://sourceforge.net/projects/pywin32/ |
|
17 | http://sourceforge.net/projects/pywin32/ | |
18 |
|
18 | |||
19 | mfc71.dll (just download, don't install; not needed for Python 2.6) |
|
19 | mfc71.dll (just download, don't install; not needed for Python 2.6) | |
20 | http://starship.python.net/crew/mhammond/win32/ |
|
20 | http://starship.python.net/crew/mhammond/win32/ | |
21 |
|
21 | |||
22 |
Visual C++ 2008 |
|
22 | Visual C++ 2008 redistributable package (needed for >= Python 2.6 or if you compile with MSVC) | |
23 | for 32-bit: |
|
23 | for 32-bit: | |
24 |
http://www.microsoft.com/downloads/details.aspx?FamilyID= |
|
24 | http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf | |
25 | for 64-bit: |
|
25 | for 64-bit: | |
26 |
http://www.microsoft.com/downloads/details.aspx?familyid= |
|
26 | http://www.microsoft.com/downloads/details.aspx?familyid=bd2a6171-e2d6-4230-b809-9a8d7548c1b6 | |
27 |
|
27 | |||
28 | The py2exe distutils extension |
|
28 | The py2exe distutils extension | |
29 | http://sourceforge.net/projects/py2exe/ |
|
29 | http://sourceforge.net/projects/py2exe/ | |
30 |
|
30 | |||
31 | GnuWin32 gettext utility (if you want to build translations) |
|
31 | GnuWin32 gettext utility (if you want to build translations) | |
32 | http://gnuwin32.sourceforge.net/packages/gettext.htm |
|
32 | http://gnuwin32.sourceforge.net/packages/gettext.htm | |
33 |
|
33 | |||
34 | Inno Setup |
|
34 | Inno Setup | |
35 | http://www.jrsoftware.org/isdl.php#qsp |
|
35 | http://www.jrsoftware.org/isdl.php#qsp | |
36 |
|
36 | |||
37 | Get and install ispack-5.3.10.exe which includes Inno Setup Processor, |
|
37 | Get and install ispack-5.3.10.exe which includes Inno Setup Processor, | |
38 | which is necessary to package Mercurial. |
|
38 | which is necessary to package Mercurial. | |
39 |
|
39 | |||
40 | ISTool - optional |
|
40 | ISTool - optional | |
41 | http://www.istool.org/default.aspx/ |
|
41 | http://www.istool.org/default.aspx/ | |
42 |
|
42 | |||
43 | add_path (you need only add_path.exe in the zip file) |
|
43 | add_path (you need only add_path.exe in the zip file) | |
44 | http://www.barisione.org/apps.html#add_path |
|
44 | http://www.barisione.org/apps.html#add_path | |
45 |
|
45 | |||
46 | Docutils |
|
46 | Docutils | |
47 | http://docutils.sourceforge.net/ |
|
47 | http://docutils.sourceforge.net/ | |
48 |
|
48 | |||
49 | And, of course, Mercurial itself. |
|
49 | And, of course, Mercurial itself. | |
50 |
|
50 | |||
51 | Once you have all this installed and built, clone a copy of the |
|
51 | Once you have all this installed and built, clone a copy of the | |
52 | Mercurial repository you want to package, and name the repo |
|
52 | Mercurial repository you want to package, and name the repo | |
53 | C:\hg\hg-release. |
|
53 | C:\hg\hg-release. | |
54 |
|
54 | |||
55 | In a shell, build a standalone copy of the hg.exe program. |
|
55 | In a shell, build a standalone copy of the hg.exe program. | |
56 |
|
56 | |||
57 | Building instructions for MinGW: |
|
57 | Building instructions for MinGW: | |
58 | python setup.py build -c mingw32 |
|
58 | python setup.py build -c mingw32 | |
59 | python setup.py py2exe -b 2 |
|
59 | python setup.py py2exe -b 2 | |
60 | Note: the previously suggested combined command of "python setup.py build -c |
|
60 | Note: the previously suggested combined command of "python setup.py build -c | |
61 | mingw32 py2exe -b 2" doesn't work correctly anymore as it doesn't include the |
|
61 | mingw32 py2exe -b 2" doesn't work correctly anymore as it doesn't include the | |
62 | extensions in the mercurial subdirectory. |
|
62 | extensions in the mercurial subdirectory. | |
63 | If you want to create a file named setup.cfg with the contents: |
|
63 | If you want to create a file named setup.cfg with the contents: | |
64 | [build] |
|
64 | [build] | |
65 | compiler=mingw32 |
|
65 | compiler=mingw32 | |
66 | you can skip the first build step. |
|
66 | you can skip the first build step. | |
67 |
|
67 | |||
68 |
Building instructions with MSVC 2008 |
|
68 | Building instructions with MSVC 2008 Express Edition: | |
69 | for 32-bit: |
|
69 | for 32-bit: | |
70 | "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86 |
|
70 | "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86 | |
71 | python setup.py py2exe -b 2 |
|
71 | python setup.py py2exe -b 2 | |
72 | for 64-bit: |
|
72 | for 64-bit: | |
73 | "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86_amd64 |
|
73 | "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86_amd64 | |
74 | python setup.py py2exe -b 3 |
|
74 | python setup.py py2exe -b 3 | |
75 |
|
75 | |||
76 | Copy add_path.exe into the dist directory that just got created. |
|
76 | Copy add_path.exe into the dist directory that just got created. | |
77 |
|
77 | |||
78 | If you are using Python up to version 2.5.4, copy mfc71.dll into the dist |
|
78 | If you are using Python up to version 2.5.4, copy mfc71.dll into the dist | |
79 | directory that just got created. |
|
79 | directory that just got created. | |
80 |
|
80 | |||
81 | If you are using Python 2.6 or later, or if you are using MSVC 2008 to compile |
|
81 | If you are using Python 2.6 or later, or if you are using MSVC 2008 to compile | |
82 | mercurial, you must include the C runtime libraries in the installer. To do so, |
|
82 | mercurial, you must include the C runtime libraries in the installer. To do so, | |
83 |
install the Visual C++ 2008 |
|
83 | install the Visual C++ 2008 redistributable package. Then in your windows\winsxs | |
84 |
|
|
84 | folder, locate the folder containing the dlls version 9.0.21022.8. | |
85 |
For x86, it should be named like x86_Microsoft.VC90.CRT_(...)_9.0. |
|
85 | For x86, it should be named like x86_Microsoft.VC90.CRT_(...)_9.0.21022.8(...). | |
86 |
For x64, it should be named like amd64_Microsoft.VC90.CRT_(...)_9.0. |
|
86 | For x64, it should be named like amd64_Microsoft.VC90.CRT_(...)_9.0.21022.8(...). | |
87 | Copy the files named msvcm90.dll, msvcp90.dll and msvcr90.dll into the dist |
|
87 | Copy the files named msvcm90.dll, msvcp90.dll and msvcr90.dll into the dist | |
88 | directory. |
|
88 | directory. | |
89 | Then in the windows\winsxs\manifests folder, locate the corresponding manifest |
|
89 | Then in the windows\winsxs\manifests folder, locate the corresponding manifest | |
90 |
file (x86_Microsoft.VC90.CRT_(...)_9.0. |
|
90 | file (x86_Microsoft.VC90.CRT_(...)_9.0.21022.8(...).manifest for x86, | |
91 |
amd64_Microsoft.VC90.CRT_(...)_9.0. |
|
91 | amd64_Microsoft.VC90.CRT_(...)_9.0.21022.8(...).manifest for x64), copy it in the | |
92 | dist directory and rename it to Microsoft.VC90.CRT.manifest. |
|
92 | dist directory and rename it to Microsoft.VC90.CRT.manifest. | |
93 |
|
93 | |||
94 | Before building the installer, you have to build Mercurial HTML documentation |
|
94 | Before building the installer, you have to build Mercurial HTML documentation | |
95 | (or fix mercurial.iss to not reference the doc directory): |
|
95 | (or fix mercurial.iss to not reference the doc directory): | |
96 |
|
96 | |||
97 | cd doc |
|
97 | cd doc | |
98 | mingw32-make html |
|
98 | mingw32-make html | |
99 | cd .. |
|
99 | cd .. | |
100 |
|
100 | |||
101 | If you use ISTool, you open the C:\hg\hg-release\contrib\win32\mercurial.iss |
|
101 | If you use ISTool, you open the C:\hg\hg-release\contrib\win32\mercurial.iss | |
102 | file and type Ctrl-F9 to compile the installer file. |
|
102 | file and type Ctrl-F9 to compile the installer file. | |
103 |
|
103 | |||
104 | Otherwise you run the Inno Setup compiler. Assuming it's in the path |
|
104 | Otherwise you run the Inno Setup compiler. Assuming it's in the path | |
105 | you should execute: |
|
105 | you should execute: | |
106 |
|
106 | |||
107 | iscc contrib\win32\mercurial.iss /dVERSION=foo |
|
107 | iscc contrib\win32\mercurial.iss /dVERSION=foo | |
108 |
|
108 | |||
109 | Where 'foo' is the version number you would like to see in the |
|
109 | Where 'foo' is the version number you would like to see in the | |
110 | 'Add/Remove Applications' tool. The installer will be placed into |
|
110 | 'Add/Remove Applications' tool. The installer will be placed into | |
111 | a directory named Output/ at the root of your repository. |
|
111 | a directory named Output/ at the root of your repository. | |
112 | If the /dVERSION=foo parameter is not given in the command line, the |
|
112 | If the /dVERSION=foo parameter is not given in the command line, the | |
113 | installer will retrieve the version information from the __version__.py file. |
|
113 | installer will retrieve the version information from the __version__.py file. | |
114 |
|
114 | |||
115 | If you want to build an installer for a 64-bit mercurial, add /dARCH=x64 to |
|
115 | If you want to build an installer for a 64-bit mercurial, add /dARCH=x64 to | |
116 | your command line: |
|
116 | your command line: | |
117 | iscc contrib\win32\mercurial.iss /dARCH=x64 |
|
117 | iscc contrib\win32\mercurial.iss /dARCH=x64 | |
118 |
|
118 | |||
119 | To automate the steps above you may want to create a batchfile based on the |
|
119 | To automate the steps above you may want to create a batchfile based on the | |
120 | following (MinGW build chain): |
|
120 | following (MinGW build chain): | |
121 |
|
121 | |||
122 | echo [build] > setup.cfg |
|
122 | echo [build] > setup.cfg | |
123 | echo compiler=mingw32 >> setup.cfg |
|
123 | echo compiler=mingw32 >> setup.cfg | |
124 | python setup.py py2exe -b 2 |
|
124 | python setup.py py2exe -b 2 | |
125 | cd doc |
|
125 | cd doc | |
126 | mingw32-make html |
|
126 | mingw32-make html | |
127 | cd .. |
|
127 | cd .. | |
128 | iscc contrib\win32\mercurial.iss /dVERSION=snapshot |
|
128 | iscc contrib\win32\mercurial.iss /dVERSION=snapshot | |
129 |
|
129 | |||
130 | and run it from the root of the hg repository (c:\hg\hg-release). |
|
130 | 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