|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | 03-May-2022 | - |
| android/ | H | 03-May-2022 | - | 242,706 | 226,741 |
| cmake/modules/ | H | 09-Mar-2021 | - | 247 | 203 |
| cr3gui/ | H | 07-May-2022 | - | 348,265 | 340,078 |
| cr3qt/ | H | 03-May-2022 | - | 30,325 | 27,956 |
| cr3wx/ | H | 07-May-2022 | - | 11,335 | 10,334 |
| crengine/ | H | 03-May-2022 | - | 198,596 | 163,304 |
| fb2props/ | H | 03-May-2022 | - | 979 | 883 |
| icons_src/ | H | 03-May-2022 | - | 573 | 461 |
| packages/ | H | 09-Mar-2021 | - | 971 | 735 |
| thirdparty/ | H | 07-May-2022 | - | | |
| thirdparty_repo/ | H | 09-Mar-2021 | - | 2,040 | 1,889 |
| thirdparty_unman/ | H | 09-Mar-2021 | - | 270,319 | 184,509 |
| tinydict/ | H | 07-May-2022 | - | 1,554 | 1,225 |
| tools/ | H | 09-Mar-2021 | - | 1,241 | 1,035 |
| .gitignore | H A D | 09-Mar-2021 | 374 | 30 | 29 |
| .travis.yml | H A D | 09-Mar-2021 | 1.3 KiB | 33 | 27 |
| LICENSE | H A D | 09-Mar-2021 | 17.7 KiB | 339 | 281 |
| README.md | H A D | 09-Mar-2021 | 11.9 KiB | 285 | 204 |
| call_clanganalyzer.sh | H A D | 09-Mar-2021 | 769 | 33 | 22 |
| changelog | H A D | 09-Mar-2021 | 708 | 29 | 17 |
| thirdparty-deploy.sh | H A D | 09-Mar-2021 | 2.7 KiB | 149 | 122 |
README.md
1CoolReader 3 - cross platform open source e-book reader
2=======================================================
3
4(c) Vadim Lopatin, 1998-2018
5
6
7
8
9Development is moved to GitHub
10------------------------------
11
12
13 https://github.com/buggins/coolreader
14
15
16Sourceforge repository will be used as a mirror
17
18 git clone git://crengine.git.sourceforge.net/gitroot/crengine/crengine
19
20
21[![Join the chat at https://gitter.im/coolreader/Lobby](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/coolreader/Lobby)
22
23
24
25LICENSE: All source codes (except thirdparty directory)
26are provided under the terms of GNU GPL license, version 2
27
28
29
30Directories
31-----------
32
33 crengine - CREngine (DOM/XML/CSS ebook rendering library) sources
34 cr3gui - CR3 with CR3GUI for e-ink devices sources
35 cr3qt - CR3 with Qt based GUI
36 cr3wx - CR3 with wxWidgets based GUI
37 thirdparty - third party libraries, to use if not found in system (zlib, libpng, libjpeg, freetype, harfbuzz)
38 thirdparty_repo - repository for third party libraries deployments
39 thirdparty_unman - unmanaged third party libraries
40 tinydict - small library for .dict file format support
41 tools - miscellaneous configuration files
42 android - Android port
43
44External dependencies
45---------------------
46
47 common: zlib, libpng, libjpeg, freetype, harfbuzz
48 cr3gui/xcb: libxcb, fontconfig
49 cr3gui/nanoX: libnanoX
50 cr3/Qt: qt4-core, qt4-gui
51 cr3/wx: wxWidgets 2.8
52
53e.g., for Ubuntu you may use
54
55 > sudo apt-get install git-core cmake libqt4-dev libpng12-dev libfreetype6-dev libjpeg62-dev libfontconfig1-dev zlib1g-dev
56
57Packaging
58---------
59
60Debian based packages included to project:
61
62 packages/ubuntu -- debian package for Ubuntu, with Qt frontend
63 packages/openinkpot -- debian package for OpenInkpot, with XCB frontend
64
65To build debian package, copy one of package descriptions from packages directory:
66
67 cp -r packages/ubuntu/debian debian
68 Then, package can be built using `debuild` command.
69
70
71Android Build Instructions
72--------------------------
73
74* Deploy/update third party libraries: in terminal call script thirdparty-deploy.sh
75
76In Windows can be used git bash terminal
77
78 > ./thirdparty-deploy.sh
79
80* Use Android Studio - open subdirectory "android" as Android Studio project
81
82Ensure that you have Android SDK and NDK installed
83
84
85
86CMake Build Instructions
87------------------------
88
89 # Building QT version
90 # libqt4-dev should be installed
91 mkdir qtbuild
92 cd qtbuild
93 cmake -D GUI=QT -D CMAKE_BUILD_TYPE=Release -D MAX_IMAGE_SCALE_MUL=2 -D DOC_DATA_COMPRESSION_LEVEL=3 -D DOC_BUFFER_SIZE=0x1400000 -D CMAKE_INSTALL_PREFIX=/usr ..
94 make
95 sudo make install
96
97
98 # Building QT version, in DEBUG mode
99 mkdir qtbuild
100 cd qtbuild
101 cmake -D GUI=QT -D CMAKE_BUILD_TYPE=Debug -D MAX_IMAGE_SCALE_MUL=2 -D DOC_DATA_COMPRESSION_LEVEL=3 -D DOC_BUFFER_SIZE=0x1400000 -D CMAKE_INSTALL_PREFIX=/usr ..
102 make
103 sudo make install
104
105 # Building QT version, in DEBUG mode, ANTIWORD development
106 mkdir qtbuild
107 cd qtbuild
108 cmake -D GUI=QT -D CMAKE_BUILD_TYPE=Debug -D ENABLE_ANTIWORD=1 -D MAX_IMAGE_SCALE_MUL=2 -D DOC_DATA_COMPRESSION_LEVEL=3 -D DOC_BUFFER_SIZE=0x1400000 -D CMAKE_INSTALL_PREFIX=/usr ..
109 make
110 sudo make install
111
112 # Building wxWidgets version
113 # libwxgtk2.8-dev should be installed
114 mkdir wxbuild
115 cd wxbuild
116 cmake -D GUI=WX -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr ..
117 make
118
119 # Building ARM version on OpenInkpot:
120 mkdir armbuild
121 cd armbuild
122 cmake -D CMAKE_TOOLCHAIN_FILE=../tools/toolchain-arm-oi.cmake -D MAX_IMAGE_SCALE_MUL=2 -D CMAKE_BUILD_TYPE=Release -D GUI=CRGUI_XCB -D USE_EXTERNAL_EDICT_DICTIONARY=1 ..
123 make
124
125 # Building i386 version, Qt backend V3 simulation:
126 mkdir qt-v3
127 cd qt-v3
128 cmake -D DEVICE_NAME=v3 -D MAX_IMAGE_SCALE_MUL=2 -D CMAKE_BUILD_TYPE=Debug -D USE_STATIC_ZLIB=1 -Wdev -D ENABLE_ANTIWORD=1 -D CMAKE_INSTALL_PREFIX=dest -D GUI=CRGUI_QT -D DOC_DATA_COMPRESSION_LEVEL=1 -D DOC_BUFFER_SIZE=0x500000 ..
129 make
130
131 # Building i386 version (for OpenInkpot), V3 simulation:
132 mkdir xcb-v3
133 cd xcb-v3
134 cmake -D DEVICE_NAME=v3 -D MAX_IMAGE_SCALE_MUL=2 -D CMAKE_BUILD_TYPE=Debug -D USE_STATIC_ZLIB=1 -Wdev -D ENABLE_ANTIWORD=1 -D CMAKE_INSTALL_PREFIX=/usr -D GUI=CRGUI_XCB -D DOC_DATA_COMPRESSION_LEVEL=1 -D DOC_BUFFER_SIZE=0x500000 ..
135 make
136
137 # Building i386 version (for OpenInkpot), n516/azbooka simulation:
138 mkdir xcb-n516
139 cd xcb-n516
140 cmake -D DEVICE_NAME=n516 -D MAX_IMAGE_SCALE_MUL=2 -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX=/usr -D GUI=CRGUI_XCB ..
141 make
142
143 # Building Jinke/LBook V3 viewer plugin (libfb2.so):
144 mkdir v3build
145 cd v3build
146 mkdir dest
147 cmake -D DEVICE_NAME=v3 -D MAX_IMAGE_SCALE_MUL=2 -D CMAKE_TOOLCHAIN_FILE=../tools/toolchain-arm-v3.cmake -D GUI=CRGUI_JINKE_PLUGIN -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=dest ..
148 make
149
150 # Building Jinke/LBook V3 viewer plugin (libfb2.so), new SDK:
151 mkdir v3build
152 cd v3build
153 mkdir dest
154 cmake -D DEVICE_NAME=v3 -D MAX_IMAGE_SCALE_MUL=2 -D CMAKE_TOOLCHAIN_FILE=../tools/toolchain-arm-linux-gnueabi.cmake -D GUI=CRGUI_JINKE_PLUGIN -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=dest ..
155 make
156
157 # Building Jinke/LBook V3 fb2props plugin for Bookshelf (libfb2props.so) i386:
158 mkdir fb2props386
159 cd fb2props386
160 mkdir dest
161 cmake -D GUI=FB2PROPS -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX=dest ..
162 make
163
164 # Building Jinke/LBook V3 fb2props plugin for Bookshelf (libfb2props.so):
165 mkdir v3fb2propsbuild
166 cd v3fb2propsbuild
167 mkdir dest
168 cmake -D CMAKE_TOOLCHAIN_FILE=../tools/toolchain-arm-v3.cmake -D GUI=FB2PROPS -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=dest ..
169 make
170
171 # Building Jinke/LBook V3 fb2props plugin for Bookshelf NEW SDK (libfb2props.so):
172 mkdir v3newfb2propsbuild
173 cd v3newfb2propsbuild
174 mkdir dest
175 cmake -D CMAKE_TOOLCHAIN_FILE=../tools/toolchain-arm-linux-gnueabi.cmake -D GUI=FB2PROPS -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=dest ..
176 make
177
178 # Building Jinke/LBook V3 new SDK viewer app (cr3):
179 mkdir v3app
180 cd v3app
181 #cmake -D DEVICE_NAME=v3 -D CMAKE_TOOLCHAIN_FILE=../tools/toolchain-arm-linux-gnueabi.cmake -D MAX_IMAGE_SCALE_MUL=2 -D GUI=CRGUI_NANOX -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=dest -D DOC_DATA_COMPRESSION_LEVEL=1 -D DOC_BUFFER_SIZE=0x500000 -D BIG_PAGE_MARGINS=1 ..
182 cmake -D DEVICE_NAME=v3 -D CMAKE_TOOLCHAIN_FILE=../tools/toolchain-arm-linux-gnueabi.cmake -D MAX_IMAGE_SCALE_MUL=2 -D GUI=CRGUI_NANOX -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=dest -D DOC_DATA_COMPRESSION_LEVEL=1 -D DOC_BUFFER_SIZE=0x500000 ..
183 make
184
185 # Building Jinke/LBook V5 viewer app (cr3):
186 mkdir v5build
187 cd v5build
188 cmake -D DEVICE_NAME=v5 -D MAX_IMAGE_SCALE_MUL=2 -D CMAKE_TOOLCHAIN_FILE=../tools/toolchain-arm-v5.cmake -D GUI=CRGUI_NANOX -D GRAY_BACKBUFFER_BITS=3 -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=dest -D DOC_DATA_COMPRESSION_LEVEL=1 -D DOC_BUFFER_SIZE=0x580000 ..
189 #cmake -D DEVICE_NAME=v5 -D CMAKE_TOOLCHAIN_FILE=../tools/toolchain-arm-v5.cmake -D GUI=CRGUI_NANOX -D GRAY_BACKBUFFER_BITS=3 -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=dest ..
190
191 make
192
193 # Building Jinke/LBook V3+ viewer app (cr3):
194 mkdir v3abuild
195 cd v3abuild
196 cmake -D DEVICE_NAME=v3a -D CMAKE_TOOLCHAIN_FILE=../tools/toolchain-arm-v5.cmake -D GUI=CRGUI_NANOX -D CR3_PNG=1 -D CR3_JPEG=1 -D CR3_FREETYPE=1 -D GRAY_BACKBUFFER_BITS=4 -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=dest -D RAM_COMPRESSED_BUFFER_ENABLED=0 -D DOC_DATA_COMPRESSION_LEVEL=1 -D DOC_BUFFER_SIZE=0x1000000 ..
197 make
198
199 # Building ARM version for PocketBook:
200 mkdir pb360
201 cd pb360
202 cmake -D DEVICE_NAME=pb360 -D CMAKE_INSTALL_PREFIX=/usr/local/pocketbook/mnt/ext1 -D CMAKE_TOOLCHAIN_FILE=../tools/toolchain-arm-pocketbook.cmake -D CMAKE_CXX_FLAGS_RELEASE:STRING="-fomit-frame-pointer -O1" -D MAX_IMAGE_SCALE_MUL=2 -D CMAKE_BUILD_TYPE=Release -D GUI=CRGUI_PB -D ENABLE_CHM=1 -D ENABLE_ANTIWORD=1 ..
203 make
204
205 # Building ARM version for PocketBook Pro
206 mkdir pbPro
207 cd pbPro
208 cmake -D DEVICE_NAME=pb360 -D CMAKE_INSTALL_PREFIX=/usr/local/pocketbook/mnt/ext1 -D CMAKE_TOOLCHAIN_FILE=../tools/toolchain-arm-gnu-eabi-pocketbook.cmake -D MAX_IMAGE_SCALE_MUL=2 -D CMAKE_BUILD_TYPE=Release -D ENABLE_CHM=1 -D ENABLE_ANTIWORD=1 -D GUI=CRGUI_PB -D POCKETBOOK_PRO=1 ..
209
210 # Building Jinke/LBook V3+ simulator for Win32 (cr3):
211 mkdir v3win32
212 cd v3win32
213 cmake -D DEVICE_NAME=v3a -G "Visual Studio 10" -D MAX_IMAGE_SCALE_MUL=2 -D GUI=CRGUI_WIN32 -D GRAY_BACKBUFFER_BITS=4 -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=dest -D DOC_DATA_COMPRESSION_LEVEL=1 -D DOC_BUFFER_SIZE=0x800000 ..
214 make
215
216
217QT Build under Windows
218======================
219
220 Using QT SDK
221
222Environment setup:
223
224- Download and install QT SDK, git, cmake, msys
225- Copy contents of git and cmake dirs to QT/mingw/
226- Copy make.exe from msys/bin to QT/mingw/bin
227
228Run Qt SDK / Qt Command Prompt. Execute:
229
230 > sh
231 > git clone git://crengine.git.sourceforge.net/gitroot/crengine/crengine cr3
232 > cd cr3
233 > mkdir qtbuild
234 > cd qtbuild
235 > cmake -D GUI=QT -D CMAKE_BUILD_TYPE=Release -G "MSYS Makefiles" -D USE_QT_ZLIB=1 -D CMAKE_INSTALL_PREFIX=dist ..
236 > make
237 > make install
238
239 cmake -D GUI=QT -D CMAKE_BUILD_TYPE=Release -G "Visual Studio 9 2008" -D USE_QT_ZLIB=1 -D DOC_DATA_COMPRESSION_LEVEL=3 -D DOC_BUFFER_SIZE=0x1500000 -D CMAKE_INSTALL_PREFIX=dist ..
240 cmake -D GUI=QT -D CMAKE_BUILD_TYPE=Release -G "Visual Studio 10" -D USE_QT_ZLIB=1 -D MAX_IMAGE_SCALE_MUL=2 -D DOC_DATA_COMPRESSION_LEVEL=3 -D DOC_BUFFER_SIZE=0x1500000 -D CMAKE_INSTALL_PREFIX=dist ..
241
242to disable console, use /SUBSYSTEM:WINDOWS linker option instead of /SUBSYSTEM:CONSOLE
243
244For QT5, use GUI=QT5 instead of GUI=QT
245
246For building Qt5 app from QtCreator remove -G (generator) parameter:
247
248 Release build:
249
250 -D GUI=QT5 -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=dist ..
251
252 Debug build:
253
254 -D GUI=QT5 -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX=dist ..
255
256It will put built cr3.exe and all necessary distribution files to directory qtbuild/dist.
257
258You need also add following DLLs to this directory in order to get cr3.exe working:
259
260 - mingwm10.dll
261 - QtCore4.dll
262 - QtGui4.dll
263 - libz.dll
264
265Qt Build under Mac OSX
266======================
267
268 #configure and make Qt as static libraries
269 #Inside Qt source root:
270 ./configure -prefix /Developer/Qt -opensource -static -release -arch x86 -arch x86_64 \
271 -no-accessibility -no-stl -no-qt3support -qt-zlib -no-gif -no-libtiff -qt-libpng -qt-freetype -no-libmng -qt-libjpeg -no-nis -no-cups -no-iconv -no-pch -no-dbus -no-opengl -no-fontconfig \
272 -no-xmlpatterns -no-multimedia -no-phonon -no-phonon-backend -no-audio-backend -no-openssl \
273 -no-gtkstyle -no-svg -no-webkit -no-javascript-jit -no-script -no-scripttools -no-declarative
274 #make Core and GUI libraries
275 make sub-src
276 #make symlinks from `pad` to /Developer/Qt for bin, include, lib, src dirs
277
278 #inside cr3 directory
279 #configure using cmake
280 mkdir macbuild
281 cd macbuild
282 cmake -G "Unix Makefiles" -D GUI=QT -D CMAKE_OSX_ARCHITECTURES="i386 x86_64" -D QT_QMAKE_EXECUTABLE=/Developer/Qt/bin/qmake -D CMAKE_BUILD_TYPE=Release -D MAX_IMAGE_SCALE_MUL=2 -D DOC_DATA_COMPRESSION_LEVEL=3 -D DOC_BUFFER_SIZE=0x1400000 -D CMAKE_INSTALL_PREFIX=cr3.app ..
283 make
284 make install
285