small installation tweaks
This commit is contained in:
parent
b55e443c91
commit
5854ec0208
@ -3,7 +3,7 @@ include ../mk/sysconf
|
|||||||
LIBS = libmime.a
|
LIBS = libmime.a
|
||||||
PROGS = trbinc
|
PROGS = trbinc
|
||||||
|
|
||||||
all: $(LIBS) $(PROGS)
|
all: $(LIBS)
|
||||||
|
|
||||||
SRCS = mime-getpart.cc mime-parsefull.cc mime-parseonlyheader.cc \
|
SRCS = mime-getpart.cc mime-parsefull.cc mime-parseonlyheader.cc \
|
||||||
mime-printbody.cc mime-printdoc.cc mime-printheader.cc mime.cc \
|
mime-printbody.cc mime-printdoc.cc mime-printheader.cc mime.cc \
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/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:
|
# Parts taken from Estraier:
|
||||||
#================================================================
|
#================================================================
|
||||||
# Estraier: a personal full-text search system
|
# Estraier: a personal full-text search system
|
||||||
@ -52,6 +52,7 @@ checkcmds()
|
|||||||
for cmd in $*;do
|
for cmd in $*;do
|
||||||
if iscmd $cmd
|
if iscmd $cmd
|
||||||
then
|
then
|
||||||
|
a=1
|
||||||
else
|
else
|
||||||
echo $cmd not found 1>&2
|
echo $cmd not found 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/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:
|
# This is copied almost verbatim from Estraier:
|
||||||
#================================================================
|
#================================================================
|
||||||
# Estraier: a personal full-text search system
|
# Estraier: a personal full-text search system
|
||||||
@ -50,6 +50,7 @@ checkcmds()
|
|||||||
for cmd in $*;do
|
for cmd in $*;do
|
||||||
if iscmd $cmd
|
if iscmd $cmd
|
||||||
then
|
then
|
||||||
|
a=1
|
||||||
else
|
else
|
||||||
echo $cmd not found 1>&2
|
echo $cmd not found 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/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:
|
# Parts taken from Estraier:
|
||||||
#================================================================
|
#================================================================
|
||||||
# Estraier: a personal full-text search system
|
# Estraier: a personal full-text search system
|
||||||
@ -51,6 +51,7 @@ checkcmds()
|
|||||||
for cmd in $*;do
|
for cmd in $*;do
|
||||||
if iscmd $cmd
|
if iscmd $cmd
|
||||||
then
|
then
|
||||||
|
a=1
|
||||||
else
|
else
|
||||||
echo $cmd not found 1>&2
|
echo $cmd not found 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/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:
|
# Parts taken from Estraier:
|
||||||
#================================================================
|
#================================================================
|
||||||
# Estraier: a personal full-text search system
|
# Estraier: a personal full-text search system
|
||||||
@ -45,6 +45,7 @@ checkcmds()
|
|||||||
for cmd in $*;do
|
for cmd in $*;do
|
||||||
if iscmd $cmd
|
if iscmd $cmd
|
||||||
then
|
then
|
||||||
|
a=1
|
||||||
else
|
else
|
||||||
echo $cmd not found 1>&2
|
echo $cmd not found 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@ -34,7 +34,7 @@ bool Preview::eventFilter(QObject *target, QEvent *event)
|
|||||||
if (event->type() != QEvent::KeyPress)
|
if (event->type() != QEvent::KeyPress)
|
||||||
return QWidget::eventFilter(target, event);
|
return QWidget::eventFilter(target, event);
|
||||||
|
|
||||||
LOGDEB(("Preview::eventFilter: keyEvent\n"));
|
LOGDEB1(("Preview::eventFilter: keyEvent\n"));
|
||||||
QKeyEvent *keyEvent = (QKeyEvent *)event;
|
QKeyEvent *keyEvent = (QKeyEvent *)event;
|
||||||
if (keyEvent->key() == Key_Q && (keyEvent->state() & ControlButton)) {
|
if (keyEvent->key() == Key_Q && (keyEvent->state() & ControlButton)) {
|
||||||
recollNeedsExit = 1;
|
recollNeedsExit = 1;
|
||||||
@ -50,7 +50,7 @@ bool Preview::eventFilter(QObject *target, QEvent *event)
|
|||||||
QWidget *e = 0;
|
QWidget *e = 0;
|
||||||
if (tw)
|
if (tw)
|
||||||
e = (QTextEdit *)tw->child("pvEdit");
|
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) {
|
if (e && target == tw && keyEvent->key() == Key_Slash) {
|
||||||
dynSearchActive = true;
|
dynSearchActive = true;
|
||||||
return true;
|
return true;
|
||||||
@ -62,7 +62,7 @@ bool Preview::eventFilter(QObject *target, QEvent *event)
|
|||||||
|
|
||||||
void Preview::searchTextLine_textChanged(const QString & text)
|
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()) {
|
if (text.isEmpty()) {
|
||||||
dynSearchActive = false;
|
dynSearchActive = false;
|
||||||
} else {
|
} else {
|
||||||
@ -78,8 +78,7 @@ void Preview::searchTextLine_textChanged(const QString & text)
|
|||||||
// starting from the current position
|
// starting from the current position
|
||||||
void Preview::doSearch(bool next, bool reverse)
|
void Preview::doSearch(bool next, bool reverse)
|
||||||
{
|
{
|
||||||
//LOGDEB(("Preview::doSearch: next %d rev %d\n",
|
LOGDEB1(("Preview::doSearch: next %d rev %d\n", int(next), int(reverse)));
|
||||||
// int(next), int(reverse)));
|
|
||||||
QWidget *tw = pvTab->currentPage();
|
QWidget *tw = pvTab->currentPage();
|
||||||
QTextEdit *edit = 0;
|
QTextEdit *edit = 0;
|
||||||
if (tw) {
|
if (tw) {
|
||||||
@ -108,7 +107,7 @@ void Preview::doSearch(bool next, bool reverse)
|
|||||||
// Forward search: start from end of selection
|
// Forward search: start from end of selection
|
||||||
mspara = mepara;
|
mspara = mepara;
|
||||||
msindex = meindex;
|
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)
|
void Preview::currentChanged(QWidget * tw)
|
||||||
{
|
{
|
||||||
QObject *o = tw->child("pvEdit");
|
QObject *o = tw->child("pvEdit");
|
||||||
LOGDEB(("Preview::currentChanged(). Edit %p\n", o));
|
LOGDEB1(("Preview::currentChanged(). Edit %p\n", o));
|
||||||
|
|
||||||
if (o == 0) {
|
if (o == 0) {
|
||||||
LOGDEB(("Editor child not found\n"));
|
LOGERR(("Editor child not found\n"));
|
||||||
} else {
|
} else {
|
||||||
tw->installEventFilter(this);
|
tw->installEventFilter(this);
|
||||||
o->installEventFilter(this);
|
o->installEventFilter(this);
|
||||||
|
|||||||
@ -50,14 +50,13 @@ void RecollMain::init()
|
|||||||
asearchform = 0;
|
asearchform = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We also want to get rid of the advanced search form when we exit
|
// We also want to get rid of the advanced search form and previews
|
||||||
// (it's not our children so that it's not systematically created over
|
// when we exit (not our children so that it's not systematically
|
||||||
// the main form).
|
// created over the main form).
|
||||||
bool RecollMain::close( bool alsoDelete )
|
bool RecollMain::close(bool)
|
||||||
{
|
{
|
||||||
if (asearchform)
|
fileExit();
|
||||||
delete asearchform;
|
return false;
|
||||||
return QWidget::close(alsoDelete);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// We want to catch ^Q everywhere to mean quit.
|
// We want to catch ^Q everywhere to mean quit.
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#ifndef lint
|
#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
|
#endif
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
@ -958,7 +958,17 @@ bool Rcl::Db::getDoc(int exti, Doc &doc, int *percent)
|
|||||||
while (exti >= (int)dbindices.size()) {
|
while (exti >= (int)dbindices.size()) {
|
||||||
LOGDEB(("Rcl::Db::getDoc: fetching %d starting at %d\n",
|
LOGDEB(("Rcl::Db::getDoc: fetching %d starting at %d\n",
|
||||||
qquantum, first));
|
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()) {
|
if (ndb->mset.empty()) {
|
||||||
LOGDEB(("Rcl::Db::getDoc: got empty mset\n"));
|
LOGDEB(("Rcl::Db::getDoc: got empty mset\n"));
|
||||||
return false;
|
return false;
|
||||||
@ -986,7 +996,16 @@ bool Rcl::Db::getDoc(int exti, Doc &doc, int *percent)
|
|||||||
|
|
||||||
if (!(xapi >= first && xapi <= last)) {
|
if (!(xapi >= first && xapi <= last)) {
|
||||||
LOGDEB(("Fetching for first %d, count %d\n", xapi, qquantum));
|
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())
|
if (ndb->mset.empty())
|
||||||
return false;
|
return false;
|
||||||
first = ndb->mset.get_firstitem();
|
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