File: INSTALL_windows_mingw.txt

package info (click to toggle)
monotone 1.1-4+deb8u2
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 20,664 kB
  • ctags: 8,113
  • sloc: cpp: 86,443; sh: 6,906; perl: 924; makefile: 838; python: 517; lisp: 379; sql: 118; exp: 91; ansic: 52
file content (203 lines) | stat: -rw-r--r-- 7,886 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
See INSTALL for general notes, such as running 'make' and 'make check'

Compiling on Windows using MinGW:

Here we give sources for the various packages needed. We give
directions to the download, rather than an exact URL, to make it easy
to check for new versions.

The versions given here may not be exactly the same versions as used to
build the current release of monontone.

These instructions work on a new computer, with only
Windows XP installed.

Some MinGW versions around 20120426 contained g++ 4.6.2, which is
broken for C++ exceptions on MinGW. Please make sure to use a newer
gcc version. mingw-get-inst-20110211 is the oldest release known to
work before that, shipping g++ 4.5.2. We've also had good results with
g++ 4.8.1.

If you run a 64-bit Windows, you may want to consider MinGW-w64, instead.

http://sourceforge.net/projects/mingw-w64/


Package       | Version | location
--------------------------
Python        | 2.7.6   | http://www.python.org/
                        | "Windows Installer" under "Quick Links (2.7.6)"
                        | Used for the Botan install; current Botan versions may
                        | also work with Python 3.3, but 2.7 is still recommended
mingw-get-inst|20131004 | http://sourceforge.net/projects/mingw/files/
                        | -> Installer
                        | -> mingw-get-inst
                        | Or:
                        | http://sourceforge.net/projects/mingw-w64/
                        | (please check the project website)
boost         | 1.55.0  | http://sourceforge.net/projects/boost/files/
                        | -> boost -> 1.55.0 -> boost_1_55_0.tar.bz2
lua           | 5.2.3   | lua-5.2.3.tar.gz
pcre          | 8.35    | http://www.pcre.org/
                        | -> ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
                        | -> pcre-8.35.tar.bz2
botan         | 1.10.8  | http://botan.randombit.net/download.html
                        | "Source: >tar/gzip<" under "Current Stable Release"
                        | _not_ the "windows binary installer"
sqlite3       | 3.8.4.3 | http://www.sqlite.org/download.html
                        | -> sqlite-autoconf-3080403.tar.gz
libiconv      | 1.14    | ftp://ftp.gnu.org/gnu/libiconv/
                        | -> libiconv-1.14.tar.gz
libidn        | 1.28    | ftp://ftp.gnu.org/gnu/libidn/
                        | -> libidn-1.24.tar.gz
                        | -> OR: libidn-1.28.win32.zip (binary)
Depends.exe   |         | http://www.dependencywalker.com/ ; also comes with Visual Studio

In general, there are two versions of most tools on the
MinGW site; mingw and msys. MinGW versions are intended to
be run from a DOS shell, msys versions from an Msys shell.
monotone configure requires the Msys shell, so we need the
msys versions of autoconf and automake.

Other tools will be linked with the monotone MinGW
executable, so we need the MinGW versions of those.

The tools listed here are sufficient to build the monotone
executable and html and info documentation. However, the
'distcheck' target also builds the documentation in
postscript format, which requires tools not (yet) available
for MinGW.

The commands below assume you download files to C:\MinGW\Msys\1.0\ , which
maps to both / and /usr/ under the Msys shell.

01. Python (needed for the Botan configure script)
  01.1 Run the installer, accept all defaults.
  01.2 Add python to your PATH
    Right-click on "My Computer", select "Properties"
    Go to the "Advanced" tab, and click on "Environment Variables"
    To add Python to everyone's path:
      Select "Path" (case-insensitive) in the "System variables" at
      the botton.  Click "Edit".  Add ";C:\Python27" (without the
      quotes) to the end of the value.
    To add Python to only your path:
      If there is a "Path" entry in the "User variables for ..."
      section, edit it as above.  If there is not a "Path" entry,
      click on "New" in the User variables section, and enter "PATH"
      as the variable name and "C:\Python27" as the value.
    To verify your new PATH, you can go to Start->Run and enter "cmd",
    then in the command window run "echo %PATH%" and look for the
    Python directory in the output.

