monotone

monotone Mtn Source Tree

Root/INSTALL_windows_native.txt

1See INSTALL for general notes, such as running 'make' and 'make check'
2
3on 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
15The most recent MinGW installer mingw-get-inst-20120426 contains g++
164.6.2; this is broken for C++ exceptions on MinGW. So we use an
17earlier installer mingw-get-inst-20110211, containing g++ 4.5.2 and a
18catalog of other binary packages that are consistent with that runtime.
19
20Package | Version | location
21--------------------------
22Python | 2.7.3 | http://www.python.org/
23 | "Windows Installer" under "Quick Links (2.7.3)"
24 | Used for the Botan install; that does not work with Python 3.2.3
25mingw-get-inst|20110211 | http://sourceforge.net/projects/mingw/files/
26 | -> Installer
27 | -> mingw-get-inst
28 | -> mingw-get-inst-20110211
29 | -> mingw-get-inst-20110211.exe - _not_ the most recent; see above
30boost | 1.49.0 | http://sourceforge.net/projects/boost/files/
31 | -> boost -> 1.49.0 -> boost_1_49_0.tar.bz2
32 | lua-5.1.4.tar.gz
33pcre | 8.30 | http://www.pcre.org/
34 | -> ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
35 | -> pcre-8.30.tar.bz2
36botan | 1.10.1 | http://botan.randombit.net/download.html
37 | "Source: >tar/gzip<" under "Current Stable Release"
38 | _not_ the "windows binary installer"
39sqlite3 | 3.7.11 | http://www.sqlite.org/download.html
40 | -> sqlite-autoconf-3071100.tar.gz
41libidn | 1.24 | ftp://ftp.gnu.org/gnu/libidn/
42 | -> libidn-1.24.tar.gz
43Depends.exe | | http://www.dependencywalker.com/ ; also comes with Visual Studio
44
45In general, there are two versions of most tools on the
46MinGW site; mingw and msys. MinGW versions are intended to
47be run from a DOS shell, msys versions from an Msys shell.
48monotone configure requires the Msys shell, so we need the
49msys versions of autoconf and automake.
50
51Other tools will be linked with the monotone MinGW
52executable, so we need the MinGW versions of those.
53
54The tools listed here are sufficient to build the monotone
55executable and html and info documentation. However, the
56'distcheck' target also builds the documentation in
57postscript format, which requires tools not (yet) available
58for MinGW.
59
60The commands below assume you download files to C:\MinGW\Msys\1.0\ , which
61maps to both / and /usr/ under the MinGW shell.
62
6301. Python (needed for the Botan configure script)
64 01.1 Run the installer, accept all defaults.
65 01.2 Add python to your PATH
66 Right-click on "My Computer", select "Properties"
67 Go to the "Advanced" tab, and click on "Environment Variables"
68 To add Python to everyone's path:
69 Select "Path" (case-insensitive) in the "System variables" at the botton.
70 Click "Edit".
71 Add ";C:\Python27" (without the quotes) to the end of the value.
72 To add Python to only your path:
73 If there is a "Path" entry in the "User variables for ..." section,
74 edit it as above.
75 If there is not a "Path" entry, click on "New" in the User variables section,
76 and enter "PATH" as the variable name and "C:\Python27" as the value.
77 To verify your new PATH, you can go to Start->Run and enter "cmd", then in the
78 command window run "echo %PATH%" and look for the Python directory in the output.
79
8002. MinGW
81 Run mingw-get-inst-20110211.exe - note that later versions include
82 g++ 4.6.2, which is broken for C++ exceptions on MinGW.
83 Do _not_ update the catalog; use the built-in catalog, to insure the
84 binaries are consistent with the g++ 4.5.2 runtime.
85 At the "Select Components" screen, add:
86 C++ compiler
87 MinGW Developer Toolkit
88 Other than this, accept all defaults.
89 Open the MinGW shell (Start->All Programs->MinGW->MinGW Shell)
90 Run the following:
91 $ mingw-get install msys-autoconf msys-automake
92 $ mingw-get install mingw32-zlib mingw32-libz-dev mingw32-gettext
93
9403. boost; only need headers
95 in MinGW shell:
96 $ cd /usr
97 $ mkdir src
98 $ cd src
99 $ tar -jxf ../boost_1_49_0.tar.bz2
100 This may give errors about a value out of gid_t range, and then say
101 "Exiting with failure status due to previous errors"; you can
102 ignore this.
103 $ cd boost_1_49_0
104 $ cp -a boost /mingw/include
105
10604. Lua
107 in MinGW shell:
108 $ cd /usr/src
109 $ tar -zxf ../lua-5.20.tar.gz
110 $ cd lua-5.2.0
111 $ make mingw INSTALL_TOP=/mingw
112 $ make install INSTALL_TOP=/mingw
113
11405. pcre
115 $ cd /usr/src
116 $ tar -jxf ../pcre-8.30.tar.bz2
117 $ cd pcre-8.30
118 $ ./configure --prefix=/mingw
119 $ make install
120
12106. botan
122 $ cd /usr/src
123 $ tar -zxf ../Botan-1.10.1.tgz
124 $ cd Botan-1.10.1
125
126 On a 64 bit machine, configure will default to 64 bit compilation
127 options. However, some Botan source files do not yet support 64
128 bits. So force 32 bits.
129 $ ./configure.py --cc=gcc --os=mingw --cpu=x86_32
130
131 The Botan configure script generates paths with Python's
132 os.path.join(...), which in the case of the Windows Python
133 we installed uses '\' as the path separator. There are a
134 couple of places in the Makefile where this causes problems.
135 $ sed -i 's#\\\(.\)#/\1#g' Makefile
136
137 $ make install
138
13907. sqlite3
140 $ cd /usr/src
141 $ tar -zxf ../sqlite-autoconf-3071100.tar.gz
142 $ cd sqlite-autoconf-3071100
143 $ ./configure --prefix=/mingw
144 $ make install
145
14608. libidn
147 $ cd /usr/src
148 $ tar -zxf ../libidn-1.24.tar.gz
149 $ cd libidn-1.24
150 $ ./configure --prefix=/mingw
151 $ make install
152
15309. Depends.exe
154 If you have Visual Studio installed, you should be able to skip this.
155 If you don't, then download the appropriate depends*.zip and
156 unpack it someplace in your %PATH% (for example, C:\MinGW\bin\).
157 This is only used by the testsuite, in particular the empty_environment test.
158 If you just want to build monotone for your own use, you can skip this and
159 just ignore that test failing.
160
16110. build monotone
162 You can skip the CXXFLAGS and LDFLAGS if you really want to, but if you do that
163 then libgcc_s and libstdc++-6 will be linked dynamically and the resulting
164 monotone binary will take several extra seconds to start.
165 $ cd /c/.../monotone
166 $ autoreconf -i # not needed if you use the distributed tarball
167 $ export CXXFLAGS="-static-libgcc -static-libstdc++ -g -O2 -Wall"
168 $ export LDFLAGS="-static-libgcc -static-libstdc++"
169 $ export botan_CFLAGS="-I/mingw/include/botan-1.10"
170 $ export botan_LIBS="-lbotan-1.10"
171 $ ./configure
172 $ make
173
174See innosetup/README.txt for instructions on building the native Win32 installer.

Archive Download this file

Branches

Tags

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