This commit is contained in:
Jean-Francois Dockes 2015-10-08 16:13:15 +02:00
parent 775e1a838b
commit 6ad7ab5f05
3 changed files with 139 additions and 9 deletions

View file

@ -0,0 +1,72 @@
= 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.

53
src/windows/mimeconf Normal file
View file

@ -0,0 +1,53 @@
# The system-wide configuration files for recoll are located in:
# [RECOLLINSTALLDIR]/Share/examples
# The default configuration files are commented, you should take a look
# at them for an explanation of what can be set (you could also take a look
# at the manual instead).
# Values set in this file will override the system-wide values for the file
# with the same name in the central directory. The syntax for setting
# values is identical.
[index]
application/msword = execm python rcldoc.py
text/rtf = execm python rclrtf.py
application/pdf = execm python rclmpdf.py
application/vnd.ms-excel = execm python rclxls.py
application/vnd.ms-powerpoint = execm python rclppt.py
application/vnd.oasis.opendocument.text = execm python rclsoff.py
application/vnd.oasis.opendocument.text-template = execm python rclsoff.py
application/vnd.oasis.opendocument.presentation = execm python rclsoff.py
application/vnd.oasis.opendocument.spreadsheet = execm python rclsoff.py
application/vnd.oasis.opendocument.graphics = execm python rclsoff.py
application/vnd.sun.xml.calc = execm python rclsoff.py
application/vnd.sun.xml.calc.template = execm python rclsoff.py
application/vnd.sun.xml.draw = execm python rclsoff.py
application/vnd.sun.xml.draw.template = execm python rclsoff.py
application/vnd.sun.xml.impress = execm python rclsoff.py
application/vnd.sun.xml.impress.template = execm python rclsoff.py
application/vnd.sun.xml.math = execm python rclsoff.py
application/vnd.sun.xml.writer = execm python rclsoff.py
application/vnd.sun.xml.writer.global = execm python rclsoff.py
application/vnd.sun.xml.writer.template = execm python rclsoff.py
application/vnd.openxmlformats-officedocument.wordprocessingml.document = \
execm python rclopxml.py
application/vnd.openxmlformats-officedocument.wordprocessingml.template = \
execm python rclopxml.py
application/vnd.openxmlformats-officedocument.presentationml.template = \
execm python rclopxml.py
application/vnd.openxmlformats-officedocument.presentationml.presentation = \
execm python rclopxml.py
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet = \
execm python rclopxml.py
application/vnd.openxmlformats-officedocument.spreadsheetml.template =\
execm python rclopxml.py
application/zip = execm python rclzip;charset=default
image/gif = execm perl rclimg
image/jp2 = execm perl rclimg
image/jpeg = execm perl rclimg
image/png = execm perl rclimg
image/tiff = execm perl rclimg
image/x-xcf = execm perl rclimg

View file

@ -17,6 +17,7 @@ ANTIWORD=c:/recolldeps/antiword
CONFIGURATION=Debug CONFIGURATION=Debug
PLATFORM=x64 PLATFORM=x64
LIBXAPIAN=c:/recolldeps/xapian/xapian-core-1.2.21/.libs/libxapian-22.dll
LIBR=C:/recoll/src/windows/build-librecoll-Desktop_Qt_5_5_0_MinGW_32bit-Debug/debug/librecoll.dll LIBR=C:/recoll/src/windows/build-librecoll-Desktop_Qt_5_5_0_MinGW_32bit-Debug/debug/librecoll.dll
GUIBIN=C:/Users/Bill/recoll/src/build-recoll-Desktop_Qt_5_5_0_MinGW_32bit-Debug/debug/recoll.exe GUIBIN=C:/Users/Bill/recoll/src/build-recoll-Desktop_Qt_5_5_0_MinGW_32bit-Debug/debug/recoll.exe
RCLIDX=C:/recoll/src/windows/build-recollindex-Desktop_Qt_5_5_0_MinGW_32bit-Debug/debug/recollindex.exe RCLIDX=C:/recoll/src/windows/build-recollindex-Desktop_Qt_5_5_0_MinGW_32bit-Debug/debug/recollindex.exe
@ -40,16 +41,21 @@ cc()
cp $1 $2 || exit 1 cp $1 $2 || exit 1
} }
copyxapian()
{
cc $LIBXAPIAN $DESTDIR
}
copyrecoll() copyrecoll()
{ {
# bindir=$RECOLL/windows/$PLATFORM/$CONFIGURATION/ # bindir=$RECOLL/windows/$PLATFORM/$CONFIGURATION/
# cc $bindir/recollindex.exe $DESTDIR # cc $bindir/recollindex.exe $DESTDIR
# cc $bindir/recollq.exe $DESTDIR # cc $bindir/recollq.exe $DESTDIR
# cc $bindir/pthreadVC2.dll $DESTDIR # cc $bindir/pthreadVC2.dll $DESTDIR
cp $LIBR $DESTDIR || fatal copy librecoll cc $LIBR $DESTDIR
cp $GUIBIN $DESTDIR || fatal copy recoll.exe cc $GUIBIN $DESTDIR
cp $RCLIDX $DESTDIR || fatal copy recollindex.exe cc $RCLIDX $DESTDIR
cp $RCLQ $DESTDIR || fatal copy recollq.exe cc $RCLQ $DESTDIR
cc $RECOLL/sampleconf/fields $DESTDIR/Share/examples cc $RECOLL/sampleconf/fields $DESTDIR/Share/examples
cc $RECOLL/sampleconf/fragbuts.xml $DESTDIR/Share/examples cc $RECOLL/sampleconf/fragbuts.xml $DESTDIR/Share/examples
@ -59,13 +65,11 @@ copyrecoll()
cc $RECOLL/sampleconf/recoll.conf $DESTDIR/Share/examples cc $RECOLL/sampleconf/recoll.conf $DESTDIR/Share/examples
cc $RECOLL/sampleconf/recoll.qss $DESTDIR/Share/examples cc $RECOLL/sampleconf/recoll.qss $DESTDIR/Share/examples
cc $RECOLL/python/recoll/recoll/rclconfig.py $FILTERS
cp $RECOLL/filters/* $FILTERS || fatal Copy Filters failed cp $RECOLL/filters/* $FILTERS || fatal Copy Filters failed
cp $RECOLL/python/recoll/recoll/rclconfig.py $FILTERS || fatal Copy rclconfig.py failed cp $RECOLL/qtgui/mtpics/* $DESTDIR/Share/images || fatal copy images
cp $RECOLL/qtgui/mtpics/* $DESTDIR/Share/images
cp $RECOLL/qtgui/i18n/*.qm $DESTDIR/Share/translations cp $RECOLL/qtgui/i18n/*.qm $DESTDIR/Share/translations
} }
copyantiword() copyantiword()
@ -95,6 +99,7 @@ for d in doc examples filters images translations; do
test -d $DESTDIR/Share/$d || mkdir -p $DESTDIR/Share/$d || exit 1 test -d $DESTDIR/Share/$d || mkdir -p $DESTDIR/Share/$d || exit 1
done done
copyxapian
copyrecoll copyrecoll
copyunrtf copyunrtf
copyantiword copyantiword