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:
authorThomas Karl Pietrowski <thopiekar@googlemail.com>2016-07-01 20:37:24 +0300
committerThomas Karl Pietrowski <thopiekar@googlemail.com>2016-07-01 20:37:24 +0300
commit7f5f22d472bc6b261010707ffe0d0d994c62bafa (patch)
tree192945893b6ebe02d2549ab38a01a8426cb8c3fe /cura_app.py
parenta7939c6f3db3b3598e601fbbdee6f168d8b6b99e (diff)
Moving Nvidia workaround to cura_app.py
* also added "debian" into the list of distributions
Diffstat (limited to 'cura_app.py')
-rwxr-xr-xcura_app.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/cura_app.py b/cura_app.py
index 3548acedb6..8a6c5825c3 100755
--- a/cura_app.py
+++ b/cura_app.py
@@ -5,6 +5,19 @@
import os
import sys
+import platform
+
+from UM.Platform import Platform
+
+#WORKAROUND: GITHUB-88 GITHUB-385 GITHUB-612
+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
+ print(platform.linux_distribution())
+ if platform.linux_distribution()[0] in ("debian", "Ubuntu", ): # 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)
#WORKAROUND: GITHUB-704 GITHUB-708
# It looks like setuptools creates a .pth file in