From 49983a772aeba8eba3bcdd4bc8d01ed9f7f68d5d Mon Sep 17 00:00:00 2001 From: Gres Date: Sun, 24 Jan 2021 13:58:42 +0300 Subject: [PATCH] Update lib versions Also disable webp support (some issues with it at github actions) --- share/ci/config.py | 2 +- share/ci/get_leptonica.py | 22 +++++++++++++++------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/share/ci/config.py b/share/ci/config.py index 5d8d410..5d4135d 100644 --- a/share/ci/config.py +++ b/share/ci/config.py @@ -4,7 +4,7 @@ app_name = 'ScreenTranslator' target_name = app_name -qt_version = '5.15.0' +qt_version = '5.15.2' qt_modules = ['qtbase', 'qttools', 'icu', 'qttranslations', 'qtx11extras', 'qtwebengine', 'qtwebchannel', 'qtdeclarative', 'qtlocation', 'opengl32sw', 'd3dcompiler_47', diff --git a/share/ci/get_leptonica.py b/share/ci/get_leptonica.py index f450ad7..37d61c6 100644 --- a/share/ci/get_leptonica.py +++ b/share/ci/get_leptonica.py @@ -6,8 +6,8 @@ c.print('>> Installing leptonica') install_dir = dependencies_dir -url = 'http://www.leptonica.org/source/leptonica-1.78.0.tar.gz' -required_version = '1.78.0' +url = 'https://github.com/DanBloomberg/leptonica/releases/download/1.80.0/leptonica-1.80.0.tar.gz' +required_version = '1.80.0' build_type_flag = 'Debug' if build_type == 'debug' else 'Release' @@ -25,14 +25,14 @@ def check_existing(): return False if platform.system() == "Windows": - dll = install_dir + '/bin/leptonica-1.78.0.dll' - lib = install_dir + '/lib/leptonica-1.78.0.lib' + dll = install_dir + '/bin/leptonica-1.80.0.dll' + lib = install_dir + '/lib/leptonica-1.80.0.lib' if not os.path.exists(dll) or not os.path.exists(lib): return False c.symlink(dll, install_dir + '/bin/leptonica.dll') c.symlink(lib, install_dir + '/lib/leptonica.lib') elif platform.system() == "Darwin": - lib = install_dir + '/lib/libleptonica.1.78.0.dylib' + lib = install_dir + '/lib/libleptonica.1.80.0.dylib' if not os.path.exists(lib): return False c.symlink(lib, install_dir + '/lib/libleptonica.dylib') @@ -49,7 +49,7 @@ def check_existing(): return False with open(version_file, 'rt') as f: - existing_version = f.readline()[22:28] # set(Leptonica_VERSION 1.78.0) + existing_version = f.readline()[22:28] # set(Leptonica_VERSION 1.80.0) if existing_version != required_version: return False return True @@ -66,12 +66,20 @@ def check_existing(): c.extract(archive, '.') c.symlink(c.get_archive_top_dir(archive), src_dir) +with open('{}/CMakeLists.txt'.format(src_dir), 'r+') as f: + data = f.read() + data = data.replace('pkg_check_modules(WEBP', '#pkg_check_modules(WEBP') + data = data.replace('if(NOT WEBP', 'if(FALSE') + f.seek(0, os.SEEK_SET) + f.write(data) + c.ensure_got_path(install_dir) c.recreate_dir(build_dir) os.chdir(build_dir) -cmake_args = '"{}" -DCMAKE_INSTALL_PREFIX="{}"'.format(src_dir, install_dir) +cmake_args = '"{}" -DCMAKE_INSTALL_PREFIX="{}" -DBUILD_SHARED_LIBS=ON \ +-DSW_BUILD=OFF'.format(src_dir, install_dir,) if platform.system() == "Windows": env_cmd = c.get_msvc_env_cmd(bitness=bitness, msvc_version=msvc_version)