Update tesseract version
This commit is contained in:
		
							parent
							
								
									07b520d10b
								
							
						
					
					
						commit
						ce9c47c3ea
					
				
							
								
								
									
										2
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							@ -33,7 +33,7 @@ jobs:
 | 
				
			|||||||
    runs-on: ${{ matrix.config.os }}
 | 
					    runs-on: ${{ matrix.config.os }}
 | 
				
			||||||
    env:
 | 
					    env:
 | 
				
			||||||
      OS: ${{ matrix.config.name }}
 | 
					      OS: ${{ matrix.config.name }}
 | 
				
			||||||
      MSVC_VERSION: 2022/Enterprise
 | 
					      MSVC_VERSION: C:/Program Files/Microsoft Visual Studio/2022/Enterprise
 | 
				
			||||||
    strategy:
 | 
					    strategy:
 | 
				
			||||||
      matrix:
 | 
					      matrix:
 | 
				
			||||||
        config:
 | 
					        config:
 | 
				
			||||||
 | 
				
			|||||||
@ -150,15 +150,7 @@ def get_msvc_env_cmd(bitness='64', msvc_version=''):
 | 
				
			|||||||
    if platform.system() != "Windows":
 | 
					    if platform.system() != "Windows":
 | 
				
			||||||
        return None
 | 
					        return None
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    msvc_path = 'C:/Program Files/Microsoft Visual Studio'
 | 
					    env_script = msvc_version + '/VC/Auxiliary/Build/vcvars{}.bat'.format(bitness)
 | 
				
			||||||
    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)
 | 
					 | 
				
			||||||
    return '"' + env_script + '"'
 | 
					    return '"' + env_script + '"'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -30,6 +30,6 @@ os_name = getenv('OS', 'linux')
 | 
				
			|||||||
app_version += {'linux': '', 'macos': '-experimental',
 | 
					app_version += {'linux': '', 'macos': '-experimental',
 | 
				
			||||||
                'win32': '', 'win64': ''}[os_name]
 | 
					                'win32': '', 'win64': ''}[os_name]
 | 
				
			||||||
bitness = '32' if os_name == 'win32' else '64'
 | 
					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'
 | 
					build_type = 'release' # 'debug'
 | 
				
			||||||
 | 
				
			|||||||
@ -6,8 +6,8 @@ import platform
 | 
				
			|||||||
c.print('>> Installing tesseract')
 | 
					c.print('>> Installing tesseract')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
install_dir = dependencies_dir
 | 
					install_dir = dependencies_dir
 | 
				
			||||||
url = 'https://github.com/tesseract-ocr/tesseract/archive/4.1.3.tar.gz'
 | 
					url = 'https://github.com/tesseract-ocr/tesseract/archive/5.1.0.tar.gz'
 | 
				
			||||||
required_version = '4.1.3'
 | 
					required_version = '5.1.0'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
build_type_flag = 'Debug' if build_type == 'debug' else 'Release'
 | 
					build_type_flag = 'Debug' if build_type == 'debug' else 'Release'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -54,7 +54,7 @@ def check_existing():
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    if platform.system() == "Windows":
 | 
					    if platform.system() == "Windows":
 | 
				
			||||||
        lib = install_dir + '/bin/tesseract{}.dll'.format(lib_suffix)
 | 
					        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":
 | 
					    elif platform.system() == "Darwin":
 | 
				
			||||||
        lib = install_dir + '/lib/libtesseract{}.dylib'.format(lib_suffix)
 | 
					        lib = install_dir + '/lib/libtesseract{}.dylib'.format(lib_suffix)
 | 
				
			||||||
        orig_lib = install_dir + '/lib/libtesseract.{}.dylib'.format(required_version)
 | 
					        orig_lib = install_dir + '/lib/libtesseract.{}.dylib'.format(required_version)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user