Show More
@@ -1,106 +1,109 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 | GnuWin32 gettext utility | |
|
25 | http://gnuwin32.sourceforge.net/packages/gettext.htm | |
|
26 | ||
|
24 | 27 | Inno Setup |
|
25 | 28 | http://www.jrsoftware.org/isinfo.php |
|
26 | 29 | |
|
27 | 30 | ISTool - optional |
|
28 | 31 | http://www.istool.org/default.aspx/ |
|
29 | 32 | |
|
30 | 33 | add_path (you need only add_path.exe in the zip file) |
|
31 | 34 | http://www.barisione.org/apps.html#add_path |
|
32 | 35 | |
|
33 | 36 | Asciidoc - optional |
|
34 | 37 | http://www.methods.co.nz/asciidoc/ |
|
35 | 38 | |
|
36 | 39 | And, of course, Mercurial itself. |
|
37 | 40 | |
|
38 | 41 | Once you have all this installed and built, clone a copy of the |
|
39 | 42 | Mercurial repository you want to package, and name the repo |
|
40 | 43 | C:\hg\hg-release. |
|
41 | 44 | |
|
42 | 45 | In a shell, build a standalone copy of the hg.exe program: |
|
43 | 46 | |
|
44 | 47 | python setup.py build -c mingw32 |
|
45 | 48 | python setup.py py2exe -b 1 |
|
46 | 49 | |
|
47 | 50 | Note: the previously suggested combined command of "python setup.py build -c |
|
48 | 51 | mingw32 py2exe -b 1" doesn't work correctly anymore as it doesn't include the |
|
49 | 52 | extensions in the mercurial subdirectory. |
|
50 | 53 | |
|
51 | 54 | If you want to create a file named setup.cfg with the contents: |
|
52 | 55 | |
|
53 | 56 | [build] |
|
54 | 57 | compiler=mingw32 |
|
55 | 58 | |
|
56 | 59 | you can skip the first build step. |
|
57 | 60 | |
|
58 | 61 | Copy add_path.exe into the dist directory that just got created. |
|
59 | 62 | |
|
60 | 63 | If you are using Python up to version 2.5.4, copy mfc71.dll into the dist |
|
61 | 64 | directory that just got created. |
|
62 | 65 | |
|
63 | 66 | If you are using Python 2.6 or later, after installing the Visual C++ 2008 |
|
64 | 67 | redistributable package copy into the dist directory that just got created the |
|
65 | 68 | following files: |
|
66 | 69 | - from the directory starting with |
|
67 | 70 | Windows/WinSxS/x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8 |
|
68 | 71 | the files named: msvcm90.dll, msvcp90.dll and msvcr90.dll |
|
69 | 72 | - from the directory starting with |
|
70 | 73 | Windows/WinSxS/x86_Microsoft.VC90.MFC_1fc8b3b9a1e18e3b_9.0.21022.8 |
|
71 | 74 | the files named: mfc90.dll, mfc90u.dll, mfcm90.dll and mfcm90u.dll |
|
72 | 75 | - from the directory named Windows/WinSxS/Manifests, the manifest file |
|
73 | 76 | starting with x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8 |
|
74 | 77 | (rename it to Microsoft.VC90.CRT.manifest) and the manifest file starting |
|
75 | 78 | with x86_Microsoft.VC90.MFC_1fc8b3b9a1e18e3b_9.0.21022.8 (rename it to |
|
76 | 79 | Microsoft.VC90.MFC.manifest) |
|
77 | 80 | |
|
78 | 81 | Before building the installer, you have to build Mercurial HTML documentation |
|
79 | 82 | (or fix mercurial.iss to not reference the doc directory). Assuming you have an |
|
80 | 83 | "asciidoc.bat" batch file somewhere in your PATH: |
|
81 | 84 | |
|
82 | 85 | cd doc |
|
83 | 86 | mingw32-make ASCIIDOC=asciidoc.bat html |
|
84 | 87 | cd .. |
|
85 | 88 | |
|
86 | 89 | If you use ISTool, you open the C:\hg\hg-release\contrib\win32\mercurial.iss |
|
87 | 90 | file and type Ctrl-F9 to compile the installer file. |
|
88 | 91 | |
|
89 | 92 | Otherwise you run the Inno Setup compiler. Assuming it's on the path you run: |
|
90 | 93 | |
|
91 | 94 | iscc contrib\win32\mercurial.iss |
|
92 | 95 | |
|
93 | 96 | The actual installer will be in the C:\hg\hg-release\Output directory. |
|
94 | 97 | |
|
95 | 98 | To automate the steps above you may want to create a batchfile based on the |
|
96 | 99 | following: |
|
97 | 100 | |
|
98 | 101 | echo [build] > setup.cfg |
|
99 | 102 | echo compiler=mingw32 >> setup.cfg |
|
100 | 103 | python setup.py py2exe -b 1 |
|
101 | 104 | cd doc |
|
102 | 105 | mingw32-make ASCIIDOC=asciidoc.bat html |
|
103 | 106 | cd .. |
|
104 | 107 | iscc contrib\win32\mercurial.iss |
|
105 | 108 | |
|
106 | 109 | 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