02. MinGW

  Run the installer, then make sure you're not using g++ 4.6.2. You
  can already select the following components during setup:
    C++ compiler
    MinGW Developer Toolkit
  Other than this, accept all defaults.
  Open an Msys shell and make sure you have all of the following
  components installed:
  $ mingw-get install msys-autoconf msys-automake msys-sed msys-awk
  $ mingw-get install msys-make mingw32-gcc mingw32-gcc-g++ mingw32-libz
  $ mingw-get install mingw32-libz-dev mingw32-gettext

03. boost; only need headers
  in Msys shell:
  $ cd /usr
  $ mkdir src
  $ cd src
  $ tar -jxf ../boost_1_55_0.tar.bz2
  $ cd boost_1_55_0
  $ cp -a boost /c/mingw/include

04. Lua
  in Msys shell:
   $ cd /usr/src
   $ tar -zxf ../lua-5.2.3.tar.gz
   $ cd lua-5.2.3
   $ make mingw
   $ make INSTALL_TOP=/c/mingw install

05. pcre
   $ cd /usr/src
   $ tar -jxf ../pcre-8.35.tar.bz2
   $ cd pcre-8.35
   $ ./configure --prefix=/c/mingw
   $ make
   $ make install

06. botan
   $ cd /usr/src
   $ tar -zxf ../Botan-1.10.8.tgz
   $ cd Botan-1.10.8

   On a 64 bit machine, configure will default to 64 bit compilation
   options. However, some Botan source files do not yet support 64
   bits. So force 32 bits.
   $ ./configure.py --cc=gcc --os=mingw --cpu=x86_32

   The Botan configure script generates paths with Python's
   os.path.join(...), which in the case of the Windows Python
   we installed uses '\' as the path separator. There are a
   couple of places in the Makefile where this causes problems.
   $ sed -i 's#\\\(.\)#/\1#g' Makefile

   $ make
   $ make DESTDIR=/c/mingw install

07. sqlite3
   $ cd /usr/src
   $ tar -zxf ../sqlite-autoconf-3080403.tar.gz
   $ cd sqlite-autoconf-3080403
   $ ./configure --prefix=/c/mingw
   $ make
   $ make install

08. libiconv
   $ cd /usr/src
   $ tar -zxf ../libiconv-1.14.tar.gz
   $ cd libiconv-1.14
   $ ./configure --prefix=/c/mingw
   $ make
   $ make install

09. libidn
   $ cd /usr/src
   $ tar -zxf ../libidn-1.24.tar.gz
   $ cd libidn-1.24
   $ ./configure --prefix=/c/mingw
   $ make
   $ make install

   If this fails to compile, you can use the pre-compiled binaries for
   Windows and copy the DLLs and includes to /c/mingw as appropriate,
   instead.

10. Depends.exe
   If you have Visual Studio installed, you should be able to skip this.
   If you don't, then download the appropriate depends*.zip and
   unpack it someplace in your %PATH% (for example, C:\MinGW\bin\).
   This is only used by the testsuite, in particular the empty_environment test.
   If you just want to build monotone for your own use, you can skip this and
   just ignore that test failing.

11. build monotone
   $ cd $MONOTONE_SOURCE_DIR
   $ autoreconf -i # not needed if you use the distributed tarball
   $ ./configure                                       \
   >    CXXFLAGS="-static-libstdc++ -g -O2 -Wall"      \
   >    LDFLAGS="-static-libstdc++"                    \
   >    botan_CFLAGS="-I/c/mingw/include/botan-1.10"   \
   >    botan_LIBS="-lbotan-1.10"
   $ make
   $ make check

   Statically linking against libgcc and libc++ (add '-static-libgcc'
   to CXXFLAGS and LDFLAGS) may improve starting time of mtn.exe a
   bit. However, with gcc-4.8.1, we ran into problems with
   '-static-libgcc', so you may want to stick to the above recommended
   configure command.

See innosetup/README.txt for instructions on building the native Win32
installer.