This repository has been archived by the owner on Aug 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.txt
219 lines (152 loc) · 7.73 KB
/
README.txt
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
==============================================================================
TeXSample
==============================================================================
Homepage: https://github.com/ololoepepe/TeXSample
Author: Andrey Bogdanov (ololoepepe@gmail.com)
License: GNU LGPL (see COPYING.txt)
TeXSample is a library developed as a client-server bridge between
TeXSample Server and TeX Creator.
For details, see: https://github.com/ololoepepe/TeXSample-Server
and https://github.com/ololoepepe/TeX-Creator
==============================================================================
Dependencies
==============================================================================
In order to build and use TeXSample you will need the same libraries and tools
as for every other project using Qt.
See: http://qt-project.org/resources/getting_started for details.
TeXSample is intended for use with Qt 5, or with Qt 4.8. Classes interface may
slightly vary depending on the version of Qt used. In case of using Qt 4.8,
some features may be missing.
Support of Qt libraries' versions lower than 4.8.0 is not guaranteed.
You will also need BeQt libraries version 3.1.0 or higher.
See: https://github.com/ololoepepe/BeQt for details.
==============================================================================
Building and installing (briefly)
==============================================================================
In order to build TeXSample, just cd into the sources directory and execute
the following commands:
* "qmake [BEQT_PATH=<path>]"
Here, the path to BeQt may be specified
* "make"
or other similar command ("nmake", "mingw32-make", etc.)
* "make install"
You may need the superuser privileges in UNIX-like systems
Note: When building from the command line, you have to configure
the environment (path to Qt libraries, etc.).
You may also use Qt Creator. After building the project, cd to
the output directory and execute the "make install" command, or
configure automatic execution of that command in Qt Creator.
See: http://qt-project.org/doc/qtcreator-2.6 for details.
==============================================================================
Building and installing (in detail)
==============================================================================
When building TeXSample, you may pass some parameters to qmake:
* "TSMP_CONFIG+=builtin_resources"
Embed resources (including translations) into library files
See: http://qt-project.org/doc/qt-5.0/resources.html for details
* "TSMP_CONFIG+=no_install"
Don't install any files (building only)
* "TSMP_CONFIG+=no_headers"
Don't install headers
* "TSMP_CONFIG+=private_headers"
Install private headers along with the public ones
* "TSMP_CONFIG+=no_widgets"
Don't build the TeXSampleWidgets module
* "BEQT_PREFIX=<path>"
Set path to BeQt libraries. Must be used if BeQt libraries were installed
to a custom location
* "TSMP_PREFIX=<path>"
Set install path. See the note below
* "TSMP_HEADERS_INSTALLS_PATH=<path>"
Set install path for headers. See the note below
* "TSMP_LIBS_INSTALLS_PATH=<path>"
Set install path for library files. See the note below
* "TSMP_RESOURCES_INSTALLS_PATH=<path>"
Set install path for resources. See the note below
* "TSMP_SUBDIR_NAME=<name>"
Set name of the TeXSample subdirectory when TeXSample is used as a
submodule
Note: In Windows systems TeXSample is installed to the
"C:\Program files\TeXSample" directory (or other similar directory, depending
on your system) by default.
Headers, libraries and resources are installed
to the corresponding subdirectories (include, lib, etc.).
In UNIX-like systems the directory structure during installation
looks like this:
* "/usr/include/texsample"
Path to headers
* "/usr/lib"
Path to libraries
* "/usr/share/texsample"
Path to resources
You may set another installation path. To do so,
pass the corresponding parameter to qmake (see above).
Warning: Don't use paths containing spaces. In Windows systems you may replace
directory names, containing spaces, with the corresponding short names:
See: http://support.microsoft.com/kb/142982 for details.
==============================================================================
Using
==============================================================================
TeXSample may be used either as a system library, or as a project submodule.
Important: TeXSample may be linked to a project with just two lines of code in the
.pro file, but in that case you need to use qmake.
First of all, add the following to your .pro file:
"TSMP = [core] [widgets] [all]"
There are TeXSample module names in the square brackets.
You may also add all modules (the "[all]" parameter).
BeQt and Qt modules' dependencies are resolved automatically.
In case TeXSample is used as a system library (or is built and placed to a
separate directory), you need to add the following line to your .pro file:
"include(<path_to_texsample>/depend.pri)"
"<path_to_texsample>" is a path to TeXSample resources (in UNIX-like systems
it is usually "/usr/share/texsample", and in Windows it is
"C:\Program files\TeXSample").
In case TeXSample is used as a submodule, you will have to make your
project structure slightly more compilcated, creating a common .pro file,
in which both TeXSample and your project will be included as subprojects.
For details, see:
http://qt-project.org/doc/qt-5.0/qmake-project-files.html#project-templates
Common .pro file example:
"...
CONFIG+=ordered
TEMPLATE=subdirs
SUBDIRS=texsample yourproject
..."
Important: Note, that the TeXSample submodule must be included before any
other submodule that uses it, and the "ordered" parameter must be passed to
the "CONFIG" variable. It's done to guarantee that TeXSample is built
before any other submodule uses it.
Note: Due to qmake features you may have to execute "qmake" and "make"
commands again after building the project (it's required for proper library
linking). The repeated command execution will take at most few seconds.
When building, TeXSample generates translation files (.qm), containing
translations of UI elements. These files are located in the "translations"
subdirectory (for example, "translations/texsample_ru.qm").
If you wish to use TeXSample whith different versions of Qt, the following
link may be useful for you:
http://qt-project.org/doc/qt-5.0/qtcore/qtglobal.html#QT_VERSION_CHECK
==============================================================================
FAQ
==============================================================================
Q: Ho do I start using TeXSample?
A: See "Building and installing" and "Using".
Q: What are TeXSample license restrictions?
A: There are almost no restrictions. You may use TeXSample as you wish,
but don't forget that this statement doesn't apply to the Qt libraries.
See: COPYING.txt, http://qt-project.org/products/licensing for details.
Q: I'm having troubles using TeXSample, where can I get help?
A: Sorry, no user support for this library.
Q: I've detected a bug/I have an idea, where can I report/post it?
A: See the answer above.
Q: Why there is no documentation?
A: Unfoturnately, I just don't have enough time to write documentation.
==============================================================================
Deploying
==============================================================================
When deploying an application that uses TeXSample, don't forget to include
the resource files (libraries, translations, etc. - see above).
It's recommended to build applications statically, because that helps avoid
dependency issues. You may use the "builtin_resources" parameter
in case of building your project statically.
For details, see:
http://qt-project.org/doc/qt-5.0/deployment.html#static-vs-shared-libraries