mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
add doc format support
Though I don't like doc at all.
This commit is contained in:
3
Makefile
3
Makefile
@@ -71,8 +71,7 @@ DJVULIBS := $(DJVUDIR)/build/libdjvu/.libs/libdjvulibre.a
|
||||
CRENGINELIBS := $(CRENGINEDIR)/crengine/libcrengine.a \
|
||||
$(CRENGINEDIR)/thirdparty/chmlib/libchmlib.a \
|
||||
$(CRENGINEDIR)/thirdparty/libpng/libpng.a \
|
||||
# we don't support dictionary lookup corrently
|
||||
#$(CRENGINEDIR)/thirdparty/antiword/libantiword.a
|
||||
$(CRENGINEDIR)/thirdparty/antiword/libantiword.a
|
||||
THIRDPARTYLIBS := $(MUPDFLIBDIR)/libfreetype.a \
|
||||
$(MUPDFLIBDIR)/libopenjpeg.a \
|
||||
$(MUPDFLIBDIR)/libjbig2dec.a \
|
||||
|
||||
@@ -58,7 +58,7 @@ function FileChooser:readDir()
|
||||
or file_type == "pdf" or file_type == "xps" or file_type == "cbz"
|
||||
or file_type == "epub" or file_type == "txt" or file_type == "rtf"
|
||||
or file_type == "htm" or file_type == "html" or file_type == "mobi"
|
||||
or file_type == "fb2" or file_type == "chm" then
|
||||
or file_type == "fb2" or file_type == "chm" or file_type == "doc" then
|
||||
table.insert(self.files, f)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -39,7 +39,8 @@ function FileSearcher:readDir()
|
||||
or file_type == "epub" or file_type == "txt"
|
||||
or file_type == "rtf" or file_type == "htm"
|
||||
or file_type == "html" or file_type == "mobi"
|
||||
or file_type == "fb2" or file_type == "chm" then
|
||||
or file_type == "fb2" or file_type == "chm"
|
||||
or file_type == "doc" then
|
||||
file_entry = {dir=d, name=f,}
|
||||
table.insert(self.files, file_entry)
|
||||
--debug("file:"..d.."/"..f)
|
||||
|
||||
@@ -43,11 +43,10 @@ ADD_SUBDIRECTORY(${CR_3RDPARTY_DIR}/libpng)
|
||||
#message("Will build patched JPEGLIB library")
|
||||
#ADD_SUBDIRECTORY(${CR_3RDPARTY_DIR}/libjpeg)
|
||||
|
||||
message("Will not build patched ANTIWORD library, because we haven't supported dictionary lookup yet.")
|
||||
#message("Will build patched ANTIWORD library")
|
||||
ADD_DEFINITIONS(-DENABLE_ANTIWORD=0)
|
||||
#ADD_DEFINITIONS(-DCR3_ANTIWORD_PATCH=1)
|
||||
#ADD_SUBDIRECTORY(${CR_3RDPARTY_DIR}/antiword)
|
||||
message("Will build patched ANTIWORD library")
|
||||
ADD_DEFINITIONS(-DENABLE_ANTIWORD=1)
|
||||
ADD_DEFINITIONS(-DCR3_ANTIWORD_PATCH=1)
|
||||
ADD_SUBDIRECTORY(${CR_3RDPARTY_DIR}/antiword)
|
||||
|
||||
message("Will build crengine library")
|
||||
SET(GUI kpv)
|
||||
|
||||
@@ -44,7 +44,7 @@ function openFile(filename)
|
||||
reader = DJVUReader
|
||||
elseif file_type == "pdf" or file_type == "xps" or file_type == "cbz" then
|
||||
reader = PDFReader
|
||||
elseif file_type == "epub" or file_type == "txt" or file_type == "rtf" or file_type == "htm" or file_type == "html" or file_type == "fb2" or file_type == "chm" or file_type == "mobi" then
|
||||
elseif file_type == "epub" or file_type == "txt" or file_type == "rtf" or file_type == "htm" or file_type == "html" or file_type == "fb2" or file_type == "chm" or file_type == "mobi" or file_type == "doc" then
|
||||
reader = CREReader
|
||||
end
|
||||
if reader then
|
||||
|
||||
Reference in New Issue
Block a user