diff --git a/src/Makefile.in b/src/Makefile.in index 8ecf2184..ec8278d3 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -21,9 +21,7 @@ mk/sysconf: versfile=common/rclversion.h ${versfile} : VERSION - echo '#include ' > ${versfile} - echo 'static const char *rclversion = "'`cat VERSION`'"' >> ${versfile} - echo '" + Xapian " XAPIAN_VERSION;' >> ${versfile} + echo 'static const char *rclversionstr = "'`cat VERSION`'";'>> ${versfile} static: mk/sysconf common/rclversion.h cd lib; ${MAKE} diff --git a/src/index/recollindex.cpp b/src/index/recollindex.cpp index 3807b431..02485559 100644 --- a/src/index/recollindex.cpp +++ b/src/index/recollindex.cpp @@ -39,8 +39,8 @@ using namespace std; #include "pathut.h" #include "rclmon.h" #include "x11mon.h" -#include "rclversion.h" #include "cancelcheck.h" +#include "rcldb.h" // Globals for exit cleanup ConfIndexer *confindexer; @@ -256,7 +256,7 @@ Usage(FILE *where = stderr) { FILE *fp = (op_flags & OPT_h) ? stdout : stderr; fprintf(fp, "%s: Usage: %s", thisprog, usage); - fprintf(fp, "Recoll version: %s\n", rclversion); + fprintf(fp, "Recoll version: %s\n", Rcl::version_string().c_str()); exit((op_flags & OPT_h)==0); } diff --git a/src/qtgui/main.cpp b/src/qtgui/main.cpp index 71009f99..b9e19774 100644 --- a/src/qtgui/main.cpp +++ b/src/qtgui/main.cpp @@ -51,7 +51,6 @@ static char rcsid[] = "@(#$Id: main.cpp,v 1.73 2008-12-17 08:01:40 dockes Exp $ #include "rclinit.h" #include "debuglog.h" #ifdef WITH_KDE -#include "rclversion.h" #endif #include "rclmain_w.h" #include "ssearch_w.h" @@ -192,7 +191,8 @@ int main(int argc, char **argv) } #ifdef WITH_KDE - KAboutData about("recoll", I18N_NOOP("Recoll"), rclversion, description, + KAboutData about("recoll", I18N_NOOP("Recoll"), Rcl::version_string(), + description, KAboutData::License_GPL, "(C) 2006 Jean-Francois Dockes", 0, 0, "jean-francois.dockes@wanadoo.fr"); about.addAuthor( "Jean-Francois Dockes", 0, "jean-francois.dockes@wanadoo.fr" ); diff --git a/src/qtgui/rclmain_w.cpp b/src/qtgui/rclmain_w.cpp index 0119ce89..41267c82 100644 --- a/src/qtgui/rclmain_w.cpp +++ b/src/qtgui/rclmain_w.cpp @@ -70,7 +70,6 @@ using std::pair; #include "pathut.h" #include "smallut.h" #include "advsearch_w.h" -#include "rclversion.h" #include "sortseq.h" #include "uiprefs_w.h" #include "guiutils.h" @@ -627,8 +626,9 @@ void RclMain::showExtIdxDialog() void RclMain::showAboutDialog() { - string vstring = string("Recoll ") + rclversion + - "
" + "http://www.recoll.org"; + string vstring = Rcl::version_string() + + string("
http://www.recoll.org") + + string("
http://www.xapian.org"); QMessageBox::information(this, tr("About Recoll"), vstring.c_str()); } void RclMain::showMissingHelpers() diff --git a/src/rcldb/rcldb.cpp b/src/rcldb/rcldb.cpp index 2a442f67..3b3c6f08 100644 --- a/src/rcldb/rcldb.cpp +++ b/src/rcldb/rcldb.cpp @@ -33,6 +33,8 @@ static char rcsid[] = "@(#$Id: rcldb.cpp,v 1.154 2008-12-17 16:19:58 dockes Exp using namespace std; #endif /* NO_NAMESPACES */ +#include "xapian/version.h" + #include "rclconfig.h" #include "rcldb.h" #include "rcldb_p.h" @@ -49,6 +51,7 @@ using namespace std; #include "rclquery.h" #include "rclquery_p.h" #include "md5.h" +#include "rclversion.h" #ifndef MAX #define MAX(A,B) (A>B?A:B) @@ -70,6 +73,11 @@ static const unsigned int baseTextPosition = 100000; namespace Rcl { #endif +string version_string(){ + return string("Recoll ") + string(rclversionstr) + string(" + Xapian ") + + string(Xapian::version_string()); +} + // Synthetic abstract marker (to discriminate from abstract actually // found in document) const static string rclSyntAbs("?!#@"); diff --git a/src/rcldb/rcldb.h b/src/rcldb/rcldb.h index c4ad70b6..e24c0ee0 100644 --- a/src/rcldb/rcldb.h +++ b/src/rcldb/rcldb.h @@ -243,6 +243,10 @@ private: Db& operator=(const Db &) {return *this;}; }; +// This has to go somewhere, and as it needs the Xapian version, this is +// the most reasonable place. +string version_string(); + #ifndef NO_NAMESPACES } #endif // NO_NAMESPACES