monotone

monotone Mtn Source Tree

Root/INSTALL_windows_mingw.txt

1See INSTALL for general notes, such as running 'make' and 'make check'
2
3Compiling on Windows using MinGW:
4
5Here we give sources for the various packages needed. We give
6directions to the download, rather than an exact URL, to make it easy
7to check for new versions.
8
9The versions given here may not be exactly the same versions as used to
10build the current release of monontone.
11
12These instructions work on a new computer, with only
13Windows XP installed.
14
15Some MinGW versions around 20120426 contained g++ 4.6.2, which is
16broken for C++ exceptions on MinGW. Please make sure to use a newer
17gcc version. mingw-get-inst-20110211 is the oldest release known to
18work before that, shipping g++ 4.5.2. We've also had good results with
19g++ 4.8.1.
20
21If you run a 64-bit Windows, you may want to consider MinGW-w64, instead.
22
23http://sourceforge.net/projects/mingw-w64/
24
25
26Package | Version | location
27--------------------------
28Python | 2.7.6 | http://www.python.org/
29 | "Windows Installer" under "Quick Links (2.7.6)"
30 | Used for the Botan install; current Botan versions may
31 | also work with Python 3.3, but 2.7 is still recommended
32mingw-get-inst|20131004 | http://sourceforge.net/projects/mingw/files/
33 | -> Installer
34 | -> mingw-get-inst
35 | Or:
36 | http://sourceforge.net/projects/mingw-w64/
37 | (please check the project website)
38boost | 1.55.0 | http://sourceforge.net/projects/boost/files/
39 | -> boost -> 1.55.0 -> boost_1_55_0.tar.bz2
40lua | 5.2.3 | lua-5.2.3.tar.gz
41pcre | 8.35 | http://www.pcre.org/
42 | -> ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
43 | -> pcre-8.35.tar.bz2
44botan | 1.10.8 | http://botan.randombit.net/download.html
45 | "Source: >tar/gzip<" under "Current Stable Release"
46 | _not_ the "windows binary installer"
47sqlite3 | 3.8.4.3 | http://www.sqlite.org/download.html
48 | -> sqlite-autoconf-3080403.tar.gz
49libiconv | 1.14 | ftp://ftp.gnu.org/gnu/libiconv/
50 | -> libiconv-1.14.tar.gz
51libidn | 1.28 | ftp://ftp.gnu.org/gnu/libidn/
52 | -> libidn-1.24.tar.gz
53 | -> OR: libidn-1.28.win32.zip (binary)
54Depends.exe | | http://www.dependencywalker.com/ ; also comes with Visual Studio
55
56In general, there are two versions of most tools on the
57MinGW site; mingw and msys. MinGW versions are intended to
58be run from a DOS shell, msys versions from an Msys shell.
59monotone configure requires the Msys shell, so we need the
60msys versions of autoconf and automake.
61
62Other tools will be linked with the monotone MinGW
63executable, so we need the MinGW versions of those.
64
65The tools listed here are sufficient to build the monotone
66executable and html and info documentation. However, the
67'distcheck' target also builds the documentation in
68postscript format, which requires tools not (yet) available
69for MinGW.
70
71The commands below assume you download files to C:\MinGW\Msys\1.0\ , which
72maps to both / and /usr/ under the Msys shell.
73
7401. Python (needed for the Botan configure script)
75 01.1 Run the installer, accept all defaults.
76 01.2 Add python to your PATH
77 Right-click on "My Computer", select "Properties"
78 Go to the "Advanced" tab, and click on "Environment Variables"
79 To add Python to everyone's path:
80 Select "Path" (case-insensitive) in the "System variables" at
81 the botton. Click "Edit". Add ";C:\Python27" (without the
82 quotes) to the end of the value.
83 To add Python to only your path:
84 If there is a "Path" entry in the "User variables for ..."
85 section, edit it as above. If there is not a "Path" entry,
86 click on "New" in the User variables section, and enter "PATH"
87 as the variable name and "C:\Python27" as the value.
88 To verify your new PATH, you can go to Start->Run and enter "cmd",
89 then in the command window run "echo %PATH%" and look for the
90 Python directory in the output.
91
9202. MinGW
93
94 Run the installer, then make sure you're not using g++ 4.6.2. You
95 can already select the following components during setup:
96 C++ compiler
97 MinGW Developer Toolkit
98 Other than this, accept all defaults.
99 Open an Msys shell and make sure you have all of the following
100 components installed:
101 $ mingw-get install msys-autoconf msys-automake msys-sed msys-awk
102 $ mingw-get install msys-make mingw32-gcc mingw32-gcc-g++ mingw32-libz
103 $ mingw-get install mingw32-libz-dev mingw32-gettext
104
10503. boost; only need headers
106 in Msys shell:
107 $ cd /usr
108 $ mkdir src
109 $ cd src
110 $ tar -jxf ../boost_1_55_0.tar.bz2
111 $ cd boost_1_55_0
112 $ cp -a boost /c/mingw/include
113
11404. Lua
115 in Msys shell:
116 $ cd /usr/src
117 $ tar -zxf ../lua-5.2.3.tar.gz
118 $ cd lua-5.2.3
119 $ make mingw
120 $ make INSTALL_TOP=/c/mingw install
121
12205. pcre
123 $ cd /usr/src
124 $ tar -jxf ../pcre-8.35.tar.bz2
125 $ cd pcre-8.35
126 $ ./configure --prefix=/c/mingw
127 $ make
128 $ make install
129
13006. botan
131 $ cd /usr/src
132 $ tar -zxf ../Botan-1.10.8.tgz
133 $ cd Botan-1.10.8
134
135 On a 64 bit machine, configure will default to 64 bit compilation
136 options. However, some Botan source files do not yet support 64
137 bits. So force 32 bits.
138 $ ./configure.py --cc=gcc --os=mingw --cpu=x86_32
139
140 The Botan configure script generates paths with Python's
141 os.path.join(...), which in the case of the Windows Python
142 we installed uses '\' as the path separator. There are a
143 couple of places in the Makefile where this causes problems.
144 $ sed -i 's#\\\(.\)#/\1#g' Makefile
145
146 $ make
147 $ make DESTDIR=/c/mingw install
148
14907. sqlite3
150 $ cd /usr/src
151 $ tar -zxf ../sqlite-autoconf-3080403.tar.gz
152 $ cd sqlite-autoconf-3080403
153 $ ./configure --prefix=/c/mingw
154 $ make
155 $ make install
156
15708. libiconv
158 $ cd /usr/src
159 $ tar -zxf ../libiconv-1.14.tar.gz
160 $ cd libiconv-1.14
161 $ ./configure --prefix=/c/mingw
162 $ make
163 $ make install
164
16509. libidn
166 $ cd /usr/src
167 $ tar -zxf ../libidn-1.24.tar.gz
168 $ cd libidn-1.24
169 $ ./configure --prefix=/c/mingw
170 $ make
171 $ make install
172
173 If this fails to compile, you can use the pre-compiled binaries for
174 Windows and copy the DLLs and includes to /c/mingw as appropriate,
175 instead.
176
17710. Depends.exe
178 If you have Visual Studio installed, you should be able to skip this.
179 If you don't, then download the appropriate depends*.zip and
180 unpack it someplace in your %PATH% (for example, C:\MinGW\bin\).
181 This is only used by the testsuite, in particular the empty_environment test.
182 If you just want to build monotone for your own use, you can skip this and
183 just ignore that test failing.
184
18511. build monotone
186 $ cd $MONOTONE_SOURCE_DIR
187 $ autoreconf -i # not needed if you use the distributed tarball
188 $ ./configure \
189 > CXXFLAGS="-static-libstdc++ -g -O2 -Wall" \
190 > LDFLAGS="-static-libstdc++" \
191 > botan_CFLAGS="-I/c/mingw/include/botan-1.10" \
192 > botan_LIBS="-lbotan-1.10"
193 $ make
194 $ make check
195
196 Statically linking against libgcc and libc++ (add '-static-libgcc'
197 to CXXFLAGS and LDFLAGS) may improve starting time of mtn.exe a
198 bit. However, with gcc-4.8.1, we ran into problems with
199 '-static-libgcc', so you may want to stick to the above recommended
200 configure command.
201
202See innosetup/README.txt for instructions on building the native Win32
203installer.

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status