1# TEA #
2
3TEA is a C++, Qt(4,5,6) text editor with the hundreds of features for Linux, *BSD, Mac, Windows, OS/2 and Haiku.
4
5Home sites >
6http://tea.ourproject.org
7http://semiletov.org/tea (MIRROR)
8
9Development >
10https://github.com/psemiletov/tea-qt
11
12My hot AUR package > https://aur.archlinux.org/packages/tea-qt-git/
13
14Donate >
15
16BTC: 1PCo2zznEGMFJey4qFKGQ8CoFK2nzNnJJf
17
18Or Patreon: https://www.patreon.com/semiletov
19
20Communities >
21https://t.me/teaqt
22https://vk.com/teaeditor
23https://www.facebook.com/groups/766324686841748/
24
25## CONTENTS OF THIS README: ##
26
2701 - INSTALLATION FROM THE SOURCE
28
2902 - NOTES FOR PACKAGE MAINTAINERS
30
3103 - NOTE FOR UBUNTU USERS
32
3304 - LICENSE NOTES
34
35
36### 01: INSTALLATION FROM THE SOURCE ###
37
38You can install TEA from the source in 4 ways, using build systems qmake/make, meson/ninja, cmake/make, cmake/ninja. But first, you need to install some development libraries.
39
40**Mandatory:**
41
42Qt 4.8 or Qt 5.4+ or Qt 6, zlib
43
44**Optional:**
45
46libaspell (for spell checking engine),
47libhunspell (for spell checking engine),
48poppler-qt5 or poppler-qt6 (to read the text from PDF), ddjvuap (to read the text from DJVU)
49
50**Note for FreeBSD users**: you need the pkgconf package - pkg install pkgconf
51
52Which build system you should use?
53
54Use qmake for: Qt 4, old distros and Windows. Use meson or cmake for modern distros.
55cmake is the mainline build system for TEA.
56
57
58#### 01.01 CMAKE ####
59
60With cmake, TEA supports Qt5 and Qt6 build.
61
62If you want to build and install TEA with cmake + make, run at the TEA source dir:
63
64mkdir b
65cd b
66cmake ..
67make
68make install (as root or with sudo)
69
70
71To build and install TEA with cmake/ninja and GCC, do:
72
73mkdir b
74cd b
75cmake -GNinja ..
76ninja
77ninja install
78
79By default, cmake builds TEA without some features: printer and aspell support, libpoppler and djvuapi. To enable them, use from the build directory:
80
81cmake .. -DUSE_ASPELL=ON -DUSE_PRINTER=ON -DUSE_PDF=ON -DUSE_DJVU=ON
82
83If the Qt5 and Qt6 both are present on the system, use CMAKE_PREFIX_PATH variable to set the path to the QtN. Otherwise, Qt6 will be prefered.
84
85   Examples:
86
87cmake -DCMAKE_PREFIX_PATH=/usr/lib/qt ..
88//usr/lib/qt is the directory with qt5
89
90cmake -DCMAKE_PREFIX_PATH=/usr/lib/qt6 ..
91//usr/lib/qt6 is the directory with qt6
92
93cmake -DCMAKE_PREFIX_PATH=$HOME/Qt/6.0.0/gcc_64/lib/cmake ..
94//here we point to the locally installed Qt6
95
96
97#### 01.02 MESON ####
98
99With meson, TEA supports Qt5 build.
100
101To build and install TEA with meson/ninja and GCC, do:
102
103mkdir b
104meson
105cd b
106ninja
107ninja install
108
109To build and install TEA with meson/ninja and CLANG, do:
110
111mkdir b
112CC=clang CXX=clang++ meson b
113cd b
114ninja
115ninja install
116
117To enable PDF and DJVU text extraction support use, and Aspell support (disabled by default as well as the printing support):
118
119mkdir b
120meson b
121meson configure -Dpdf=enabled -Ddjvu=enabled -Daspell=enabled b
122cd b
123ninja
124ninja install
125
126
127#### 01.03 QMAKE ####
128
129With qmake, TEA supports Qt4 and Qt5 build.
130
131With qmake to build is simple:
132
133qmake
134make
135make install (as root or with sudo)
136
137
138To make some source configuration (with qmake), use CONFIG variable at qmake command line parameter. For example:
139
140qmake "CONFIG+=useclang" "CONFIG+=noaspell"
141
142You can use some values:
143
144nosingleapp - do not build TEA with the single application mode support
145nodesktop - do not install desktop files and icons
146useclang - TEA will be compiled with Clang
147noaspell - disable the Aspell (if you have it installed, but  do not want to compile TEA with Aspell support)
148nohunspell - disable Hunspell for TEA
149usepoppler - use libpoppler-qt5 or qt4 for PDF text layer import. DISABLED by default
150usedjvu - use libdjvulibre to read DJVU files text (read only). DISABLED by default
151noprinter - disable printing support
152
153** Notes: **
154
1551. If you have installed both Qt4 and Qt5, use the qmake from Qt4 or Qt5 to configure TEA with exact version of QT. The common solution is to make symlink to qmake from Qt5 and name it qmake5, then use qmake5 instead of the usual qmake.
156
1572. If the context menus in TEA are not localized, install the qttranslations or qt-translations package from your distro's repository.
158
159
160/*
161Basic snippet for Ubuntu users (Qt5 build) - run this from Terminal at the TEA source directory (unpacked):
162
163sudo apt-get install g++ pkg-config
164sudo apt-get install zlib1g-dev libaspell-dev libhunspell-dev
165sudo apt-get install qt5-default qttools5-dev-tools
166sudo apt-get install libqt5qml5 libqt5quick5 qtdeclarative5-dev
167qmake
168make
169sudo make install
170
171
172Snippet for Ubuntu users (Qt4 build):
173
174sudo apt-get install g++ pkg-config
175sudo apt-get install zlib1g-dev libaspell-dev libhunspell-dev
176sudo apt-get install libqt4-dev qt4-dev-tools
177qmake
178make
179sudo make install
180*/
181
182
183### 02: NOTES FOR PACKAGE MAINTAINERS ###
184
1850. Thank you for packaging TEA!
186
1871. Altough TEA has two home sites, it is better to use Github releases as the source:
188https://github.com/psemiletov/tea-qt/archive/$pkgver.tar.gz
189
190Please note, that TEA source dir after unpacking will be tea-qt-${pkgver}
191
1922. TEA after the compilation is a single binary file (with embedded resources).
193
1943. TEA supports 3 build systems:
195
196  **qmake** - the traditional one, good for Qt4-Win32-OS/2-Slackware builds. TEA's qmake project file is old and obscure.
197
198  **cmake** - good for Qt5/Qt6 build, the reference one for TEA. I recommend to use cmake to build TEA package.
199
200  **meson** - I use it internally. Does not have the printer support.
201
2024. For the qmake build, to override the default installation path (/usr/local, with binary at /usr/local/bin) use:
203
204qmake PREFIX=your_path
205make
206make install
207
208
209### 03: NOTE FOR UBUNTU USERS ###
210
211User defined hotkeys may not work due to Qt5 and Unity global menu feature. To remove global menu support in Qt5 apps, do
212
213sudo apt-get autoremove appmenu-qt5
214
215or, if you want to remove also GTK global menus, use:
216
217sudo apt-get autoremove appmenu-gtk appmenu-gtk3 appmenu-qt5
218
219
220### 04: LICENSE NOTES ###
221
222TEA code is licensed under GPL V3 and, partially, as a Public Domain. TEA media (images, etc), manuals and translations are public domain. Note to contributors - please put your translations into the public domain or GPL.
223