Do not include Tesseract 4

This commit is contained in:
Nikolaj Olsson 2018-11-16 19:04:16 +01:00
parent e50fa77cea
commit 74a2c6be34
13 changed files with 8 additions and 11 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,3 +0,0 @@
tessedit_create_hocr 1
tessedit_pageseg_mode 1
hocr_font_info 0

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -91,9 +91,8 @@ PUSHD "src\bin\Release"
IF EXIST "temp_zip" RD /S /Q "temp_zip"
IF NOT EXIST "temp_zip" MD "temp_zip"
IF NOT EXIST "temp_zip\Languages" MD "temp_zip\Languages"
IF NOT EXIST "temp_zip\Tesseract4" MD "temp_zip\Tesseract4"
IF NOT EXIST "temp_zip\Tesseract4\tessdata" MD "temp_zip\Tesseract4\tessdata"
IF NOT EXIST "temp_zip\Tesseract4\tessdata\configs" MD "temp_zip\Tesseract4\tessdata\configs"
IF NOT EXIST "temp_zip\Dictionaries" MD "temp_zip\Dictionaries"
IF NOT EXIST "temp_zip\Ocr" MD "temp_zip\Ocr"
COPY /Y /V "..\..\..\LICENSE.txt" "temp_zip\"
COPY /Y /V "..\..\..\Changelog.txt" "temp_zip\"
@ -101,10 +100,8 @@ COPY /Y /V "Hunspellx86.dll" "temp_zip\"
COPY /Y /V "Hunspellx64.dll" "temp_zip\"
COPY /Y /V "SubtitleEdit.exe" "temp_zip\"
COPY /Y /V "Languages\*.xml" "temp_zip\Languages\"
COPY /Y /V "..\..\..\Tesseract4\tesseract.exe" "temp_zip\Tesseract4\"
COPY /Y /V "..\..\..\Tesseract4\*.dll" "temp_zip\Tesseract4\"
COPY /Y /V "..\..\..\Tesseract4\tessdata\configs\hocr" "temp_zip\Tesseract4\tessdata\configs\"
COPY /Y /V "..\..\..\Tesseract4\tessdata\*.traineddata" "temp_zip\Tesseract4\tessdata\"
COPY /Y /V "..\..\..\Dictionaries\*.*" "temp_zip\Dictionaries\"
COPY /Y /V "..\..\..\Ocr\*.*" "temp_zip\Ocr\"
PUSHD "temp_zip"
START "" /B /WAIT "%SEVENZIP%" a -tzip -mx=9 "SE%VERSION%.zip" * >NUL

View File

@ -25,7 +25,9 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
{
if (e.Error != null)
{
MessageBox.Show(Configuration.Settings.Language.GetTesseractDictionaries.DownloadFailed);
MessageBox.Show(Configuration.Settings.Language.GetTesseractDictionaries.DownloadFailed + Environment.NewLine +
Environment.NewLine +
e.Error.Message + ": " + e.Error.StackTrace);
DialogResult = DialogResult.Cancel;
return;
}

View File

@ -5199,6 +5199,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
if (_ocrMethodIndex == _ocrMethodTesseract302 || _ocrMethodIndex == _ocrMethodTesseract4)
{
labelStatus.Text = Configuration.Settings.Language.General.PleaseWait;
_tesseractThreadRunner?.Cancel();
_tesseractThreadRunner = new TesseractThreadRunner(OcrDone);
_tesseractRunner = new TesseractRunner();