From 6ad7ab5f057fbbb2204ddb636d70f403d1e6a28d Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Thu, 8 Oct 2015 16:13:15 +0200 Subject: [PATCH] doc --- src/windows/00-WINDOWS-BUILD.txt | 72 ++++++++++++++++++++++++++++++++ src/windows/mimeconf | 53 +++++++++++++++++++++++ src/windows/mkinstdir.sh | 23 ++++++---- 3 files changed, 139 insertions(+), 9 deletions(-) create mode 100644 src/windows/00-WINDOWS-BUILD.txt create mode 100644 src/windows/mimeconf diff --git a/src/windows/00-WINDOWS-BUILD.txt b/src/windows/00-WINDOWS-BUILD.txt new file mode 100644 index 00000000..5e11068c --- /dev/null +++ b/src/windows/00-WINDOWS-BUILD.txt @@ -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. + + diff --git a/src/windows/mimeconf b/src/windows/mimeconf new file mode 100644 index 00000000..5cd07a3a --- /dev/null +++ b/src/windows/mimeconf @@ -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 diff --git a/src/windows/mkinstdir.sh b/src/windows/mkinstdir.sh index c2b32b92..432acafb 100644 --- a/src/windows/mkinstdir.sh +++ b/src/windows/mkinstdir.sh @@ -17,6 +17,7 @@ ANTIWORD=c:/recolldeps/antiword CONFIGURATION=Debug 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 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 @@ -40,16 +41,21 @@ cc() cp $1 $2 || exit 1 } +copyxapian() +{ + cc $LIBXAPIAN $DESTDIR +} + copyrecoll() { # bindir=$RECOLL/windows/$PLATFORM/$CONFIGURATION/ # cc $bindir/recollindex.exe $DESTDIR # cc $bindir/recollq.exe $DESTDIR # cc $bindir/pthreadVC2.dll $DESTDIR - cp $LIBR $DESTDIR || fatal copy librecoll - cp $GUIBIN $DESTDIR || fatal copy recoll.exe - cp $RCLIDX $DESTDIR || fatal copy recollindex.exe - cp $RCLQ $DESTDIR || fatal copy recollq.exe + cc $LIBR $DESTDIR + cc $GUIBIN $DESTDIR + cc $RCLIDX $DESTDIR + cc $RCLQ $DESTDIR cc $RECOLL/sampleconf/fields $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.qss $DESTDIR/Share/examples + cc $RECOLL/python/recoll/recoll/rclconfig.py $FILTERS + 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 - + cp $RECOLL/qtgui/mtpics/* $DESTDIR/Share/images || fatal copy images cp $RECOLL/qtgui/i18n/*.qm $DESTDIR/Share/translations - } 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 done +copyxapian copyrecoll copyunrtf copyantiword