Commit Graph

2525 Commits

Author SHA1 Message Date
zdenop
c5e3b203d8
Merge pull request #1478 from stweil/typo
training: Fix typo in help text
2018-04-15 12:56:07 +02:00
Stefan Weil
a440bd8bf1 training: Support new argument --version
classifier_tester, cntraining, combine_lang_model, lstmeval, lstmtraining,
mftraining, set_unicharset_properties, shapeclustering, text2image and
unicharset_extractor now can show the version.

Still missing: ambiguous_words, combine_tessdata, dawg2wordlist,
merge_unicharsets and wordlist2dawg.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-04-15 12:39:18 +02:00
Stefan Weil
8c3045f161 Check library version for training executables
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-04-15 11:31:28 +02:00
Stefan Weil
a6fef12bd6 training: Add 'static' to some local functions
Fix also the missing exit value for text2image.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-04-15 11:31:22 +02:00
Stefan Weil
3f967d2abc training: Remove unused function prototypes
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-04-15 11:26:31 +02:00
Stefan Weil
03b0cb9160 training: Format code
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-04-15 10:27:32 +02:00
Stefan Weil
9612ca4a23 Fix compiler errors when including baseapi.h and capi.h
Including baseapi.h before capi.h is now possible.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-04-15 10:26:48 +02:00
Stefan Weil
5e9e22c719 training: Fix typo in help text
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-04-15 08:41:51 +02:00
Stefan Weil
c89b1129d1 configure: Remove optimize option for preprocessor
It is only used by the compiler.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-04-15 08:28:11 +02:00
Egor Pugin
147c3deacf
Merge pull request #1475 from dschoerk/master
Add cmake switch to turn off test building
2018-04-15 02:26:10 +03:00
bloke
2bdee5c5e4 cmake switch to turn off test building 2018-04-14 10:32:50 +02:00
bloke
da65617d74 cmake switch to turn off test building 2018-04-14 10:26:29 +02:00
Noah Metzger
d597570737 Fixed compiler warning
Warning C4996: 'access': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _access.

Signed-off-by: Noah Metzger <noah.metzger@bib.uni-mannheim.de>
2018-04-13 11:31:50 +02:00
zdenop
83f311f043
Merge pull request #1405 from Shreeshrii/patch-2
Add additional Unicodes to IsVedicAccent
2018-04-13 06:38:06 +02:00
zdenop
c869478825
Merge pull request #1406 from Shreeshrii/patch-1
Add kVedicMark to ConsumeVowelIfValid
2018-04-13 06:37:35 +02:00
zdenop
de48cac8e2
Merge pull request #1473 from noahmetzger/winfix
Fixed Tessdata directory for Windows
2018-04-13 06:36:53 +02:00
zdenop
1d4959c2ba
Merge pull request #1474 from ic/build_4.0_macOS_compiler_options
Add flag to build compiler options with G++ on macOS/MacPorts for Tesseract 4.x.
2018-04-13 06:35:17 +02:00
Eric Platon
1642d882a7 Remove useless echo statement. 2018-04-13 10:04:00 +09:00
Eric Platon
708f55423b Add flag to build compiler options with G++ on macOS.
Building with G++ on Darwin breaks when either AVX, AVX2, or SSE4.1
compiler option is set, unless G++ is actually CLANG.

This commit allows to build with G++, by asking G++ to delegate assembly
to the clang integrated assembler, instead of the GNU one.
2018-04-13 09:39:40 +09:00
Noah Metzger
d88a6b5c19 Replace unsecure _splitpath by secure _splitpath_s
Use the predefined macros for the lengths of drive, dir and path.
This avoids potential buffer overruns.
Show also an error message in case of a too long path.

Signed-off-by: Noah Metzger <noah.metzger@bib.uni-mannheim.de>
2018-04-12 16:32:47 +02:00
Noah Metzger
b7b6b28ecf Fixed Tessdata directory for Windows
The old code ignored the drive letter for the tessdata directory path.

Signed-off-by: Noah Metzger <noah.metzger@bib.uni-mannheim.de>
2018-04-11 16:57:38 +02:00
Egor Pugin
742a087507 Merge branch 'master' of github.com-egorpugin:tesseract-ocr/tesseract 2018-04-11 00:16:35 +03:00
Egor Pugin
7dd2ecd026 Move cmake packages detection after compiler settings. 2018-04-11 00:16:31 +03:00
zdenop
9e1ecdb9b3
Merge pull request #1467 from FernandoGOT/master
Fix for mktemp bug on MAC OS X
2018-04-10 22:27:15 +02:00
FernandoGOT
3917a192ca fix for mktemp bug on MAC OS X 2018-04-10 14:22:33 -03:00
zdenop
0ddfac85e9
Merge pull request #1466 from FernandoGOT/master
added sleep 1 before generate_font_image to fix the problem of not fi…
2018-04-10 18:47:16 +02:00
FernandoGOT
7a5033d1d9 added sleep 1 before generate_font_image to fix the problem of not finding fonts 2018-04-10 10:16:37 -03:00
zdenop
81821da730
Merge pull request #1457 from stweil/asciidoc
Don't try to build manpages if asciidoc is missing
2018-04-09 19:47:06 +02:00
zdenop
09212daf7b
Merge pull request #1458 from stweil/cov
WorkingPartSet: Remove unused constructor
2018-04-09 19:44:36 +02:00
Stefan Weil
ef31eaa7d7 Don't try to build manpages if asciidoc is missing
Commit f9157fd91d changed the rules for
the documentation, so make always tried to build it and failed if
asciidoc was missing since that commit.

