From 133b5211b94e570bcf0497d5b0a3c941c59cefe2 Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Fri, 9 Oct 2015 08:09:27 +0200 Subject: [PATCH] none --- src/qtgui/recoll.pro | 35 ++--- src/windows/mimeconf | 353 ++++++++++++++++++++++++++++++++++++++++-- src/windows/mimeview | 36 +++++ website/index.html.en | 12 ++ 4 files changed, 402 insertions(+), 34 deletions(-) create mode 100644 src/windows/mimeview diff --git a/src/qtgui/recoll.pro b/src/qtgui/recoll.pro index 07c72466..10d5b313 100644 --- a/src/qtgui/recoll.pro +++ b/src/qtgui/recoll.pro @@ -1,10 +1,10 @@ -# Note this is generated by configure on Linux (see recoll.pro.in). -# recoll.pro is under version control anyway and used on Windows - TEMPLATE = app LANGUAGE = C++ -QT += webkit +DEFINES += BUILDING_RECOLL + + QT += webkit +# QMAKE_CXXFLAGS += -DRESLIST_TEXTBROWSER -DSNIPPETS_TEXTBROWSER # QT += dbus # QMAKE_CXXFLAGS += -DUSE_ZEITGEIST @@ -12,7 +12,7 @@ QT += webkit QT += xml greaterThan(QT_MAJOR_VERSION, 4): QT += widgets webkitwidgets printsupport -CONFIG += qt warn_on thread debug +CONFIG += qt warn_on thread release HEADERS += \ advsearch_w.h \ @@ -94,21 +94,6 @@ FORMS = \ RESOURCES = recoll.qrc -INCLUDEPATH += ../common ../index ../internfile ../query ../unac \ - ../utils ../aspell ../rcldb ../qtgui ../xaposix \ - confgui -windows{ - contains(QMAKE_CC, gcc){ - # MingW - QMAKE_CXXFLAGS += -std=c++11 -Wno-unused-parameter - } - contains(QMAKE_CC, cl){ - # Visual Studio - } - LIBS += C:/recoll/src/build-librecoll-Desktop_Qt_5_5_0_MinGW_32bit-Debug/debug/librecoll.dll -} - - unix { UI_DIR = .ui MOC_DIR = .moc @@ -119,13 +104,15 @@ unix { # Note: libdir may be substituted with sthing like $(exec_prefix)/lib # at this point and will go as such in the Makefile. Expansion will be # completed at make time. - LIBS += -Wl,-rpath=@libdir@/recoll + LIBS += -Wl,-rpath=${exec_prefix}/lib/recoll } - LIBS += @LIBXAPIAN@ $(LIBXAPIANSTATICEXTRA) \ - @LIBICONV@ $(BDYNAMIC) @LIBQZEITGEIST@ -lz - + LIBS += -lxapian $(LIBXAPIANSTATICEXTRA) \ + -L${exec_prefix}/lib $(BDYNAMIC) -lz + INCLUDEPATH += ../common ../index ../internfile ../query ../unac \ + ../utils ../aspell ../rcldb ../qtgui ../xaposix \ + confgui DEPENDPATH += $$INCLUDEPATH } diff --git a/src/windows/mimeconf b/src/windows/mimeconf index 5cd07a3a..a4ecfe78 100644 --- a/src/windows/mimeconf +++ b/src/windows/mimeconf @@ -1,18 +1,67 @@ -# The system-wide configuration files for recoll are located in: -# [RECOLLINSTALLDIR]/Share/examples -# The default configuration files are commented, you should take a look -# at them for an explanation of what can be set (you could also take a look -# at the manual instead). -# Values set in this file will override the system-wide values for the file -# with the same name in the central directory. The syntax for setting -# values is identical. +# (C) 2015 J.F.Dockes +# This file contains most of the data which determines how we +# handle the different mime types (also see the "mimeview" file). +# +# This is the version specific to MS-WINDOWS +# +# Sections: +# top-level: Decompression parameters. Should not be at top-level, historical. +# [index] : Associations of mime types to the filters that translate them +# to plain text or html. +# [icons] : Associations of mime types to result list icons (GUI) +# [categories] : groupings of mime types (media, text, message etc.) +# [guifilters] : defines the filtering checkboxes in the GUI. Uses the +# above categories by default + +## ####################################### +# Decompression: these types need a first pass to create a temp file to +# work with. We use a script because uncompress utilities usually work in +# place, which is not suitable. +# +# Obviously this should be in a [decompress] section or such, but it was once +# forgotten and remained global for compatibility... +# +# The %t parameter will be substituted to the name of a temporary directory +# by recoll. This directory is guaranteed empty when calling the filter +# +# The %f parameter will be substituted with the input file. +# +# The script (ie: rcluncomp) must output the uncompressed file name on +# stdout. Note that the windows version will always use 7z, and ignore +# the decompressor parameter in the following lines +application/gzip = uncompress python rcluncomp.py 7z %f %t +application/x-gzip = uncompress python rcluncomp.py 7z %f %t +application/x-compress = uncompress python rcluncomp.py 7z %f %t +application/x-bzip2 = uncompress python rcluncomp.py 7z %f %t +application/x-xz = uncompress python rcluncomp.py 7z %f %t +application/x-lzma = uncompress python rcluncomp.py 7z %f %t + + +## ################################### +# Filters for indexing and internal preview. +# The "internal" filters are hardwired in the c++ code. +# The external "exec" filters are typically scripts. By default, they output the +# document in simple html format, have a look at the scripts. +# A different format (ie text/plain), and a character set can be defined for +# each filter, see the exemples below (ie: msword) [index] application/msword = execm python rcldoc.py -text/rtf = execm python rclrtf.py application/pdf = execm python rclmpdf.py application/vnd.ms-excel = execm python rclxls.py application/vnd.ms-powerpoint = execm python rclppt.py +application/vnd.openxmlformats-officedocument.wordprocessingml.document = \ + execm python rclopxml.py +application/vnd.openxmlformats-officedocument.wordprocessingml.template = \ + execm python rclopxml.py +application/vnd.openxmlformats-officedocument.presentationml.template = \ + execm python rclopxml.py +application/vnd.openxmlformats-officedocument.presentationml.presentation = \ + execm python rclopxml.py +application/vnd.openxmlformats-officedocument.spreadsheetml.sheet = \ + execm python rclopxml.py +application/vnd.openxmlformats-officedocument.spreadsheetml.template =\ + execm python rclopxml.py application/vnd.oasis.opendocument.text = execm python rclsoff.py application/vnd.oasis.opendocument.text-template = execm python rclsoff.py @@ -43,11 +92,295 @@ application/vnd.openxmlformats-officedocument.spreadsheetml.sheet = \ application/vnd.openxmlformats-officedocument.spreadsheetml.template =\ execm python rclopxml.py -application/zip = execm python rclzip;charset=default +application/epub+zip = execm python rclepub +# Returned by xdg-mime for .js. Future-proofing +application/javascript = internal text/plain +# Also Handle the mime type returned by "file -i" for a suffix-less word +# file. This could probably just as well be an excel file, but we have to +# chose one. +application/vnd.ms-office = execm python rcldoc.py + +application/ogg = execm python rclaudio + +application/x-awk = internal text/plain +application/x-chm = execm python rclchm +application/x-dia-diagram = execm python rcldia;mimetype=text/plain +application/x-flac = execm python rclaudio +application/x-gnote = execm python rclxml.py +application/x-gnuinfo = execm python rclinfo +application/x-mimehtml = internal message/rfc822 +application/x-perl = internal text/plain +application/x-php = internal text/plain +application/x-rar = execm python rclrar;charset=default +application/x-shellscript = internal text/plain +#application/x-tar = execm python rcltar +application/x-webarchive = execm python rclwar +application/x-7z-compressed = execm python rcl7z +audio/mpeg = execm python rclaudio +audio/mp4 = execm python rclaudio +audio/aac = execm python rclaudio +audio/x-karaoke = execm python rclkar image/gif = execm perl rclimg image/jp2 = execm perl rclimg image/jpeg = execm perl rclimg image/png = execm perl rclimg image/tiff = execm perl rclimg +image/svg+xml = execm python rclsvg image/x-xcf = execm perl rclimg +inode/symlink = internal +application/x-zerosize = internal +inode/x-empty = internal application/x-zerosize +message/rfc822 = internal +text/calendar = execm python rclics;mimetype=text/plain +text/html = internal +text/plain = internal +text/rtf = execm python rclrtf.py +text/x-c = internal +text/x-c++ = internal +text/x-c+ = internal +text/x-csv = internal text/plain +text/x-chm-html = internal text/html +text/x-ini = internal text/plain +text/x-mail = internal +text/x-perl = internal text/plain +text/x-python = exec python rclpython +text/x-shellscript = internal text/plain + +application/xml = execm python rclxml +text/xml = execm python rclxml +# Using these instead of the two above would index all parameter and tag +# names, attribute values etc, instead of just the text content. +#application/xml = internal text/plain +#text/xml = internal text/plain + +## ############################################# +# Icons to be used in the result list if required by gui config +[icons] +application/epub+zip = book +application/javascript = source +application/msword = wordprocessing +application/ogg = sownd +application/pdf = pdf +application/postscript = postscript +application/vnd.ms-excel = spreadsheet +application/vnd.ms-powerpoint = presentation +application/vnd.oasis.opendocument.presentation = presentation +application/vnd.oasis.opendocument.spreadsheet = spreadsheet +application/vnd.oasis.opendocument.text = wordprocessing +application/vnd.openxmlformats-officedocument.presentationml.presentation = presentation +application/vnd.openxmlformats-officedocument.presentationml.template = presentation +application/vnd.openxmlformats-officedocument.spreadsheetml.sheet = spreadsheet +application/vnd.openxmlformats-officedocument.spreadsheetml.template = spreadsheet +application/vnd.openxmlformats-officedocument.wordprocessingml.document = wordprocessing +application/vnd.openxmlformats-officedocument.wordprocessingml.template = wordprocessing +application/vnd.sun.xml.calc = spreadsheet +application/vnd.sun.xml.calc.template = spreadsheet +application/vnd.sun.xml.draw = drawing +application/vnd.sun.xml.draw.template = drawing +application/vnd.sun.xml.impress = presentation +application/vnd.sun.xml.impress.template = presentation +application/vnd.sun.xml.math = wordprocessing +application/vnd.sun.xml.writer = wordprocessing +application/vnd.sun.xml.writer.global = wordprocessing +application/vnd.sun.xml.writer.template = wordprocessing +application/vnd.wordperfect = wordprocessing +application/x-abiword = wordprocessing +application/x-awk = source +application/x-chm = book +application/x-dia-diagram = drawing +application/x-dvi = document +application/x-flac = sownd +application/x-fsdirectory = folder +application/x-gnote = document +application/x-gnuinfo = book +application/x-gnumeric = spreadsheet +application/x-kword = wordprocessing +application/x-lyx = wordprocessing +application/x-mimehtml = message +application/x-mobipocket-ebook = document +application/x-okular-notes = document +application/x-perl = source +application/x-php = source +application/x-rar = archive +application/x-scribus = document +application/x-scribus = wordprocessing +application/x-shellscript = source +application/x-tar = archive +application/x-tex = wordprocessing +application/x-webarchive = archive +application/xml = document +application/zip = archive +application/x-7z-compressed = archive +audio/mpeg = sownd +audio/x-karaoke = sownd +image/bmp = image +image/gif = image +image/jp2 = image +image/jpeg = image +image/png = image +image/svg+xml = drawing +image/tiff = image +image/vnd.djvu = document +image/x-xcf = image +image/x-xpmi = image +inode/directory = folder +inode/symlink = emblem-symbolic-link +message/rfc822 = message +text/html = html +text/html|chm = bookchap +text/html|epub = bookchap +text/html|gnuinfo = bookchap +text/plain = txt +text/rtf = wordprocessing +text/x-c = source +text/x-c+ = source +text/x-c++ = source +text/x-csv = txt +text/x-fictionbook = document +text/x-html-aptosid-man = aptosid-book +text/x-html-sidux-man = sidux-book +text/x-ini = txt +text/x-mail = message +text/x-man = document +text/x-perl = source +text/x-purple-html-log = pidgin +text/x-purple-log = pidgin +text/x-python = text-x-python +text/x-shellscript = source +text/x-tex = wordprocessing +text/xml = document +video/3gpp = video +video/mp2p = video +video/mp2t = video +video/mp4 = video +video/mpeg = video +video/quicktime = video +video/x-matroska = video +video/x-ms-asf = video +video/x-msvideo = video + +[categories] +# Categories group mime types by "kind". They can be used from the query +# language as an "rclcat" clause. This is fully dynamic, you can change the +# names and groups as you wish, only the mime types are stored in the index. +# +# If you add/remove categories, you may also want to change the +# "guifilters" section below. +text = \ + application/epub+zip \ + application/msword \ + application/pdf \ + application/postscript \ + application/vnd.oasis.opendocument.text \ + application/vnd.openxmlformats-officedocument.wordprocessingml.document \ + application/vnd.openxmlformats-officedocument.wordprocessingml.template \ + application/vnd.sun.xml.writer \ + application/vnd.sun.xml.writer.global \ + application/vnd.sun.xml.writer.template \ + application/vnd.wordperfect \ + application/x-abiword \ + application/x-awk \ + application/x-chm \ + application/x-dvi \ + application/x-gnote \ + application/x-gnuinfo \ + application/x-kword \ + application/x-lyx \ + application/x-mobipocket-ebook \ + application/x-okular-notes \ + application/x-perl \ + application/x-scribus \ + application/x-shellscript \ + application/x-tex \ + application/xml \ + text/xml \ + text/x-csv \ + text/x-tex \ + image/vnd.djvu \ + text/calendar \ + text/html \ + text/plain \ + text/rtf \ + text/x-c \ + text/x-c++ \ + text/x-c+ \ + text/x-fictionbook \ + text/x-html-aptosid-man \ + text/x-html-sidux-man \ + text/x-ini \ + text/x-man \ + text/x-perl \ + text/x-python \ + text/x-shellscript + +spreadsheet = \ + application/vnd.ms-excel \ + application/vnd.oasis.opendocument.spreadsheet \ + application/vnd.openxmlformats-officedocument.spreadsheetml.sheet \ + application/vnd.openxmlformats-officedocument.spreadsheetml.template \ + application/vnd.sun.xml.calc \ + application/vnd.sun.xml.calc.template \ + application/x-gnumeric + +presentation = \ + application/vnd.ms-powerpoint \ + application/vnd.oasis.opendocument.presentation \ + application/vnd.openxmlformats-officedocument.presentationml.presentation \ + application/vnd.openxmlformats-officedocument.presentationml.template \ + application/vnd.sun.xml.impress \ + application/vnd.sun.xml.impress.template + +media = \ + application/ogg \ + application/x-flac \ + audio/* \ + image/* \ + video/* \ + +message = message/rfc822 \ + text/x-gaim-log \ + text/x-mail \ + text/x-purple-log \ + text/x-purple-html-log \ + +other = application/vnd.sun.xml.draw \ + application/vnd.sun.xml.draw.template \ + application/vnd.sun.xml.math \ + application/x-dia-diagram \ + application/x-fsdirectory \ + application/x-mimehtml \ + application/x-rar \ + application/x-tar \ + application/x-webarchive \ + application/zip \ + application/x-7z-compressed \ + inode/directory \ + inode/symlink \ + +[guifilters] +# This defines the top level filters in the GUI (accessed by the the +# radiobuttons above the results area, or a toolbar combobox). +# Each entry defines a label and a query language fragment that will be +# applied to filter the current query if the option is activated. +# +# This does not really belong in mimeconf, but it does belong in the index +# config (not the GUI one), because it's not necessarily the same in all +# configs, it has to go somewhere, and it's not worth a separate config +# file... +# +# By default this filters by document category (see above), but any +# language fragment should be ok. Be aware though that the "document +# history" queries only know about simple "rclcat" filtering. +# +# If you don't want the filter names to be displayed in alphabetic order, +# you can define them with a colon. The part before the colon is not +# displayed but used for ordering, ie: a:zzbutshouldbefirst b:aacomeslast +# +text = rclcat:text +spreadsheet = rclcat:spreadsheet +presentation = rclcat:presentation +media = rclcat:media +message = rclcat:message +other = rclcat:other + diff --git a/src/windows/mimeview b/src/windows/mimeview new file mode 100644 index 00000000..deff9007 --- /dev/null +++ b/src/windows/mimeview @@ -0,0 +1,36 @@ +## ########################################## +# External viewers, launched by the recoll GUI when you click on a result +# 'edit' link +# +# MS WINDOWS VERSION +# +# Mime types which we should not uncompress if they are found gzipped or +# bzipped because the native viewer knows how to handle. These would be +# exceptions and the list is normally empty +#nouncompforviewmts = + +# For releases 1.18 and later: exceptions when using the x-all entry: these +# types will use their local definition. This is useful, e.g.: +# +# - for pdf, where we can pass additional parameters like page to open and +# search string +# - For pages of CHM and EPUB documents where we can choose to open the +# parent document instead of a temporary html file. +xallexcepts = \ + text/html|gnuinfo text/html|chm text/html|epub \ + application/x-fsdirectory|parentopen inode/directory|parentopen + +[view] +# Pseudo entry used if the 'use desktop' preference is set in the GUI +application/x-all = cmd /c start %u + +application/epub+zip = ebook-viewer %f +# Open the parent epub document for epub parts instead of opening them as +# html documents. This is almost always what we want. +text/html|epub = cmd /c start %F;ignoreipath=1 + +# directory. Thunar can't afaik. xdg-open cant pass an additional +# parameters so these are to be xallexcepts. +application/x-fsdirectory|parentopen = cmd /c start %f +inode/directory|parentopen = cmd /c start %f + diff --git a/website/index.html.en b/website/index.html.en index c6e6393c..940a20f0 100644 --- a/website/index.html.en +++ b/website/index.html.en @@ -98,6 +98,18 @@
+
2015-10-08
+
+ Recoll on MS-Windows + Recoll on Microsoft Windows ! This is still and a lot if + integration work remains (don't ask me for a package), but + the indexer and the GUI are mostly functional. This is an + almost-native port, based on Qt and the Windows API, no need + for Cygwin. Thanks to Christian Motz for helping with the + filter interface (and the rest).
+
+
2015-10-01
Release 1.21.2 is out, and replaces 1.20 as production release.