diff options
author | Dimitri Karamazov <deserter666@danwin1210.me> | 2021-04-06 20:15:44 +0530 |
---|---|---|
committer | Dimitri Karamazov <deserter666@danwin1210.me> | 2021-04-06 20:15:44 +0530 |
commit | 5c612c6e869b1c865c948acbc2fdebf9cb669e18 (patch) | |
tree | e90b1ef05b9bbfb2f5e28fe5ec61b30451f5def9 /qutebrowser/misc | |
parent | 98da67632cc014e64a2f6a4ae6b5d7ca4fd21ac0 (diff) | |
download | qutebrowser-5c612c6e869b1c865c948acbc2fdebf9cb669e18.tar.gz qutebrowser-5c612c6e869b1c865c948acbc2fdebf9cb669e18.zip |
Pull the highest version of libQtWebEngineCore.so
Diffstat (limited to 'qutebrowser/misc')
-rw-r--r-- | qutebrowser/misc/elf.py | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/qutebrowser/misc/elf.py b/qutebrowser/misc/elf.py index 3bfd111fa..1d26df85f 100644 --- a/qutebrowser/misc/elf.py +++ b/qutebrowser/misc/elf.py @@ -316,20 +316,9 @@ def parse_webenginecore() -> Optional[Versions]: else: library_path = pathlib.Path(QLibraryInfo.location(QLibraryInfo.LibrariesPath)) - filenames = [ - # PyQt bundles those files with a .5 suffix, and Linux distributions - # most likely symlinks that. - 'libQt5WebEngineCore.so.5', - # OpenBSD - 'libQt5WebEngineCore.so.1.0', - ] - for filename in filenames: - lib_file = library_path / filename - if lib_file.exists(): - log.misc.debug(f"QtWebEngine .so found at {lib_file}") - break - else: - log.misc.debug(f"No QtWebEngine .so found in {library_path}") + library_name = sorted(list(pathlib.Path(library_path).glob('libQt5WebEngineCore.so*'))) + lib_file = library_path / library_name[-1].as_posix() + if not lib_file.exists(): return None try: |