Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJörg Walter <info@syntax-k.de>2018-03-29 22:06:49 +0300
committerJörg Walter <info@syntax-k.de>2018-03-29 22:06:49 +0300
commit7f5fb5813bc913ca7bc97b8218b141eec831f2ce (patch)
treef3ede6597b28eaf2e1a5ce7aebab134536645fba /cura_app.py
parent261945b4699f219533ca5624d073a93cbc72fd12 (diff)
make Linux+NVidia fix fail gracefully
Diffstat (limited to 'cura_app.py')
-rwxr-xr-xcura_app.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/cura_app.py b/cura_app.py
index 6c2d1c2937..695be52816 100755
--- a/cura_app.py
+++ b/cura_app.py
@@ -46,11 +46,15 @@ import faulthandler
if Platform.isLinux(): # Needed for platform.linux_distribution, which is not available on Windows and OSX
# For Ubuntu: https://bugs.launchpad.net/ubuntu/+source/python-qt4/+bug/941826
linux_distro_name = platform.linux_distribution()[0].lower()
- # TODO: Needs a "if X11_GFX == 'nvidia'" here. The workaround is only needed on Ubuntu+NVidia drivers. Other drivers are not affected, but fine with this fix.
- import ctypes
- from ctypes.util import find_library
- libGL = find_library("GL")
- ctypes.CDLL(libGL, ctypes.RTLD_GLOBAL)
+ # The workaround is only needed on Ubuntu+NVidia drivers. Other drivers are not affected, but fine with this fix.
+ try:
+ import ctypes
+ from ctypes.util import find_library
+ libGL = find_library("GL")
+ ctypes.CDLL(libGL, ctypes.RTLD_GLOBAL)
+ except:
+ # GLES-only systems (e.g. ARM Mali) do not have libGL, ignore error
+ pass
# When frozen, i.e. installer version, don't let PYTHONPATH mess up the search path for DLLs.
if Platform.isWindows() and hasattr(sys, "frozen"):