Now configure tests whether asciidoc is available and builds the
documentation conditionally. It also reports that to the user.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-04-09 19:07:54 +02:00
Stefan Weil
d9156f2d19 WorkingPartSet: Remove unused constructor
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-04-09 18:00:18 +02:00
zdenop
4b50f3f46f
Merge pull request #1455 from stweil/cov
Overload method ForwardTimeStep (CID 1385636 Explicit null dereferenced)
2018-04-09 11:53:55 +02:00
Stefan Weil
7cf2e2a4c8 Overload method ForwardTimeStep (CID 1385636 Explicit null dereferenced)
This avoids NULL parameters and fixes a warning from Coverity Scan.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-04-09 07:51:29 +02:00
zdenop
437bf85149
Merge pull request #1454 from stweil/autotools
configure: Don't use AM_MAINTAINER_MODE by default
2018-04-08 16:55:23 +02:00
Stefan Weil
f9157fd91d configure: Don't use AM_MAINTAINER_MODE by default
That macro disables automated updates when configure.ac or a Makefile.am
changes. Normally those updates are wanted because users typically
forget running ./autogen.sh.

See also the GNU documentation why AM_MAINTAINER_MODE should not be used:
https://www.gnu.org/software/automake/manual/html_node/maintainer_002dmode.html

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-04-08 14:44:14 +02:00
Zdenko Podobny
10f4998aee fix cmake build of training tools 2018-04-02 22:30:55 +02:00
Zdenko Podobný
e9e1e93686 add tess_version.h to distribution 2018-04-02 21:48:29 +02:00
Zdenko Podobný
64a73155ba add licence info 2018-04-02 19:11:46 +02:00
Zdenko Podobný
af037c27e7 rename version.h.in because the filename is too general for distribution 2018-04-02 19:11:02 +02:00
Zdenko Podobny
f8e26eedff fix cmake windows version info for tesseract library and executable 2018-03-31 12:49:29 +02:00
zdenop
d28439c375
Merge pull request #1438 from stweil/vs2010
cmake: Automatically build tesseract.rc with version from file
2018-03-29 20:32:12 +02:00
zdenop
ead7759e1e
Merge pull request #1430 from stweil/news
Remove NEWS stub file
2018-03-29 20:13:25 +02:00
Stefan Weil
f29c12a087 classify: Fix warnings from Doxygen (#1439)
* classify/adaptive: Fix warnings from Doxygen

Signed-off-by: Stefan Weil <sw@weilnetz.de>

* classify/clusttool: Fix warnings from Doxygen and remove wrong API function

Remove the function ReadProtoStyle because it did not match
the documentation. It was only used locally.

Signed-off-by: Stefan Weil <sw@weilnetz.de>

* classify/cutoffs: Fix warnings from Doxygen

Signed-off-by: Stefan Weil <sw@weilnetz.de>

* classify/intproto: Fix warnings from Doxygen

Signed-off-by: Stefan Weil <sw@weilnetz.de>

* classify/normmatch: Fix warnings from Doxygen

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-29 11:58:23 +02:00
Stefan Weil
8701b15134 cmake: Automatically build tesseract.rc with version from file
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-28 14:26:03 +02:00
Stefan Weil
2cc46fa6d4 BITS16: Use inline code for all constructors (#1434)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-28 10:02:37 +02:00
Stefan Weil
832926f5af Update library version handling for cmake (#1435)
As Tesseract now uses semantic versioning, the old method to calculate
the library version was no longer valid.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-28 10:00:18 +02:00
Stefan Weil
b1d291e6fd cmake: Get version information from VERSION file (#1436)
Create also api/version.h like it is done for autoconf.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-28 09:58:25 +02:00
Stefan Weil
9e74ed3730 Add IntCastRounded for float argument (#1433)
The method is called with a float argument several times, and the
previous implementation which only supported a double argument
resulted in type conversions and compiler warnings.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-27 14:34:06 +02:00
Stefan Weil
6bbfc3b5fc Create version.h from available version information (#1432)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-27 14:32:30 +02:00
Stefan Weil
53a25713ca autoconf: Get version components from PACKAGE_VERSION (#1431)
AX_SPLIT_VERSION only works after AM_INIT_AUTOMAKE, so that macro had
to be moved.

GENERIC_MAJOR_VERSION, GENERIC_MINOR_VERSION and GENERIC_MICRO_VERSION
are now set automatically and can be used in further processing.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-03-27 09:46:08 +02:00