Linux installer: Also check for libOpenGL

This commit is contained in:
Kovid Goyal 2022-07-18 11:01:22 +05:30
parent 87a5d03546
commit 32ed99b702
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 22 additions and 0 deletions

View File

@ -752,6 +752,16 @@ def check_for_libEGL():
raise SystemExit('You are missing the system library libEGL.so.1. Try installing packages such as libegl1 and libopengl0')
def check_for_libOpenGl():
import ctypes
try:
ctypes.CDLL('libOpenGL.so.0')
return
except Exception:
pass
raise SystemExit('You are missing the system library libOpenGL.so.0. Try installing packages such as libopengl0')
def check_glibc_version(min_required=(2, 31), release_date='2020-02-01'):
# See https://sourceware.org/glibc/wiki/Glibc%20Timeline
import ctypes
@ -788,6 +798,7 @@ def main(install_dir=None, isolated=False, bin_dir=None, share_dir=None, ignore_
break
if q[0] >= 6:
check_for_libEGL()
check_for_libOpenGl()
run_installer(install_dir, isolated, bin_dir, share_dir, version)

View File

@ -801,6 +801,16 @@ def check_for_libEGL():
raise SystemExit('You are missing the system library libEGL.so.1. Try installing packages such as libegl1 and libopengl0')
def check_for_libOpenGl():
import ctypes
try:
ctypes.CDLL('libOpenGL.so.0')
return
except Exception:
pass
raise SystemExit('You are missing the system library libOpenGL.so.0. Try installing packages such as libopengl0')
def check_glibc_version(min_required=(2, 31), release_date='2020-02-01'):
# See https://sourceware.org/glibc/wiki/Glibc%20Timeline
import ctypes
@ -837,6 +847,7 @@ def main(install_dir=None, isolated=False, bin_dir=None, share_dir=None, ignore_
break
if q[0] >= 6:
check_for_libEGL()
check_for_libOpenGl()
run_installer(install_dir, isolated, bin_dir, share_dir, version)