mirror of
https://notabug.org/scuti/lib3ddevil1
synced 2024-11-22 05:42:59 +05:30
Added library to path to search for .so
This commit is contained in:
parent
9b9f0bd6ee
commit
e63ddfb838
@ -1,8 +1,13 @@
|
|||||||
import ctypes
|
import ctypes, os, sys
|
||||||
|
|
||||||
def loadlibc():
|
def loadlibc():
|
||||||
sharedlib = './lib3ddevil1.so'
|
sharedlib = './lib3ddevil1.so'
|
||||||
libc = None
|
libc = None
|
||||||
|
os.environ['PATH'] = os.path.abspath(
|
||||||
|
os.path.join(
|
||||||
|
os.path.dirname(__file__), "../")) \
|
||||||
|
+ ';' \
|
||||||
|
+ os.environ['PATH']
|
||||||
try:
|
try:
|
||||||
libc = ctypes.cdll.LoadLibrary(sharedlib)
|
libc = ctypes.cdll.LoadLibrary(sharedlib)
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
@ -10,4 +15,4 @@ def loadlibc():
|
|||||||
raise SystemExit("Couldn't load %s" % sharedlib)
|
raise SystemExit("Couldn't load %s" % sharedlib)
|
||||||
return libc
|
return libc
|
||||||
|
|
||||||
libc = loadlibc()
|
libc = loadlibc()
|
||||||
|
Loading…
Reference in New Issue
Block a user