Commit Graph

6512 Commits

Author SHA1 Message Date
Stefan Weil
5af6cacf84 Restore original congruential random number generator
Some checks are pending
CodeQL / Analyze (cpp) (push) Waiting to run
This reverts commit 32fee19447
("Fix linear congruential random number generator"),
commit 2252936fc8
("Use linear congruential random number generator from C++11.")
and commit 7b8af67eb5
("[test] Fix intsimdmatrix test. Update result value based on updated TRand engine.").

It restores the original congruential random number generator
and the related unittest.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-11-23 09:53:09 +01:00
Egor Pugin
66cf74f2dd Make one-time comparator a lambda.
Some checks are pending
CodeQL / Analyze (cpp) (push) Waiting to run
2024-11-23 00:25:29 +03:00
Egor Pugin
b3e0c8e3a0 Add missing <algorithm> header for std::sort(). 2024-11-23 00:25:29 +03:00
Egor Pugin
1526cf16fb Make lists classes again. 2024-11-23 00:25:29 +03:00
Egor Pugin
1355287df1 Update sorting routines for lists. 2024-11-23 00:25:29 +03:00
Egor Pugin
1ceb14e274 list.h is now unnecessary and removed. 2024-11-23 00:25:29 +03:00
Egor Pugin
0e139fa9f9 Update Makefile.am. 2024-11-23 00:25:29 +03:00
Egor Pugin
15635203f4 Fix msvc warning. 2024-11-23 00:25:29 +03:00
Egor Pugin
63be216814 Convert ELIST2 into template. 2024-11-23 00:25:29 +03:00
Egor Pugin
4991295a39 Convert ELIST into template. 2024-11-23 00:25:29 +03:00
Egor Pugin
ffb33795a8 Fix warnings. 2024-11-23 00:25:29 +03:00
Egor Pugin
1bc983a0dc Fix msvc warning. 2024-11-23 00:25:29 +03:00
Egor Pugin
07d50ef4a3 [sw] Fix build. 2024-11-23 00:25:29 +03:00
Egor Pugin
45af23d9a6 Update test. 2024-11-23 00:25:29 +03:00
Egor Pugin
bb774797ce Rename CLIST_ITERATOR to ITERATOR and CLIST_LINK to LINK, so they can be accessed as CLIST::ITERATOR etc. 2024-11-23 00:25:29 +03:00
Egor Pugin
dad0fefc11 Make simple classes simpler. 2024-11-23 00:25:29 +03:00
Egor Pugin
5adf0c8ab3 Use real CLASSNAME type for list. Update sorting callback signatures. 2024-11-23 00:25:29 +03:00
Egor Pugin
3088d2eecc Make CLIST templated. Move member methods inside the class. Move helper classes (CLIST_LINK and CLIST_ITERATOR inside the list class).
This allows us to use real C++ templates for different instantiations instead of void * emulation.
2024-11-23 00:25:29 +03:00
Stefan Weil
32fee19447 Fix linear congruential random number generator
Fixes: #4146, #4148, #4270
Fixes: 2252936fc8 ("Use linear congruential random number generator [...]")
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-11-22 21:46:44 +01:00
Stefan Weil
5c78037bd3 Add missing library for pango_font_info_test
Some checks are pending
CodeQL / Analyze (cpp) (push) Waiting to run
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-11-22 19:22:03 +01:00
Egor Pugin
43b8d743fc [sw] Update build.
Some checks failed
CodeQL / Analyze (cpp) (push) Has been cancelled
sw / build (fedora:latest, ubuntu-22.04) (push) Has been cancelled
sw / build (macos-latest) (push) Has been cancelled
sw / build (windows-2022) (push) Has been cancelled
2024-11-11 13:22:49 +03:00
Stefan Weil
64eab6c457 Create new release 5.5.0
Some checks are pending
CodeQL / Analyze (cpp) (push) Waiting to run
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-11-10 20:23:34 +01:00
Stefan Weil
d30f45fbfd Remove broken GitHub action msys2-4.1.1
Some checks are pending
CodeQL / Analyze (cpp) (push) Waiting to run
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-11-10 16:13:14 +01:00
Stefan Weil
1e8640a02e Fix CID 1534938 (COPY_INSTEAD_OF_MOVE)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-11-10 11:22:49 +01:00
Stefan Weil
3fedc6cdfc Fix CID 1534939 (COPY_INSTEAD_OF_MOVE)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-11-10 11:21:04 +01:00
Stefan Weil
02409f578a Fix CID 1534945 (COPY_INSTEAD_OF_MOVE)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-11-10 11:19:34 +01:00
Stefan Weil
e83f78020e Fix stringToOEM and stringToPSM
Remove debug output and fix an out-of-bounds read for unsupported arguments.

Fixes: e8a9a56f9f ("Support symbolic values for --oem and --psm options")
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-11-10 10:16:37 +01:00
Stefan Weil
49cbe2b47d Fix compiler warning for argument of getaddrinfo
Some checks failed
CodeQL / Analyze (cpp) (push) Has been cancelled
sw / build (fedora:latest, ubuntu-22.04) (push) Has been cancelled
sw / build (macos-latest) (push) Has been cancelled
sw / build (windows-2022) (push) Has been cancelled
unittest-disablelegacy / linux (clang++-15, ubuntu-22.04) (push) Has been cancelled
unittest-disablelegacy / linux (g++, ubuntu-22.04) (push) Has been cancelled
msys2 / windows (mingw-w64-x86_64, MINGW64) (push) Has been cancelled
Fix this clang warning:

    src/viewer/svutil.cpp:277:51:
      warning: missing field 'ai_protocol' initializer [-Wmissing-field-initializers]

