Debian Codegraph @

README

raw
1
2 1- DJVIEW4
3 ==========
4
5 1.1 - DJVIEW4
6 -------------
7
8 This package contains the djview4 viewer and browser plugin.
9 This new viewer relies on the DjVulibre library and the Qt toolkit.
10
11 Highlights:
12 - entirely based on the public djvulibre api.
13 - entirely written in portable Qt4/Qt5.
14 - works natively under Unix/X11, MS Windows, and MacOS X.
15 - continuous scrolling of pages
16 - side-by-side display of pages
17 - ability to specify a url to the djview command
18 - all plugin and cgi options available from the command line
19 - all silly annotations implemented
20 - display thumbnails as a grid
21 - display outlines
22 - page names supported (see djvused command set-page-title)
23 - metadata dialog (see djvused command set-meta)
24 - implemented as reusable Qt widgets
25
26 Prerequisites:
27 - DjVuLibre >= 3.5.18
28 - Qt >= 4.4
29
30
31
32 1.2 - USING DJVIEW4 AS A PLUGIN
33 -------------------------------
34
35
36 WARNING: USING DJVIEW AS A PLUGIN IN 2020 IS VERY DIFFICULT BECAUSE
37 POPULAR BROWSERS EITHER DO NOT SUPPORT NETSCAPE PLUGINS (CHROME), OR
38 REMOVED SUPPORT FOR NETSCAPE PLUGINS OTHER THAN FLASH (FIREFOX).
39 We regret this decision because djview/nsdejavu is a perfect
40 example of very well behaved plugin that would have been
41 easy to support.
42
43 Under Unix/X11, djview4 can be used as a browser plugin
44 by means of the small shared library named nsdejavu.so.
45 The djview3 distributed with djvulibre uses the same approach.
46
47 In fact both djview3 and djview4 communicate
48 with nsdejavu.so with the same protocol.
49 You can either install the file nsdejavu.so that comes
50 with djview3 or the one that comes with djview4.
51 The file nsdejavu.so uses the viewer specified
52 with the environment variable NPX_DJVIEW or searches
53 an executable viewer named djview, djview4 or djview3.
54
55
56
57 2- INSTALLATION FROM SOURCES
58 ============================
59
60
61 2.1 PREREQUISITES
62 -----------------
63
64 You need DjVuLibre (>= 3.5.18)
65 See http://djvu.sourceforge.net for the
66 source code and for pointers to binary packages.
67 Under debian type "apt-get install libdjvulibre-dev"
68
69 You need Qt4 (>= 4.4.0) or QT5 (tested with 5.2)
70 See http://trolltech.com for the source code.
71 Select the version of Qt adapted to your platform.
72 Under debian type "apt-get install libqt4-dev qt4-dev-tools
73
74 Under Unix the configure script uses pkg-config
75 to locate the DjVuLibre library and its ancillary files.
76 See http://pkgconfig.freedesktop.org.
77 If you do not have pkg-config, you will have
78 to specify which compilation options using
79 the variabled DDJVUAPI_CFLAGS and DDJVUAPI_LIBS.
80
81
82 2.2 COMPILING AND INSTALLING UNDER UNIX
83 ---------------------------------------
84
85 First run the script 'configure' (or 'autogen.sh' as
86 explained above) to generate the makefiles.
87
88 Note that there will be no configure file if you obtain the djvulibre
89 source using git clone. Instead there is a script 'autogen.sh' that
90 uses automake to generate and call the actual configure script.
91 Since all autogen.sh arguments will be passed to configure,
92 you can simply treat autogen.sh as a replacement for configure.
93
94 Command 'configure --help' list options and environment
95 variables that affect the generation of makefile.
96 The most useful ones are:
97
98 --prefix=<directory>
99 Indicate the base directory for installing djview.
100 The default prefix is /usr/local.
101 Binary packages are usually compiled with prefix /usr.
102
103 --mandir=<directory>
104 Indicates where the man pages go.
105 The default is ${prefix}/man but many systems
106 prefer to install man pages in ${prefix}/share/man.
107
108 PKG_CONFIG_PATH=<colon-separated-directories>
109 Indicates the path for search pkg-config description files.
110 The default path is /usr/lib/pkgconfig:/usr/share/pkgconfig.
111 If you have installed DjVuLibre with a prefix different
112 from /usr, you probably want to add ${prefix}/lib/pkgconfig
113 to this path.
114
115 DDJVUAPI_CFLAGS=<compiler-flags>
116 Compiler flags for using the DjVuLibre api.
117 This is useful when you do not have pkg-config
118 or when pkg-config does not locate DjVuLibre.
119
120 DDJVUAPI_LIBS=<linker-flags>
121 Linker flags for using the DjVuLibre api.
122 This is useful when you do not have pkg-config
123 or when pkg-config does not locate DjVuLibre.
124
125 QMAKE=<filaname>
126 Indicate the location of the Qt4 qmake executable.
127 This is useful when configure cannot locate Qt4.
128
129 Running configure creates all the required makefiles
130 and executes command qmake in directory src.
131
132
133 You can then compile djview4 with command
134 % make
135
136 Once the compilation is successful, install the binaries with
137 % make install
138
139
140
141 2.3 COMPILATION HINTS FOR MAC OS X
142 ----------------------------------
143
144 In general you can compile the standalone viewer djview4 on non unix platforms.
145 However the browser plugin capability is currently not working on non X11 systems.
146
147 We recommend the following procedure to compile on the Mac.
148
149 1) Install the Qt 5.x SDK.
150
151 2) Install Homebrew with the following packages
152 $ brew install autoconf automake libtool pkg-config
153 $ brew install jpeg libtiff git
154
155 4) Install the djvulibre Homebrew package
156 $ brew install djvulibre
157
158 Advanced: If you want to compile a fresh version of djvulibre,
159 you can use the instructions found in the djvulibre tarball.
160 An interesting alternative is to install the current djvulibre
161 development version using the Homebrew command,
162 $ brew install --HEAD djvulibre
163 but you might find that the brew recipe is out of date.
164
165 5) Get the djview source from the git repository
166 $ git clone git://git.code.sf.net/p/djvu/djview-git djvulibre-djview
167 $ cd djvulibre-djview
168 Configure with command
169 $ ./autogen.sh --enable-mac QMAKE=<path-to-qt-qmake-executable>
170 Then compile with command
171 $ make
172
173 6) Prepare the djview.app bundle and the dmg file
174 $ cd mac
175 $ ./make_djview_bundle.sh
176 $ ./make_djview_dmg.sh
177
178
179
180 2.4 COMPILATION HINTS FOR WINDOWS
181 -----------------------------------
182
183 In general you can compile the standalone
184 viewer djview4 on non unix platforms.
185 However the browser plugin capability
186 is currently not working on non X11 systems.
187 You will need to compile DjVuLibre.
188 You will need the appropriate version of Qt.
189
190 There are also two ways to compile djview under Windows.
191
192 * Using Visual C++
193
194 - First you need to install Qt5 binaries compatible
195 with your compiler. Sometimes this means
196 compiling Qt yourself.
197 - Type command
198 $ qmake -win32 -tp vc
199 to generate a MS Visual C++ project file.
200 - Tweak the project file to properly link with
201 the djvulibre library and the tiff library.
202 One good way to do so is to open the file "djvulibre.sln"
203 that comes with the cvs version of djvulibre. Then add the
204 project "djview.vcproj" and insert the property sheets
205 "dirs", "warnings", "libtiff" and "tools" found in the
206 djvulibre-3.5/win32/djvulibre directory. You also need
207 to add the references to libdjvulibre and libtiff.
208 This works well despite requiring a lot of clicks.
209
210 * Using the MINGW compiler (not recommended)
211
212 - Install the binary version of Qt4.
213 - Install the mingw version of zlib, libtiff, libjpeg.
214 - Compile djvulibre using the configure method.
215 - Go to directory djview4/src.
216 - Type command
217 $ qmake DEFINES+=HAVE_TIFF \
218 LIBS+="-L$HOME/djvulibre-3.5/libdjvu/.libs -ldjvulibre -ltiff" \
219 QMAKE_CXXFLAGS+="-I$HOME/djvulibre-3.5"
220 where you replace the paths by the actual djvulibre paths.
221 - Then compile using
222 $ mingw32-make SHELL=cmd.exe
223
224
225