Skip to content

Commit 49983a7

Browse files
committed
Update lib versions
Also disable webp support (some issues with it at github actions)
1 parent a76ee0f commit 49983a7

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

share/ci/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
app_name = 'ScreenTranslator'
55

66
target_name = app_name
7-
qt_version = '5.15.0'
7+
qt_version = '5.15.2'
88
qt_modules = ['qtbase', 'qttools', 'icu',
99
'qttranslations', 'qtx11extras', 'qtwebengine', 'qtwebchannel',
1010
'qtdeclarative', 'qtlocation', 'opengl32sw', 'd3dcompiler_47',

share/ci/get_leptonica.py

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
c.print('>> Installing leptonica')
77

88
install_dir = dependencies_dir
9-
url = 'http://www.leptonica.org/source/leptonica-1.78.0.tar.gz'
10-
required_version = '1.78.0'
9+
url = 'https://github.com/DanBloomberg/leptonica/releases/download/1.80.0/leptonica-1.80.0.tar.gz'
10+
required_version = '1.80.0'
1111

1212

1313
build_type_flag = 'Debug' if build_type == 'debug' else 'Release'
@@ -25,14 +25,14 @@ def check_existing():
2525
return False
2626

2727
if platform.system() == "Windows":
28-
dll = install_dir + '/bin/leptonica-1.78.0.dll'
29-
lib = install_dir + '/lib/leptonica-1.78.0.lib'
28+
dll = install_dir + '/bin/leptonica-1.80.0.dll'
29+
lib = install_dir + '/lib/leptonica-1.80.0.lib'
3030
if not os.path.exists(dll) or not os.path.exists(lib):
3131
return False
3232
c.symlink(dll, install_dir + '/bin/leptonica.dll')
3333
c.symlink(lib, install_dir + '/lib/leptonica.lib')
3434
elif platform.system() == "Darwin":
35-
lib = install_dir + '/lib/libleptonica.1.78.0.dylib'
35+
lib = install_dir + '/lib/libleptonica.1.80.0.dylib'
3636
if not os.path.exists(lib):
3737
return False
3838
c.symlink(lib, install_dir + '/lib/libleptonica.dylib')
@@ -49,7 +49,7 @@ def check_existing():
4949
return False
5050

5151
with open(version_file, 'rt') as f:
52-
existing_version = f.readline()[22:28] # set(Leptonica_VERSION 1.78.0)
52+
existing_version = f.readline()[22:28] # set(Leptonica_VERSION 1.80.0)
5353
if existing_version != required_version:
5454
return False
5555
return True
@@ -66,12 +66,20 @@ def check_existing():
6666
c.extract(archive, '.')
6767
c.symlink(c.get_archive_top_dir(archive), src_dir)
6868

69+
with open('{}/CMakeLists.txt'.format(src_dir), 'r+') as f:
70+
data = f.read()
71+
data = data.replace('pkg_check_modules(WEBP', '#pkg_check_modules(WEBP')
72+
data = data.replace('if(NOT WEBP', 'if(FALSE')
73+
f.seek(0, os.SEEK_SET)
74+
f.write(data)
75+
6976
c.ensure_got_path(install_dir)
7077

7178
c.recreate_dir(build_dir)
7279
os.chdir(build_dir)
7380

74-
cmake_args = '"{}" -DCMAKE_INSTALL_PREFIX="{}"'.format(src_dir, install_dir)
81+
cmake_args = '"{}" -DCMAKE_INSTALL_PREFIX="{}" -DBUILD_SHARED_LIBS=ON \
82+
-DSW_BUILD=OFF'.format(src_dir, install_dir,)
7583

7684
if platform.system() == "Windows":
7785
env_cmd = c.get_msvc_env_cmd(bitness=bitness, msvc_version=msvc_version)

0 commit comments

Comments
 (0)