-
Notifications
You must be signed in to change notification settings - Fork 7
/
INSTALL
110 lines (94 loc) · 4.16 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
The following are required for compilation:
- an ordinary C++ development environment (g++, make, C++ libraries and
headers, ...)
- cmake (optional; you can also use qmake)
- a Qt 4 development environment (libraries, headers, qmake, ...): only
QtCore, QtGui and QtXml are required, at least in version 4.7
- the poppler-qt4 libraries and headers, at least in version 0.16
- the zlib libraries and headers (optional; if zlib is not installed,
synctex support will not be compiled)
In Ubuntu you would obtain those by installing the following packages:
- build-essential
- cmake (if you want to install the KDE version)
- libqt4-dev
- qt4-dev-tools
- libpoppler-qt4-dev
- zlib1g-dev
Install app and lib using qmake:
--------------------------------
1. Edit the paths in app/qmake/pdfviewerconfig.pri and
lib/qmake/pdfviewlibconfig.pri
If zlib is not installed, then synctex support must be disabled by
hiding the line
CONFIG += use_synctex
in lib/qmake/pdfviewlibconfig.pri (i.e. put a # at the beginning of
that line).
2. Run the following commands (this will create a library named pdfview
and an executable named pdfviewer):
mkdir buildqt
cd buildqt
qmake ../pdfviewer.pro
make
sudo make install
Note that qmake will tell you where the files will be installed. If
you don't like the installation directories, you can change them in
the files app/qmake/pdfviewerconfig.pri and lib/qmake/pdfviewlibconfig.pri
before running make. Make sure to make the changes in
app/qmake/pdfviewerconfig.pri and lib/qmake/pdfviewlibconfig.pri before
running make.
In order to uninstall pdfviewer and the pdfview library run the following
command in the build directory:
sudo make uninstall
Install standalone app using qmake:
-----------------------------------
1. Edit the paths in app/qmake/pdfviewerconfig.pri
2. Run the following commands (this will create a library named pdfview
and an executable named pdfviewer):
mkdir buildqt
cd buildqt
qmake ../pdfviewer-standalone.pro
make
sudo make install
Note that qmake will tell you where the files will be installed. If
you don't like the installation directories, you can change them in
the file app/qmake/pdfviewerconfig.pri before running make. Make sure to
make the changes in app/qmake/pdfviewerconfig.pri before running make.
In order to uninstall pdfviewer run the following command in the build
directory:
sudo make uninstall
Install app and lib using cmake:
--------------------------------
Install the lib and the app separately by going in the respective
directories and following the instructions under "Install using cmake"
in the respective INSTALL files. Make sure that the library is installed
in your system before compiling the app.
Install standalone app using cmake:
-----------------------------------
1. Edit the paths in app/cmake/modules/PdfViewerConfig.cmake
If zlib is not installed, then synctex support will automatically be
disabled. Synctex support can also be manually disabled by hiding the
line
set(USE_SYNCTEX true)
in app/cmake/modules/PdfViewerConfig.cmake (i.e. put a # at the beginning
of that line).
2. Run the following commands (this will create an executable named pdfviewer):
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
make
sudo make install
In order to uninstall pdfviewer run the following command in the build
directory (doesn't work yet):
sudo make uninstall
Compile without QtDBus:
-----------------------
On some systems QtDBus might not be available (or you may have other reasons
for not using QtDBus). It is possible to compile PdfViewer without QtDBus
support. If you use qmake to compile PdfViewer, then you must comment the
line "CONFIG += qdbus" (i.e. add # at the beginning of that line) in
app/qmake/pdfviewer.pro and app/qmake/pdfviewer-standalone.pro before running
qmake; if you use cmake, then you must comment the line "set(USE_QDBUS true)"
(i.e. add # at the beginning of that line) in the
app/cmake/modules/PdfViewerConfig.cmake before running cmake. Note that when
QtDBus is disabled, a new PdfViewer window will be opened each time you
trigger "forward search" in your LaTeX editor.