small installation tweaks
This commit is contained in:
parent
b55e443c91
commit
5854ec0208
@ -3,7 +3,7 @@ include ../mk/sysconf
|
||||
LIBS = libmime.a
|
||||
PROGS = trbinc
|
||||
|
||||
all: $(LIBS) $(PROGS)
|
||||
all: $(LIBS)
|
||||
|
||||
SRCS = mime-getpart.cc mime-parsefull.cc mime-parseonlyheader.cc \
|
||||
mime-printbody.cc mime-printdoc.cc mime-printheader.cc mime.cc \
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# @(#$Id: rcldoc,v 1.2 2005-10-19 10:21:48 dockes Exp $ (C) 2004 J.F.Dockes
|
||||
# @(#$Id: rcldoc,v 1.3 2005-10-20 11:33:49 dockes Exp $ (C) 2004 J.F.Dockes
|
||||
# Parts taken from Estraier:
|
||||
#================================================================
|
||||
# Estraier: a personal full-text search system
|
||||
@ -52,6 +52,7 @@ checkcmds()
|
||||
for cmd in $*;do
|
||||
if iscmd $cmd
|
||||
then
|
||||
a=1
|
||||
else
|
||||
echo $cmd not found 1>&2
|
||||
exit 1
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# @(#$Id: rclpdf,v 1.2 2005-10-19 10:21:48 dockes Exp $ (C) 2004 J.F.Dockes
|
||||
# @(#$Id: rclpdf,v 1.3 2005-10-20 11:33:49 dockes Exp $ (C) 2004 J.F.Dockes
|
||||
# This is copied almost verbatim from Estraier:
|
||||
#================================================================
|
||||
# Estraier: a personal full-text search system
|
||||
@ -50,6 +50,7 @@ checkcmds()
|
||||
for cmd in $*;do
|
||||
if iscmd $cmd
|
||||
then
|
||||
a=1
|
||||
else
|
||||
echo $cmd not found 1>&2
|
||||
exit 1
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# @(#$Id: rclps,v 1.2 2005-10-19 10:21:48 dockes Exp $ (C) 2004 J.F.Dockes
|
||||
# @(#$Id: rclps,v 1.3 2005-10-20 11:33:49 dockes Exp $ (C) 2004 J.F.Dockes
|
||||
# Parts taken from Estraier:
|
||||
#================================================================
|
||||
# Estraier: a personal full-text search system
|
||||
@ -51,6 +51,7 @@ checkcmds()
|
||||
for cmd in $*;do
|
||||
if iscmd $cmd
|
||||
then
|
||||
a=1
|
||||
else
|
||||
echo $cmd not found 1>&2
|
||||
exit 1
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# @(#$Id: rclsoff,v 1.2 2005-10-19 10:21:48 dockes Exp $ (C) 2004 J.F.Dockes
|
||||
# @(#$Id: rclsoff,v 1.3 2005-10-20 11:33:49 dockes Exp $ (C) 2004 J.F.Dockes
|
||||
# Parts taken from Estraier:
|
||||
#================================================================
|
||||
# Estraier: a personal full-text search system
|
||||
@ -45,6 +45,7 @@ checkcmds()
|
||||
for cmd in $*;do
|
||||
if iscmd $cmd
|
||||
then
|
||||
a=1
|
||||
else
|
||||
echo $cmd not found 1>&2
|
||||
exit 1
|
||||
|
||||
@ -34,7 +34,7 @@ bool Preview::eventFilter(QObject *target, QEvent *event)
|
||||
if (event->type() != QEvent::KeyPress)
|
||||
return QWidget::eventFilter(target, event);
|
||||
|
||||
LOGDEB(("Preview::eventFilter: keyEvent\n"));
|
||||
LOGDEB1(("Preview::eventFilter: keyEvent\n"));
|
||||
QKeyEvent *keyEvent = (QKeyEvent *)event;
|
||||
if (keyEvent->key() == Key_Q && (keyEvent->state() & ControlButton)) {
|
||||
recollNeedsExit = 1;
|
||||
@ -50,7 +50,7 @@ bool Preview::eventFilter(QObject *target, QEvent *event)
|
||||
QWidget *e = 0;
|
||||
if (tw)
|
||||
e = (QTextEdit *)tw->child("pvEdit");
|
||||
LOGDEB(("Widget: %p, edit %p, target %p\n", tw, e, target));
|
||||
LOGDEB1(("Widget: %p, edit %p, target %p\n", tw, e, target));
|
||||
if (e && target == tw && keyEvent->key() == Key_Slash) {
|
||||
dynSearchActive = true;
|
||||
return true;
|
||||
@ -62,7 +62,7 @@ bool Preview::eventFilter(QObject *target, QEvent *event)
|
||||
|
||||
void Preview::searchTextLine_textChanged(const QString & text)
|
||||
{
|
||||
LOGDEB(("search line text changed. text: '%s'\n", text.ascii()));
|
||||
LOGDEB1(("search line text changed. text: '%s'\n", text.ascii()));
|
||||
if (text.isEmpty()) {
|
||||
dynSearchActive = false;
|
||||
} else {
|
||||
@ -78,8 +78,7 @@ void Preview::searchTextLine_textChanged(const QString & text)
|
||||
// starting from the current position
|
||||
void Preview::doSearch(bool next, bool reverse)
|
||||
{
|
||||
//LOGDEB(("Preview::doSearch: next %d rev %d\n",
|
||||
// int(next), int(reverse)));
|
||||
LOGDEB1(("Preview::doSearch: next %d rev %d\n", int(next), int(reverse)));
|
||||
QWidget *tw = pvTab->currentPage();
|
||||
QTextEdit *edit = 0;
|
||||
if (tw) {
|
||||
@ -108,7 +107,7 @@ void Preview::doSearch(bool next, bool reverse)
|
||||
// Forward search: start from end of selection
|
||||
mspara = mepara;
|
||||
msindex = meindex;
|
||||
//LOGDEB(("New para: %d index %d\n", mspara, msindex));
|
||||
LOGDEB1(("New para: %d index %d\n", mspara, msindex));
|
||||
}
|
||||
}
|
||||
|
||||
@ -151,10 +150,10 @@ void Preview::prevPressed()
|
||||
void Preview::currentChanged(QWidget * tw)
|
||||
{
|
||||
QObject *o = tw->child("pvEdit");
|
||||
LOGDEB(("Preview::currentChanged(). Edit %p\n", o));
|
||||
LOGDEB1(("Preview::currentChanged(). Edit %p\n", o));
|
||||
|
||||
if (o == 0) {
|
||||
LOGDEB(("Editor child not found\n"));
|
||||
LOGERR(("Editor child not found\n"));
|
||||
} else {
|
||||
tw->installEventFilter(this);
|
||||
o->installEventFilter(this);
|
||||
|
||||
@ -50,14 +50,13 @@ void RecollMain::init()
|
||||
asearchform = 0;
|
||||
}
|
||||
|
||||
// We also want to get rid of the advanced search form when we exit
|
||||
// (it's not our children so that it's not systematically created over
|
||||
// the main form).
|
||||
bool RecollMain::close( bool alsoDelete )
|
||||
// We also want to get rid of the advanced search form and previews
|
||||
// when we exit (not our children so that it's not systematically
|
||||
// created over the main form).
|
||||
bool RecollMain::close(bool)
|
||||
{
|
||||
if (asearchform)
|
||||
delete asearchform;
|
||||
return QWidget::close(alsoDelete);
|
||||
fileExit();
|
||||
return false;
|
||||
}
|
||||
|
||||
// We want to catch ^Q everywhere to mean quit.
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#ifndef lint
|
||||
static char rcsid[] = "@(#$Id: rcldb.cpp,v 1.30 2005-10-19 14:14:17 dockes Exp $ (C) 2004 J.F.Dockes";
|
||||
static char rcsid[] = "@(#$Id: rcldb.cpp,v 1.31 2005-10-20 11:33:49 dockes Exp $ (C) 2004 J.F.Dockes";
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
@ -958,7 +958,17 @@ bool Rcl::Db::getDoc(int exti, Doc &doc, int *percent)
|
||||
while (exti >= (int)dbindices.size()) {
|
||||
LOGDEB(("Rcl::Db::getDoc: fetching %d starting at %d\n",
|
||||
qquantum, first));
|
||||
ndb->mset = ndb->enquire->get_mset(first, qquantum);
|
||||
try {
|
||||
ndb->mset = ndb->enquire->get_mset(first, qquantum);
|
||||
} catch (const Xapian::DatabaseModifiedError &error) {
|
||||
ndb->db.reopen();
|
||||
ndb->mset = ndb->enquire->get_mset(first, qquantum);
|
||||
} catch (const Xapian::Error & error) {
|
||||
LOGERR(("enquire->get_mset: exception: %s\n",
|
||||
error.get_msg().c_str()));
|
||||
abort();
|
||||
}
|
||||
|
||||
if (ndb->mset.empty()) {
|
||||
LOGDEB(("Rcl::Db::getDoc: got empty mset\n"));
|
||||
return false;
|
||||
@ -986,7 +996,16 @@ bool Rcl::Db::getDoc(int exti, Doc &doc, int *percent)
|
||||
|
||||
if (!(xapi >= first && xapi <= last)) {
|
||||
LOGDEB(("Fetching for first %d, count %d\n", xapi, qquantum));
|
||||
ndb->mset = ndb->enquire->get_mset(xapi, qquantum);
|
||||
try {
|
||||
ndb->mset = ndb->enquire->get_mset(xapi, qquantum);
|
||||
} catch (const Xapian::DatabaseModifiedError &error) {
|
||||
ndb->db.reopen();
|
||||
ndb->mset = ndb->enquire->get_mset(xapi, qquantum);
|
||||
} catch (const Xapian::Error & error) {
|
||||
LOGERR(("enquire->get_mset: exception: %s\n",
|
||||
error.get_msg().c_str()));
|
||||
abort();
|
||||
}
|
||||
if (ndb->mset.empty())
|
||||
return false;
|
||||
first = ndb->mset.get_firstitem();
|
||||
|
||||
55
src/recollinstall
Executable file
55
src/recollinstall
Executable file
@ -0,0 +1,55 @@
|
||||
#!/bin/sh
|
||||
|
||||
fatal()
|
||||
{
|
||||
echo $*
|
||||
exit 1
|
||||
}
|
||||
usage()
|
||||
{
|
||||
fatal 'installrecoll <targetdir>, ie: installrecoll /usr/local'
|
||||
}
|
||||
install()
|
||||
{
|
||||
src=$1
|
||||
dst=$2
|
||||
if test -d $dst; then dst=$2/`basename $1`;fi
|
||||
if test -f $dst; then
|
||||
bak=$dst.prev
|
||||
#echo "Preserving $dst as $bak"
|
||||
(install $dst $bak)
|
||||
fi
|
||||
echo $src '->' $dst
|
||||
cp $src $dst
|
||||
}
|
||||
|
||||
if test $# != 1 ; then
|
||||
usage
|
||||
fi
|
||||
targetdir=$1
|
||||
|
||||
echo "Installing to $targetdir"
|
||||
|
||||
test -x qtgui/recoll || fatal "qtgui/recoll does not exist." \
|
||||
" You need to build first."
|
||||
|
||||
install qtgui/recoll $targetdir/bin/recoll
|
||||
install index/recollindex $targetdir/bin/recollindex
|
||||
|
||||
if test -d $HOME/.recoll ; then
|
||||
cat <<EOF
|
||||
|
||||
$HOME/.recoll already exists, no modification done.
|
||||
You should check for new filters in the filters/ directory, and
|
||||
for modifications to files in the sampleconf/ directory (ie new
|
||||
mime types in mimemap).
|
||||
EOF
|
||||
exit 0
|
||||
fi
|
||||
|
||||
mkdir $HOME/.recoll || exit 1
|
||||
cp filters/rcl* $HOME/.recoll
|
||||
chmod a+x $HOME/.recoll/rcl*
|
||||
cd sampleconf
|
||||
cp mimeconf mimemap recoll.conf $HOME/.recoll
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user