Switch to unified view

a b/website/pages/recoll-mingw.txt
1
= Building Recoll on Microsoft Windows MinGW
2
3
This document describes building a Recoll distribution, starting from a
4
pristine Windows machine, using the http://www.mingw.org/[MinGW] port of gcc
5
and associated tools. 
6
7
The resulting package only needs Python and 7-zip to be installed on the
8
target system.
9
10
== Installing MinGW and MSYS
11
12
Download the installer from http://www.mingw.org/, and run it.
13
14
In the following, a number of commands will use a command window with an
15
MinGW environment. This can be easily created by executing
16
C:\MinGW\msys\1.0\msys.bat from File Explorer.
17
18
== Tortoise HG
19
20
This is needed because there is no source package for recoll or its
21
dependancies for now, you are going to clone Bitbucket repositories.
22
23
Get it from http://tortoisehg.bitbucket.org/download/index.html
24
25
Then clone the repositories for
26
https://medoc@bitbucket.org/medoc/recoll[recoll] to C:/recoll and
27
https://medoc@bitbucket.org/medoc/recoll-windows-deps[some of the
28
dependancies] to C:/recolldeps
29
30
You can change the target names, but there will be more script editing
31
later on then (nothing much).
32
33
== zlib
34
35
Download from http://zlib.net/zlib-1.2.8.tar.gz
36
Then, from an MSYS command window (see above):
37
38
     cd c:/temp
39
     tar xzf path-to-tar-file
40
     cd zlib-1.2.8
41
     make -f Win32/Makefile.gcc
42
43
== Xapian
44
45
Download from:
46
http://oligarchy.co.uk/xapian/1.2.21/xapian-core-1.2.21.tar.xz
47
48
    cd c:/recolldeps
49
    tar xf path-to-tar-file
50
    cd xapian-core-1.2.21
51
52
- Edit common/safeunistd.h to neutralize the sleep() function definition as
53
  this conflicts with the definition which is part of recent mingw
54
  editions. Replace the "#ifdef __WIN32__" with "#if 0". This is
55
  already fixed in later Xapian versions
56
57
Then: 
58
59
    CPPFLAGS=-IC:/temp/zlib-1.2.8 LDFLAGS=-Lc:/temp/zlib-1.2.8 ./configure
60
    make
61
62
== Qt
63
64
Download and install Qt 5.5.x (mingw version) from: http://www.qt.io/download/
65
66
Note: it is not possible to build a static webkit, so the installation is
67
necessarily dynamic, which means that the Qt DLLS will need to be copied
68
into the installation directory. This is done by the installation-building
69
script (using `windeployqt`)
70
71
== Recoll
72
73
You need to use the source from the repository, there is no release
74
supporting Windows at the moment.
75
76
- If not already done, clone the recoll repository from:
77
  https://medoc@bitbucket.org/medoc/recoll to `C:/recoll`
78
79
- Start qtcreator and open c:/recoll/src/windows/qmkrecoll/librecoll.pro At
80
  the bottom of the file, you may need to fix the locations for the xapian
81
  and zlib dlls.
82
83
- Build librecoll.pro
84
85
- Do the same (adjust locations and build) for:
86
  c:/recoll/src/windows/qmkrecoll/rclstartw.pro
87
  c:/recoll/src/windows/qmkrecoll/recollindex.pro
88
  c:/recoll/src/windows/qmkrecoll/recollq.pro
89
  c:/recoll/src/qtgui/recoll-win.pro
90
91
92
== Helper applications
93
94
There are a number of useful files stored in a BitBucket repository, you
95
will need to clone it on the windows machine (the final script,
96
mkinstdir.sh, expects C:/recolldeps as a cloned location).
97
98
    https://medoc@bitbucket.org/medoc/recoll-windows-deps
99
100
== 7-zip
101
102
7-zip is used for all decompression tasks. Install it from
103
http://www.7-zip.org/ 
104
105
== Python
106
107
All Recoll helper scripts (data extractors) are written in Python, and not
108
yet compatible with Python3. You need to install and download Python 2.7
109
from https://www.python.org/downloads/release/python-2710/
110
111
== Python modules
112
113
Some data formats need library modules not delivered as part of the base
114
Python installation
115
116
=== libxml2/libxslt
117
118
The precompiled binary is from :
119
http://users.skynet.be/sbi/libxml-python/
120
http://users.skynet.be/sbi/libxml-python/binaries/libxml2-python-2.7.7.win32-py2.7.exe
121
122
The useful parts are stored in recoll-windows-deps repo
123
124
Slightly newer dlls, which should be compatible, here:
125
https://www.zlatkovic.com/libxml.en.html
126
127
This will be copied into the installation by the mkinstdir.sh script.
128
129
=== mutagen 
130
131
Download and extract mutagen from https://pypi.python.org/pypi/mutagen
132
Then in the mutagen directory (e.g. C:/temp/mutagen-1.31):
133
134
     python setup.py build
135
136
=== pyexiv2
137
138
I did not attempt a build (needs boost-python, scons).
139
Used an installer from http://tilloy.net/dev/pyexiv2/download.html
140
141
The resulting site-packages data is stored in the recoll-windows-deps
142
directory and copied into the filters directory by the mkinstdir.sh script
143
144
=== epub 
145
146
Download from: http://pypi.python.org/pypi/epub/
147
148
Extract, then execute the following in the extracted directory (e.g.:
149
C:/temp/epub-0.5.2):
150
 
151
   python setup.py
152
153
The module will be copied by mkinstdir.sh
154
155
156
== Non-Python helpers
157
158
== unrtf 
159
160
I initially built unrtf with VS 2015, and I was too lazy to do it again
161
with mingw. The project files are in the Windows directory in the official
162
repository: 
163
            
164
    hg clone http://hg.savannah.gnu.org/hgweb/unrtf/
165
166
== antiword
167
168
Use the source from recoll-windows-deps (C:/recolldeps/unrtf)
169
170
     make -f Makefile.mingw.
171
172
== Poppler
173
174
Did not try to compile. Used the binaries from 
175
http://blog.alivate.com.au/poppler-windows/ 
176
177
There is a copy in the recoll-windows-deps repository, it will be copied by
178
the mkinstdir.sh script.
179
180
== Building the install directory
181
182
183
Once the builds above are performed, edit the mkinstdir.sh script to adjust
184
the locations, and use it to build the installation directory
185