Skip to content

Commit

Permalink
Update lib versions
Browse files Browse the repository at this point in the history
Also disable webp support (some issues with it at github actions)
  • Loading branch information
OneMoreGres committed Jan 24, 2021
1 parent a76ee0f commit 49983a7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion share/ci/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
22 changes: 15 additions & 7 deletions share/ci/get_leptonica.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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')
Expand All @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 49983a7

Please sign in to comment.