Update tesseract version

This commit is contained in:
Gres 2022-04-03 12:19:50 +03:00
parent 07b520d10b
commit ce9c47c3ea
4 changed files with 6 additions and 14 deletions

View File

@ -33,7 +33,7 @@ jobs:
runs-on: ${{ matrix.config.os }}
env:
OS: ${{ matrix.config.name }}
MSVC_VERSION: 2022/Enterprise
MSVC_VERSION: C:/Program Files/Microsoft Visual Studio/2022/Enterprise
strategy:
matrix:
config:

View File

@ -150,15 +150,7 @@ def get_msvc_env_cmd(bitness='64', msvc_version=''):
if platform.system() != "Windows":
return None
msvc_path = 'C:/Program Files/Microsoft Visual Studio'
if len(msvc_version) == 0:
with os.scandir(msvc_path) as ver_it:
version = next(ver_it, '')
with os.scandir(msvc_path + '/' + version) as ed_it:
msvc_version = version + '/' + next(ed_it, '')
env_script = msvc_path + '/{}/VC/Auxiliary/Build/vcvars{}.bat'.format(
msvc_version, bitness)
env_script = msvc_version + '/VC/Auxiliary/Build/vcvars{}.bat'.format(bitness)
return '"' + env_script + '"'

View File

@ -30,6 +30,6 @@ os_name = getenv('OS', 'linux')
app_version += {'linux': '', 'macos': '-experimental',
'win32': '', 'win64': ''}[os_name]
bitness = '32' if os_name == 'win32' else '64'
msvc_version = getenv('MSVC_VERSION', '2019/Community')
msvc_version = getenv('MSVC_VERSION', 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Community')
build_type = 'release' # 'debug'

View File

@ -6,8 +6,8 @@ import platform
c.print('>> Installing tesseract')
install_dir = dependencies_dir
url = 'https://github.com/tesseract-ocr/tesseract/archive/4.1.3.tar.gz'
required_version = '4.1.3'
url = 'https://github.com/tesseract-ocr/tesseract/archive/5.1.0.tar.gz'
required_version = '5.1.0'
build_type_flag = 'Debug' if build_type == 'debug' else 'Release'
@ -54,7 +54,7 @@ def check_existing():
if platform.system() == "Windows":
lib = install_dir + '/bin/tesseract{}.dll'.format(lib_suffix)
orig_lib = install_dir + '/bin/tesseract41.dll'
orig_lib = install_dir + '/bin/tesseract51.dll'
elif platform.system() == "Darwin":
lib = install_dir + '/lib/libtesseract{}.dylib'.format(lib_suffix)
orig_lib = install_dir + '/lib/libtesseract.{}.dylib'.format(required_version)