2015-10-11 23:09:01 +08:00
# autotools (LINUX/UNIX , msys...)
2015-12-04 17:46:10 +08:00
If you have cloned Tesseract from GitHub, you must generate
2015-10-11 23:09:01 +08:00
the configure script.
2016-12-27 01:03:07 +08:00
If you have tesseract 4.0x installation in your system, please remove it
2015-10-11 23:09:01 +08:00
before new build.
Known dependencies for training tools (excluding leptonica):
2016-12-27 01:03:07 +08:00
* compiler with c++11 support
* autoconf-archive
2015-10-11 23:09:01 +08:00
* pango-devel
* cairo-devel
* icu-devel
So, the steps for making Tesseract are:
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install
$ make training
$ sudo make training-install
2016-09-01 18:30:47 +08:00
You need to install at least English language and OSD data files to TESSDATA_PREFIX
2016-09-01 02:54:43 +08:00
directory. You can retrieve single file with tools like [wget ](https://www.gnu.org/software/wget/ ), [curl ](https://curl.haxx.se/ ), [GithubDownloader ](https://github.com/intezer/GithubDownloader ) or browser.
2016-11-03 15:21:25 +08:00
All language data files can be retrieved from git repository (useful only for packagers!):
2015-12-04 17:46:10 +08:00
2015-10-11 23:09:01 +08:00
$ git clone https://github.com/tesseract-ocr/tessdata.git tesseract-ocr.tessdata
2015-12-04 17:46:10 +08:00
2015-12-07 21:37:25 +08:00
(Repository is huge - more that 1.2 GB. You do not need to download
2016-09-01 02:54:43 +08:00
all languages).
2015-10-11 23:09:01 +08:00
To compile ScrollView.jar you need to download piccolo2d-core-3.0.jar
and [piccolo2d-extras-3.0.jar ](http://search.maven.org/#search|ga|1|g%3A%22org.piccolo2d%22 ) and place them to tesseract/java.
2015-12-04 17:46:10 +08:00
Then run:
2015-10-11 23:09:01 +08:00
$ make ScrollView.jar
and follow instruction on [Viewer Debugging wiki ](https://github.com/tesseract-ocr/tesseract/wiki/ViewerDebugging ).
# CMAKE
There is alternative build system based on multiplatform [cmake ](https://cmake.org/ )
## LINUX
$ mkdir build
$ cd build & & cmake .. & & make
$ sudo make install
## WINDOWS
You need to use leptonica with cmake patch:
2015-10-11 23:16:42 +08:00
2016-03-05 02:06:14 +08:00
git clone https://github.com/DanBloomberg/leptonica.git
2015-10-11 23:09:01 +08:00
cd leptonica
mkdir build
cd build
cmake ..
cmake --build .
2015-10-11 23:16:42 +08:00
cd ..\..
2015-10-11 23:09:01 +08:00
git clone https://github.com/tesseract-ocr/tesseract.git
cd tesseract
mkdir build
cd build
2015-10-11 23:16:42 +08:00
cmake .. -DLeptonica_BUILD_DIR=\abs\path\to\leptonica\build
2015-10-11 23:09:01 +08:00
cmake --build .
# WINDOWS Visual Studio
2015-10-11 23:16:42 +08:00
Please read http://vorba.ch/2014/tesseract-3.03-vs2013.html