From acb0a9012a99074de4d97449e7180986e2760e67 Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Thu, 8 Oct 2015 15:32:01 +0200 Subject: [PATCH] Pure mingw build ok --- src/filters/rclexecm.py | 4 ++++ src/windows/execmd_w.cpp | 6 ++++++ src/windows/mkinstdir.sh | 22 ++++++++++++---------- src/windows/qmkrecoll/recollindex.pro | 2 +- 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/src/filters/rclexecm.py b/src/filters/rclexecm.py index 0637c6b2..700e540e 100644 --- a/src/filters/rclexecm.py +++ b/src/filters/rclexecm.py @@ -73,6 +73,10 @@ class RclExecM: if sys.platform != "win32": outfile.write(data) else: + # On windows, writing big chunks can fail with a "not enough space" + # error. Seems a combined windows/python bug, depending on versions. + # See https://bugs.python.org/issue11395 + # In any case, just break it up total = len(data) bs = 4*1024 offset = 0 diff --git a/src/windows/execmd_w.cpp b/src/windows/execmd_w.cpp index 3c2d10fc..8dbc7df6 100644 --- a/src/windows/execmd_w.cpp +++ b/src/windows/execmd_w.cpp @@ -376,6 +376,12 @@ ExecCmd::~ExecCmd() } } +// This does nothing under windows, but defining it avoids ifdefs in multiple +// places +void ExecCmd::useVfork(bool) +{ +} + bool ExecCmd::which(const string& cmd, string& exe, const char* path) { static vector s_pathelts; diff --git a/src/windows/mkinstdir.sh b/src/windows/mkinstdir.sh index ab2f2335..c2b32b92 100644 --- a/src/windows/mkinstdir.sh +++ b/src/windows/mkinstdir.sh @@ -17,9 +17,10 @@ ANTIWORD=c:/recolldeps/antiword CONFIGURATION=Debug PLATFORM=x64 -GUIBIN=c:/recoll/src/build-librecoll-Desktop_Qt_5_5_0_MinGW_32bit-Debug/debug/librecoll.dll -GUILIB=c:/Users/Bill/recoll/src/build-recoll-Desktop_Qt_5_5_0_MinGW_32bit-Debug/debug/recoll.exe - +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 +RCLQ=C:/recoll/src/windows/build-recollq-Desktop_Qt_5_5_0_MinGW_32bit-Debug/debug/recollq.exe ################ # Script: @@ -41,11 +42,14 @@ cc() copyrecoll() { - bindir=$RECOLL/windows/$PLATFORM/$CONFIGURATION/ - - cc $bindir/recollindex.exe $DESTDIR - cc $bindir/recollq.exe $DESTDIR - cc $bindir/pthreadVC2.dll $DESTDIR +# 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 $RECOLL/sampleconf/fields $DESTDIR/Share/examples cc $RECOLL/sampleconf/fragbuts.xml $DESTDIR/Share/examples @@ -62,8 +66,6 @@ copyrecoll() cp $RECOLL/qtgui/i18n/*.qm $DESTDIR/Share/translations - cp $GUIBIN $DESTDIR || fatal copy recoll.exe - cp $GUILIB $DESTDIR || fatal copy Gui librecoll } copyantiword() diff --git a/src/windows/qmkrecoll/recollindex.pro b/src/windows/qmkrecoll/recollindex.pro index 90375f93..fb1d2012 100644 --- a/src/windows/qmkrecoll/recollindex.pro +++ b/src/windows/qmkrecoll/recollindex.pro @@ -29,7 +29,7 @@ windows { # Visual Studio } LIBS += \ - C:/recoll/src/build-librecoll-Desktop_Qt_5_5_0_MinGW_32bit-Debug/debug/librecoll.dll \ + C:/recoll/src/windows/build-librecoll-Desktop_Qt_5_5_0_MinGW_32bit-Debug/debug/librecoll.dll \ c:/recolldeps/xapian/xapian-core-1.2.21/.libs/libxapian-22.dll \ c:/recolldeps/zlib-1.2.8/zlib1.dll \ -liconv -lshlwapi -lpsapi -lkernel32