From bdf5cb87553f6cc4f72b39cd837212368dcea3ae Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Wed, 7 Oct 2015 18:02:13 +0200 Subject: [PATCH] Windows: GUI working ok AFAICS --- src/qtgui/rclm_idx.cpp | 7 +++++++ src/qtgui/rclm_wins.cpp | 6 ++++++ src/windows/mkinstdir.sh | 23 ++++++++++++++--------- 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/src/qtgui/rclm_idx.cpp b/src/qtgui/rclm_idx.cpp index c6cb7b12..f798300b 100644 --- a/src/qtgui/rclm_idx.cpp +++ b/src/qtgui/rclm_idx.cpp @@ -267,6 +267,13 @@ void RclMain::rebuildIndex() QMessageBox::Cancel, QMessageBox::NoButton); if (rep == QMessageBox::Ok) { +#ifdef _WIN32 + // Under windows, it's necessary to close the db here, else Xapian + // won't be able to do what it wants with the (open) files. Of course + // if there are several GUI instances, this won't work... + if (rcldb) + rcldb->close(); +#endif // _WIN32 // Could also mean that no helpers are missing, but then we // won't try to show a message anyway (which is what // firstIndexing is used for) diff --git a/src/qtgui/rclm_wins.cpp b/src/qtgui/rclm_wins.cpp index 05e79482..2c61e0bd 100644 --- a/src/qtgui/rclm_wins.cpp +++ b/src/qtgui/rclm_wins.cpp @@ -146,6 +146,12 @@ void RclMain::execIndexSched() } void RclMain::showIndexSched(bool modal) { +#ifdef _WIN32 + QMessageBox::information(this, tr("Index scheduling"), + tr("Sorry, not available under Windows for now, use the File menu entries " + "to update the index")); + return; +#endif LOGDEB(("showIndexSched()\n")); if (indexSched == 0) { indexSched = new IdxSchedW(this); diff --git a/src/windows/mkinstdir.sh b/src/windows/mkinstdir.sh index 45abaf0c..9ba720a1 100644 --- a/src/windows/mkinstdir.sh +++ b/src/windows/mkinstdir.sh @@ -6,13 +6,13 @@ ############## # Local values (to be adjusted) # Target directory where we copy things. -DESTDIR=/cygdrive/c/recollinst +DESTDIR=c:/recollinst # Recoll src/build tree -RECOLL=/cygdrive/c/recoll/src +RECOLL=c:/recoll/src -UNRTF=/cygdrive/c/unrtf -ANTIWORD=/cygdrive/c/recolldeps/antiword +UNRTF=c:/unrtf +ANTIWORD=c:/recolldeps/antiword CONFIGURATION=Debug PLATFORM=x64 @@ -52,8 +52,12 @@ copyrecoll() cc $RECOLL/sampleconf/recoll.conf $DESTDIR/Share/examples cc $RECOLL/sampleconf/recoll.qss $DESTDIR/Share/examples - cp $RECOLL/filters/* $FILTERS || exit 1 - cp $RECOLL/python/recoll/recoll/rclconfig.py $FILTERS || exit 1 + 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/i18n/*.qm $DESTDIR/Share/translations } copyantiword() @@ -79,9 +83,10 @@ copyunrtf() } -test -d $DESTDIR || mkdir -p $DESTDIR || exit 1 -test -d $DESTDIR/Share/examples || mkdir -p $DESTDIR/Share/examples || exit 1 -test -d $FILTERS || mkdir -p $FILTERS || exit 1 +for d in doc examples filters images translations; do + test -d $DESTDIR/Share/$d || mkdir -p $DESTDIR/Share/$d || exit 1 +done + copyrecoll copyunrtf copyantiword