Parent: [841913] (diff)

Download this file

recoll-mingw.txt    275 lines (177 with data), 8.3 kB

  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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
= Building Recoll on Microsoft Windows with MinGW
Jean-Francois Dockes <jf at dockes.org>
This document describes building a Recoll distribution, starting from a
pristine Windows machine, using the http://www.mingw.org/[MinGW] port of gcc
and associated tools.
The resulting package only needs Python (and optionally 7-zip) to be
installed on the target system.
== Installing MinGW and MSYS
Download the installer from http://www.mingw.org/, and run it.
In the following, a number of commands will use a command window with an
MinGW environment. This can be easily created by executing
C:\MinGW\msys\1.0\msys.bat from File Explorer.
NOTE: you should take care to use the gcc compiler which comes with Qt for
all the following builds. For this, you will want to execute the following
command in the command window:
export PATH=/c/qt/tools/mingw492_32/bin:$PATH
== Tortoise HG
This is needed because there is no source package for recoll or its
dependancies for now, you are going to clone Bitbucket repositories.
Get it from http://tortoisehg.bitbucket.org/download/index.html
Then clone the repositories for
https://medoc@bitbucket.org/medoc/recoll[recoll] to C:/recoll and
https://medoc@bitbucket.org/medoc/recoll-windows-deps[some of the
dependancies] to C:/recolldeps
You can change the target names, but there will be more script editing
later on then (nothing much).
== Qt
Download and install Qt 5.5.x (mingw version) from: http://www.qt.io/download/
Note: it is not possible to build a static webkit, so the installation is
necessarily dynamic, which means that the Qt DLLS will need to be copied
into the installation directory. This is done by the installation-building
script (using `windeployqt`)
== zlib
Download from http://zlib.net/zlib-1.2.8.tar.gz
Don't forget the PATH update if not done yet:
export PATH=/c/qt/tools/mingw492_32/bin:$PATH
Then, from an MSYS command window (see above):
cd c:/temp
tar xzf path-to-tar-file
cd zlib-1.2.8
make -f win32/Makefile.gcc
== Xapian
Download from:
http://oligarchy.co.uk/xapian/1.4.1/xapian-core-1.4.1.tar.xz
Don't forget the PATH update if not done yet:
export PATH=/c/qt/tools/mingw492_32/bin:$PATH
Then:
cd c:/recolldeps
tar xf path-to-tar-file
cd xapian-core-1.4.1
- Edit common/safeunistd.h to neutralize the sleep() function definition as
this conflicts with the definition which is part of recent mingw
editions. Replace the "#ifdef __WIN32__" with "#if 0". This is
already fixed in later Xapian versions
Then:
CPPFLAGS=-I/c/temp/zlib-1.2.8 LDFLAGS=-L/c/temp/zlib-1.2.8 ./configure
make
== Recoll
You need to use the source from the repository, there is no release
supporting Windows at the moment.
- If not already done, clone the recoll repository from:
https://medoc@bitbucket.org/medoc/recoll to `C:/recoll`
- Start `QtCreator` and open
`c:/recoll/src/windows/qmkrecoll/librecoll.pro`. At the bottom of the
file, you may need to fix the locations for the xapian and zlib dlls.
- Build librecoll.pro
- Do the same (adjust locations and build) for:
c:/recoll/src/windows/qmkrecoll/rclstartw.pro
c:/recoll/src/windows/qmkrecoll/recollindex.pro
c:/recoll/src/windows/qmkrecoll/recollq.pro
c:/recoll/src/qtgui/recoll-win.pro
== Helper applications
There are a number of useful files stored in a BitBucket repository, you
will need to clone it on the windows machine (the final script,
mkinstdir.sh, expects C:/recolldeps as a cloned location).
https://medoc@bitbucket.org/medoc/recoll-windows-deps
== 7-zip
7-zip is used for all decompression tasks. Install it from
http://www.7-zip.org/
== Python
All Recoll helper scripts (data extractors) are written in Python, and not
yet compatible with Python3. You need to download and install Python 2.7
from https://www.python.org/downloads/release/python-2710/
== Python modules
Some data formats need library modules not delivered as part of the base
Python installation
=== libxml2/libxslt
The precompiled binary is from :
http://users.skynet.be/sbi/libxml-python/
http://users.skynet.be/sbi/libxml-python/binaries/libxml2-python-2.7.7.win32-py2.7.exe
The useful parts are stored in recoll-windows-deps repo
Slightly newer dlls, which should be compatible, here:
https://www.zlatkovic.com/libxml.en.html
This will be copied into the installation by the mkinstdir.sh script.
=== mutagen
Download and extract mutagen from https://pypi.python.org/pypi/mutagen
Then in the mutagen directory (e.g. C:/temp/mutagen-1.32 where it is
expected by `mkinstdir.sh`):
python setup.py build
The module will be copied by mkinstdir.sh
=== epub
Download from: http://pypi.python.org/pypi/epub/
Extract, then execute the following in the extracted directory (e.g.:
`C:/temp/epub-0.5.2` which is expected by `mkinstdir.sh`):
python setup.py
The module will be copied by mkinstdir.sh
=== pyexiv2
I did not attempt a build (needs boost-python, scons).
Used an installer from http://tilloy.net/dev/pyexiv2/download.html
The resulting site-packages data is stored in the recolldeps
repository and copied into the filters directory by the mkinstdir.sh
script.
== Non-Python helpers
== unrtf
The current unrtf sources can be built with MinGW.
hg clone http://hg.savannah.gnu.org/hgweb/unrtf/
cd c:/unrtf/Windows
make -f Makefile.mingw
== antiword
Use the source from recoll-windows-deps (C:/recolldeps/antiword)
make -f Makefile.mingw.
== Poppler
Did not try to compile. Used the binaries from
http://blog.alivate.com.au/poppler-windows/
There is a copy in the recoll-windows-deps repository, it will be copied by
the mkinstdir.sh script.
== libwpd
We use the wpd2html tool from libwpd 0.10.0, unmodified. This depends on
librevenge 0.0.1 which has been slightly modified to not depend on boost (a
500 MB install if you can believe it). Both files can be found under the
libwpd directory of the recoll-windows-deps repository.
mkdir c:/temp/libwpd
cd c:/temp/libwpd
tar xf librevenge-0.0.1.jfd.tar.gz
cd librevenge-0.0.1.jfd
CPPFLAGS=-I/c/temp/zlib-1.2.8 LDFLAGS=-L/c/temp/zlib-1.2.8 configure --disable-tests --without-docs
make
cd ..
tar xf /c/recolldeps/libwpd/libwpd-0.10.0.tar.gz
cd libwpd-0.10.0
REVENGE_CFLAGS=-Ic:/temp/libwpd/librevenge-0.0.1.jfd/inc \
REVENGE_LIBS="-Lc:/temp/libwpd/librevenge-0.0.1.jfd/src/lib/.libs -lrevenge-0.0" \
REVENGE_GENERATORS_CFLAGS=-Ic:/temp/libwpd/librevenge-0.0.1.jfd/inc \
REVENGE_GENERATORS_LIBS="-Lc:/temp/libwpd/librevenge-0.0.1.jfd/src/lib/.libs -lrevenge-generators-0.0" \
REVENGE_STREAM_CFLAGS=-Ic:/temp/libwpd/librevenge-0.0.1.jfd/inc \
REVENGE_STREAM_LIBS="-Lc:/temp/libwpd/librevenge-0.0.1.jfd/src/lib/.libs -lrevenge-stream-0.0" \
configure --without-docs
make
== chm
This build uses a slightly modified pychm python modules: for
simplification, the relevant C files from chmlib were included in the
python module itself (in addition to its own C extension file).
The source package is inside the recoll-windows-deps repository as
pychm-0.8.4.1-git.tar.gz. The build result is also stored, and will be used
directly by the install building script, so the following instructions are
for reference.
To build the pychm module:
cd c:/temp
tar xf pychm-0.8.4.1-git.tar.gz
cd pychm-0.8.4.1-git
python setup.py build
Will probably complain about a missing vc++ compiler, and indicate where to
download VC++ for Python 2.7 (an official Microsoft location). Do it, then
repeat the command:
python setup.py build
python setup.py bdist
This creates a zip file inside the dist subdirectory. The contents of this
zip are extracted and the chm/ directory is stored in the
recoll-windows-deps repo for convenience (under pychm/chm) and copied to
the recoll install dir by the install script.
== Building the install directory
Once the builds above are performed, edit the mkinstdir.sh script to adjust
the locations, and use it to build the installation directory. The
innosetup script expects it to be c:/install/recoll
== Building the setup executable
Install Inno Setup and use src/windows/recoll-setup.iss to generate the
installation executable.