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