This commit is contained in:
Jean-Francois Dockes 2015-10-13 17:31:26 +02:00
parent e749e72628
commit 8fa6085968
4 changed files with 103 additions and 99 deletions

View file

@ -1,72 +0,0 @@
= Building Recoll on Windows
The port of Recoll to Windows was begun using Microsoft VS 2015, and
there are functional project files for recollindex and recollq in this
directory.
However, no version of Qt supporting VS 2015 was available when needed
(10-2015), so that the port was completed using the MinGW version of Qt.
At this point it is easiest to use MinGW for everything.
Both the GUI and the non-GUI parts (library, recollindex, recollq) are
built using Qt qmake/qcreator projects:
windows/qmkrecoll/librecoll.pro
windows/qmkrecoll/recollq.pro
windows/qmkrecoll/recollindex.pro
qtgui/recoll.pro
Only the names of the intermediary files (xapian and recoll libs) should
need adjustment in the project files. Just open librecoll.pro in qtcreator,
build it, see where it puts the lib, and adjust the other files.
== Walkthrough
Here follows a tentative recipee for building recoll on windows 7. This was
reconstructed after actually doing it, and not tried again on a pristine
system, so there may be things missing
- Install Qt 5.x, use the MinGW binary version
- Install the current version of MinGW, possibly check compatibility with
the one which comes with Qt (versions not too far away). The reason for
doing this is that the Qt copy does not come with msys, which is
convenient for working with non-qmake projects (zlib and Xapian).
- Start a command window with the appropriate MinGW/Msys environment (use
MinGW/msys/x.x/msys.bat). All the following is done from the msys window
(so that commands like tar etc. are available). Except for the
qt-creator parts of course.
- Extract zlib (use a tar distrib and msys tar).
- From the top of the extracted zlib tree, as from instructions inside
Makefile.gcc:
make -fwin32/Makefile.gcc
make test testdll -fwin32/Makefile.gcc
- Extract xapian
- Configure with:
LDFLAGS=-Lc:/recolldeps/zlib-1.2.8 \
CPPFLAGS=-Ic:/recolldeps/zlib-1.2.8 \
./configure
(Change according to where you built zlib, of course).
- make
- This will produce .libs/libxapian-22.dll which I just used in the recoll
.pro files and also copied into the install bin directory.
- Then update the .pro files with the Xapian location (includes and lib)
- Build librecoll.pro
- Update the other project files with the librecoll location
- Build them
- Update the windows/mkinstdir.sh with the actual locations of the libs etc.
Curiously, there does not seem to be a need to copy zlib1.dll to the
install dir ???
Then build unrtf and antiword (or get them from somewhere...). Update, then
finally run mkinstdir.sh
You should have a working recoll installation.

View file

@ -3,7 +3,7 @@
.txt.html: .txt.html:
asciidoc $< asciidoc $<
all: recoll-mingw.html all: recoll-mingw.html recoll-windows.html
clean: clean:
rm -f *.html rm -f *.html

View file