Replace also PF_INET by AF_INET which is the recommended value.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-11-09 12:05:03 +01:00
Stefan Weil
cdb7ff90e4 Update submodule googletest to release v1.15.2
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-11-08 20:30:36 +01:00
Stefan Weil
2a1ce80a42 Fix compilation of unittest/third_party/utf/rune.c
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-11-08 08:15:59 +01:00
sunyuechi
16fc9d90a4 Add RISC-V V support (#4346)
Convert riscv-v-spec-1.0.pdf into 111 PNG images,
then perform OCR on each one in sequence,
and measure the testing time on banana_f3:

old:        31m16.267s
new:        16m51.155s

Co-authored-by: sunyuechi <sunyuechi@iscas.ac.cn>
Co-authored-by: Stefan Weil <sw@weilnetz.de>
2024-11-08 08:09:01 +01:00
Stefan Weil
d7c0a05ffa Remove Tensorflow support
Tensorflow was never used because of missing models.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-11-07 13:40:43 +01:00
Stefan Weil
daaa902a5e Update documentation on history of development
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-11-07 11:39:00 +01:00
Amit D.
d1b89204ec
Update README.md: Remove CI badges 2024-11-07 10:22:08 +02:00
Stefan Weil
e3ac3fce2d Run GitHub action sw less often
It is no longer run on push or pull requests.
The scheduled runs are reduced from daily to every 3rd day.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-11-07 08:57:51 +01:00
Stefan Weil
d2f311bf7c Get the right compiler DLL files for the Windows installer
libstdc++-6.dll and libgcc_s_seh-1.dll must be taken from the compiler
directory, not from the pacman DLLs.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-11-06 21:44:50 +01:00
Stefan Weil
4bd94c6147 Make sure that required packages are installed for build of Windows installer
The build process needs the packages curl, python3-venv and unzip
which are missing in the Docker image for Ubuntu.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-11-06 21:44:50 +01:00
Stefan Weil
708621a2ab Remove unneeded pkg-config-crosswrapper
The Debian package mingw-w64-tools already contains the required
/usr/bin/x86_64-w64-mingw32-pkg-config.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-11-06 21:44:50 +01:00
Stefan Weil
3ec34f1755 Don't install tesseract.exe twice in Tesseract installer for Windows
The pattern for the training tools *.exe also includes tesseract.exe,
so it must be excluded explicitly.

Add also a macro BINDIR which simplifies the NSIS rules.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-11-06 21:44:50 +01:00
Stefan Weil
914a9589aa Reduce size of Tesseract installer for Windows
Strip all installed executables and libraries.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-11-06 21:44:50 +01:00
Stefan Weil
eed339b3ba Replace some tprintf by tesserr stream (fixes Windows compiler warnings)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-11-03 17:53:45 +01:00
Stefan Weil
60ed299550 Make downloads with curl silent in build process
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-11-02 07:37:19 +01:00
Stefan Weil
b7c7540bd7 Fix download of jar files for scrollview
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-11-02 07:37:09 +01:00
Stefan Weil
e8a9a56f9f Support symbolic values for --oem and --psm options
This fixes issue #4332.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-11-02 07:00:59 +01:00
Stefan Weil
827a4e7c7f Add Python script which finds Windows dependencies
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-11-02 07:00:33 +01:00
Stefan Weil
d0d43dfbce Update NSIS installer
- Add manual pages in HTML format and helper for Tesseract command line
- Don't remove the installation directory recursively
- Add GitHub action for Tesseract installer for Windows
- Add docbook-xml to required packages (needed for doc)
- Use unicode for NSIS installer
- Optionally sign executables
- Add more file properties to installer
- Update configuration for use with pacman
- Build Windows installer only for 64 bit Windows

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-11-02 07:00:33 +01:00
Regina Retter
b7c5996248 Update installer for Windows
- Added a couple of languages that are available for the Linux version
- Add new section for script data
- Get data from tessdata_fast
  The data files are now in the "script" subdirectory.
- Update list of scripts and languages
- Update path for script trained data
- Add data for Han Simplified vertical script
- Fix names of tessdata (jpn_vert, kmr)
- Fix some path names for 64 bit version
- Remove testing files from installation
  Those files were moved from tesseract.git to test.git.
- Don't enforce admin mode, but use highest available
- Don't use a checkbox for the license
- Remove unused code for registry settings (PATH, TESSDATA)
- Don't show README.md (did not work)

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-11-02 07:00:33 +01:00
Stefan Weil
c886e3b639 Update NSIS configuration
- Move NSIS installer file to new location
- Support cross builds with NSIS
- Clean nsis configuration
- Fix typos in nsis configuration
- Add jar files needed for ScrollView.jar
- Move ScrollView.jar to a new section
- Add missing configurations to tessdata
- Registry settings are now disabled (problems with long PATH)
- Add menu sections for all languages
- Simplify language downloads
- Tune and improve nsis configuration
- Add sizes for language data
- Add missing translations to nsis configuration
- Don't show details in installer by default
- Initial code for 64 bit Tesseract installer
- Fix uninstall for TESSDATA_PREFIX registry key
- Remove cube code
- nsis: Add all training executables
- nsis: Disable registry settings

Trying to add to PATH fails if the old PATH is very long and
will result in an empty PATH.

Remove these settings as they were already disabled by default,
and both are not needed.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-11-02 07:00:33 +01:00
zdenop@gmail.com
678e427d8b add NSIS script for Windows installer
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@815 d0cd1f9f-072b-0410-8dd7-cf729c803f20
2024-11-02 07:00:33 +01:00
Stefan Weil
7fd6d2388a Fix more typos in code comments and variable name
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2024-10-31 15:00:55 +01:00