aboutsummaryrefslogtreecommitdiffhomepage
path: root/pyfantom.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyfantom.py')
-rw-r--r--pyfantom.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/pyfantom.py b/pyfantom.py
index daf9b17..c65c275 100644
--- a/pyfantom.py
+++ b/pyfantom.py
@@ -62,8 +62,14 @@ if platform_type == 'Darwin':
if platform_rel >= MACOSX_BTMODVER:
print " Bluetooth Stack not supported (Rel >= %s)" % MACOSX_BTMODVER
MACOSX_BTENABLE = False
+ if os.getenv("DYLD_FORCE_FLAT_NAMESPACE") is None:
+ raise RuntimeError("Bluetooth Compat Framework needed.\n"
+ "Enable IOBluetooth-Compat Framework using:\n"
+ "$ export DYLD_FORCE_FLAT_NAMESPACE=1\n")
+ #compatlibpath = ctypes.util.find_library('IOBluetooth-Compat.dylib')
compatlibpath = '%s/Library/IOBluetooth-Compat.dylib' % os.getenv("HOME")
-
+ if compatlibpath is None or not os.path.exists(compatlibpath):
+ raise RuntimeError("IOBluetooth-Compat Framework not found")
from AppKit import NSAutoreleasePool, NSApplication
elif platform_type == 'Linux':
@@ -73,6 +79,7 @@ elif platform_type == 'Windows':
else:
raise RuntimeError('Unsupported platform')
+
if libpath is not None:
if DEBUG:
print "Found Fantom Library (", libpath, ")"