@ -1,4 +1,4 @@
= Building Recoll on Microsoft Windows MinGW = Building Recoll on Microsoft Windows with MinGW
This document describes building a Recoll distribution, starting from a This document describes building a Recoll distribution, starting from a
pristine Windows machine, using the http://www.mingw.org/[MinGW] port of gcc pristine Windows machine, using the http://www.mingw.org/[MinGW] port of gcc
@ -15,11 +15,11 @@ In the following, a number of commands will use a command window with an
MinGW environment. This can be easily created by executing MinGW environment. This can be easily created by executing
C:\MinGW\msys\1.0\msys.bat from File Explorer. 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 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 all the following builds. For this, you will want to execute the following
command in the command window: command in the command window:
export PATH=c:/qt/tools/mingw492_32/bin:$PATH export PATH=/c/qt/tools/mingw492_32/bin:$PATH
== Tortoise HG == Tortoise HG
@ -49,10 +49,14 @@ script (using `windeployqt`)
== zlib == zlib
Download from http://zlib.net/zlib-1.2.8.tar.gz 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): Then, from an MSYS command window (see above):
cd c:/temp cd c:/temp
export PATH=c:/qt/tools/mingw492_32/bin:$PATH
tar xzf path-to-tar-file tar xzf path-to-tar-file
cd zlib-1.2.8 cd zlib-1.2.8
make -f win32/Makefile.gcc make -f win32/Makefile.gcc
@ -62,6 +66,12 @@ Then, from an MSYS command window (see above):
Download from: Download from:
http://oligarchy.co.uk/xapian/1.2.21/xapian-core-1.2.21.tar.xz http://oligarchy.co.uk/xapian/1.2.21/xapian-core-1.2.21.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 cd c:/recolldeps
tar xf path-to-tar-file tar xf path-to-tar-file
cd xapian-core-1.2.21 cd xapian-core-1.2.21
@ -73,8 +83,7 @@ http://oligarchy.co.uk/xapian/1.2.21/xapian-core-1.2.21.tar.xz
Then: Then:
export PATH=c:/qt/tools/mingw492_32/bin:$PATH CPPFLAGS=-I/c/temp/zlib-1.2.8 LDFLAGS=-L/c/temp/zlib-1.2.8 ./configure
CPPFLAGS=-IC:/temp/zlib-1.2.8 LDFLAGS=-Lc:/temp/zlib-1.2.8 ./configure
make make
== Recoll == Recoll
@ -85,13 +94,14 @@ supporting Windows at the moment.
- If not already done, clone the recoll repository from: - If not already done, clone the recoll repository from:
https://medoc@bitbucket.org/medoc/recoll to `C:/recoll` https://medoc@bitbucket.org/medoc/recoll to `C:/recoll`
- Start qtcreator and open c:/recoll/src/windows/qmkrecoll/librecoll.pro At - Start `QtCreator` and open
the bottom of the file, you may need to fix the locations for the xapian `c:/recoll/src/windows/qmkrecoll/librecoll.pro`. At the bottom of the
and zlib dlls. file, you may need to fix the locations for the xapian and zlib dlls.
- Build librecoll.pro - Build librecoll.pro
- Do the same (adjust locations and build) for: - Do the same (adjust locations and build) for:
c:/recoll/src/windows/qmkrecoll/rclstartw.pro c:/recoll/src/windows/qmkrecoll/rclstartw.pro
c:/recoll/src/windows/qmkrecoll/recollindex.pro c:/recoll/src/windows/qmkrecoll/recollindex.pro
c:/recoll/src/windows/qmkrecoll/recollq.pro c:/recoll/src/windows/qmkrecoll/recollq.pro
@ -114,7 +124,7 @@ http://www.7-zip.org/
== Python == Python
All Recoll helper scripts (data extractors) are written in Python, and not All Recoll helper scripts (data extractors) are written in Python, and not
yet compatible with Python3. You need to install and download Python 2.7 yet compatible with Python3. You need to download and install Python 2.7
from https://www.python.org/downloads/release/python-2710/ from https://www.python.org/downloads/release/python-2710/
== Python modules == Python modules
@ -138,43 +148,48 @@ This will be copied into the installation by the mkinstdir.sh script.
=== mutagen === mutagen
Download and extract mutagen from https://pypi.python.org/pypi/mutagen Download and extract mutagen from https://pypi.python.org/pypi/mutagen
Then in the mutagen directory (e.g. C:/temp/mutagen-1.31): Then in the mutagen directory (e.g. C:/temp/mutagen-1.31 where it is
expected by `mkinstdir.sh`):
python setup.py build python setup.py build
=== pyexiv2 The module will be copied by mkinstdir.sh
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 recoll-windows-deps
directory and copied into the filters directory by the mkinstdir.sh script
=== epub === epub
Download from: http://pypi.python.org/pypi/epub/ Download from: http://pypi.python.org/pypi/epub/
Extract, then execute the following in the extracted directory (e.g.: Extract, then execute the following in the extracted directory (e.g.:
C:/temp/epub-0.5.2): `C:/temp/epub-0.5.2` which is expected by `mkinstdir.sh`):
python setup.py python setup.py
The module will be copied by mkinstdir.sh 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 == Non-Python helpers
== unrtf == unrtf
I initially built unrtf with VS 2015, and I was too lazy to do it again The current unrtf sources can be built with MinGW.
with mingw. The project files are in the Windows directory in the official
repository:
hg clone http://hg.savannah.gnu.org/hgweb/unrtf/ hg clone http://hg.savannah.gnu.org/hgweb/unrtf/
cd c:/unrtf/Windows
make -f Makefile.mingw
== antiword == antiword
Use the source from recoll-windows-deps (C:/recolldeps/unrtf) Use the source from recoll-windows-deps (C:/recolldeps/antiword)
make -f Makefile.mingw. make -f Makefile.mingw.
@ -188,7 +203,5 @@ the mkinstdir.sh script.
== Building the install directory == Building the install directory
Once the builds above are performed, edit the mkinstdir.sh script to adjust Once the builds above are performed, edit the mkinstdir.sh script to adjust
the locations, and use it to build the installation directory the locations, and use it to build the installation directory

View file

@ -0,0 +1,63 @@
= Trying out Recoll on Windows
The Windows port of Recoll has reached a point where it can be tested. At
least, it will not break your system, and it does not crash too often.
It was only built and tried on Windows 7.
We would be very eager to get some feedback from some actual Windows user
(I am only a visitor to Windows...). Is this useful at all ? What would
make more useful ?
There is no installer for the moment, the program and its auxiliary files
are stored in a Zip file. This is quite big, because it contains a good
part of the Qt 5.5.0 dlls (I can't produce a static build because of WebKit).
The Zip creates a `recoll` directory. As far as I know, there is no
assumption where it should reside, I use `c:/recoll`, but anywhere
else should be ok.
http://www.lesbonscomptes.com/recoll/windows/[Download directory]
Besides extracting the Zip, you need to:
- Download and install Python 2.7 from
https://www.python.org/downloads/release/python-2710/. Most Recoll data
extraction filters have at least a Python part, so you will not be able
to do much without this.
- Download and install the 7-zip program from http://www.7-zip.org/. This
is only useful if you need to index compressed files.
- Update your PATH variable with the locations of the `python` and `7z`
executables.
* From Windows Explorer, click `Computer` in the left pane, then
`System Properties` from the top, then `Avanced System Settings` from
the left pane, then `Environment Variables` at the bottom of the
popup.
* Check that the locations for `python` (`C:\Python27`), and `7z`
(`C:\Program Files\7-Zip`) are either in the User or System PATH
variable. If they are not in there already , update or create the user
PATH and add them as: `C:\Python27;C:\Program Files\7-Zip` (use a
semi-colon as separator).
Know problems:
- The default result list font is particularly ugly. Change it from
`Preferences->GUI Configuration->Result List->Result List Font`
- The GUI sometimes crashes when you click `Preview` or `Open`. This does
not occur often, and usually for one of the first tries after starting
the program. Don't despair.
- There is no real-time or scheduled indexing as on Linux. For now, you
create and update the index by using the `File` menu (or executing
`recollindex.exe` from a command window).
- I'm quite convinced that there are still problems with file path case
insensitivity. The best approach when setting up the config is
to use the exact case for now.
- I'll add the others here as they are found ...