Show More
@@ -1,120 +1,114 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, 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/isdl.php#qsp |
|
28 | http://www.jrsoftware.org/isdl.php#qsp | |
29 |
|
29 | |||
30 | Get and install ispack-5.3.4.exe which includes Inno Setup Processor, |
|
30 | Get and install ispack-5.3.4.exe which includes Inno Setup Processor, | |
31 | which is necessary to package Mercurial. |
|
31 | which is necessary to package Mercurial. | |
32 |
|
32 | |||
33 | ISTool - optional |
|
33 | ISTool - optional | |
34 | http://www.istool.org/default.aspx/ |
|
34 | http://www.istool.org/default.aspx/ | |
35 |
|
35 | |||
36 | add_path (you need only add_path.exe in the zip file) |
|
36 | add_path (you need only add_path.exe in the zip file) | |
37 | http://www.barisione.org/apps.html#add_path |
|
37 | http://www.barisione.org/apps.html#add_path | |
38 |
|
38 | |||
39 | Docutils |
|
39 | Docutils | |
40 | http://docutils.sourceforge.net/ |
|
40 | http://docutils.sourceforge.net/ | |
41 |
|
41 | |||
42 | And, of course, Mercurial itself. |
|
42 | And, of course, Mercurial itself. | |
43 |
|
43 | |||
44 | Once you have all this installed and built, clone a copy of the |
|
44 | Once you have all this installed and built, clone a copy of the | |
45 | Mercurial repository you want to package, and name the repo |
|
45 | Mercurial repository you want to package, and name the repo | |
46 | C:\hg\hg-release. |
|
46 | C:\hg\hg-release. | |
47 |
|
47 | |||
48 | In a shell, build a standalone copy of the hg.exe program: |
|
48 | In a shell, build a standalone copy of the hg.exe program: | |
49 |
|
49 | |||
50 | python setup.py build -c mingw32 |
|
50 | python setup.py build -c mingw32 | |
51 | python setup.py py2exe -b 1 |
|
51 | python setup.py py2exe -b 1 | |
52 |
|
52 | |||
53 | Note: the previously suggested combined command of "python setup.py build -c |
|
53 | Note: the previously suggested combined command of "python setup.py build -c | |
54 | mingw32 py2exe -b 1" doesn't work correctly anymore as it doesn't include the |
|
54 | mingw32 py2exe -b 1" doesn't work correctly anymore as it doesn't include the | |
55 | extensions in the mercurial subdirectory. |
|
55 | extensions in the mercurial subdirectory. | |
56 |
|
56 | |||
57 | If you want to create a file named setup.cfg with the contents: |
|
57 | If you want to create a file named setup.cfg with the contents: | |
58 |
|
58 | |||
59 | [build] |
|
59 | [build] | |
60 | compiler=mingw32 |
|
60 | compiler=mingw32 | |
61 |
|
61 | |||
62 | you can skip the first build step. |
|
62 | you can skip the first build step. | |
63 |
|
63 | |||
64 | Copy add_path.exe into the dist directory that just got created. |
|
64 | Copy add_path.exe into the dist directory that just got created. | |
65 |
|
65 | |||
66 | If you are using Python up to version 2.5.4, copy mfc71.dll into the dist |
|
66 | If you are using Python up to version 2.5.4, copy mfc71.dll into the dist | |
67 | directory that just got created. |
|
67 | directory that just got created. | |
68 |
|
68 | |||
69 | If you are using Python 2.6 or later, after installing the Visual C++ 2008 |
|
69 | If you are using Python 2.6 or later, after installing the Visual C++ 2008 | |
70 | redistributable package copy into the dist directory that just got created the |
|
70 | redistributable package copy into the dist directory that just got created the | |
71 | following files: |
|
71 | following files: | |
72 | - from the directory starting with |
|
72 | - from the directory starting with | |
73 | Windows/WinSxS/x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8 |
|
73 | Windows/WinSxS/x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8 | |
74 | the files named: msvcm90.dll, msvcp90.dll and msvcr90.dll |
|
74 | the files named: msvcm90.dll, msvcp90.dll and msvcr90.dll | |
75 | - from the directory starting with |
|
75 | - from the directory starting with | |
76 | Windows/WinSxS/x86_Microsoft.VC90.MFC_1fc8b3b9a1e18e3b_9.0.21022.8 |
|
76 | Windows/WinSxS/x86_Microsoft.VC90.MFC_1fc8b3b9a1e18e3b_9.0.21022.8 | |
77 | the files named: mfc90.dll, mfc90u.dll, mfcm90.dll and mfcm90u.dll |
|
77 | the files named: mfc90.dll, mfc90u.dll, mfcm90.dll and mfcm90u.dll | |
78 | - from the directory named Windows/WinSxS/Manifests, the manifest file |
|
78 | - from the directory named Windows/WinSxS/Manifests, the manifest file | |
79 | starting with x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8 |
|
79 | starting with x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8 | |
80 | (rename it to Microsoft.VC90.CRT.manifest) and the manifest file starting |
|
80 | (rename it to Microsoft.VC90.CRT.manifest) and the manifest file starting | |
81 | with x86_Microsoft.VC90.MFC_1fc8b3b9a1e18e3b_9.0.21022.8 (rename it to |
|
81 | with x86_Microsoft.VC90.MFC_1fc8b3b9a1e18e3b_9.0.21022.8 (rename it to | |
82 | Microsoft.VC90.MFC.manifest) |
|
82 | Microsoft.VC90.MFC.manifest) | |
83 |
|
83 | |||
84 | Before building the installer, you have to build Mercurial HTML documentation |
|
84 | Before building the installer, you have to build Mercurial HTML documentation | |
85 |
(or fix mercurial.iss to not reference the doc directory) |
|
85 | (or fix mercurial.iss to not reference the doc directory): | |
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: |
|
|||
92 |
|
86 | |||
93 | cd doc |
|
87 | cd doc | |
94 |
mingw32-make |
|
88 | mingw32-make html | |
95 | cd .. |
|
89 | cd .. | |
96 |
|
90 | |||
97 | If you use ISTool, you open the C:\hg\hg-release\contrib\win32\mercurial.iss |
|
91 | If you use ISTool, you open the C:\hg\hg-release\contrib\win32\mercurial.iss | |
98 | file and type Ctrl-F9 to compile the installer file. |
|
92 | file and type Ctrl-F9 to compile the installer file. | |
99 |
|
93 | |||
100 | Otherwise you run the Inno Setup compiler. Assuming it's in the path |
|
94 | Otherwise you run the Inno Setup compiler. Assuming it's in the path | |
101 | you should execute: |
|
95 | you should execute: | |
102 |
|
96 | |||
103 | iscc contrib\win32\mercurial.iss /DVERSION=foo |
|
97 | iscc contrib\win32\mercurial.iss /DVERSION=foo | |
104 |
|
98 | |||
105 | Where 'foo' is the version number you would like to see in the |
|
99 | Where 'foo' is the version number you would like to see in the | |
106 | 'Add/Remove Applications' tool. The installer will be placed into |
|
100 | 'Add/Remove Applications' tool. The installer will be placed into | |
107 | a directory named Output/ at the root of your repository. |
|
101 | a directory named Output/ at the root of your repository. | |
108 |
|
102 | |||
109 | 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 | |
110 | following: |
|
104 | following: | |
111 |
|
105 | |||
112 | echo [build] > setup.cfg |
|
106 | echo [build] > setup.cfg | |
113 | echo compiler=mingw32 >> setup.cfg |
|
107 | echo compiler=mingw32 >> setup.cfg | |
114 | python setup.py py2exe -b 1 |
|
108 | python setup.py py2exe -b 1 | |
115 | cd doc |
|
109 | cd doc | |
116 |
mingw32-make |
|
110 | mingw32-make html | |
117 | cd .. |
|
111 | cd .. | |
118 | iscc contrib\win32\mercurial.iss /DVERSION=snapshot |
|
112 | iscc contrib\win32\mercurial.iss /DVERSION=snapshot | |
119 |
|
113 | |||
120 | 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