mirror of
https://github.com/yuzu-emu/unicorn
synced 2024-11-24 21:48:26 +00:00
Merge branch 'master' of https://github.com/unicorn-engine/unicorn
This commit is contained in:
commit
8803a100b4
1 changed files with 18 additions and 2 deletions
|
@ -7,6 +7,7 @@ from . import arm_const, arm64_const, mips_const, sparc_const, m68k_const, x86_c
|
||||||
from unicorn_const import *
|
from unicorn_const import *
|
||||||
|
|
||||||
import ctypes, ctypes.util, sys
|
import ctypes, ctypes.util, sys
|
||||||
|
from platform import system
|
||||||
from os.path import split, join, dirname
|
from os.path import split, join, dirname
|
||||||
import distutils.sysconfig
|
import distutils.sysconfig
|
||||||
|
|
||||||
|
@ -51,6 +52,21 @@ if _found == False:
|
||||||
break
|
break
|
||||||
except OSError:
|
except OSError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
# Attempt Darwin specific load (10.11 specific),
|
||||||
|
# since LD_LIBRARY_PATH is not guaranteed to exist
|
||||||
|
if system() == 'Darwin':
|
||||||
|
_lib_path = '/usr/local/lib/'
|
||||||
|
for _lib in _all_libs:
|
||||||
|
try:
|
||||||
|
_lib_file = join(_lib_path, _lib)
|
||||||
|
# print "Trying to load:", _lib_file
|
||||||
|
_uc = ctypes.cdll.LoadLibrary(_lib_file)
|
||||||
|
_found = True
|
||||||
|
break
|
||||||
|
except OSError:
|
||||||
|
pass
|
||||||
|
|
||||||
if _found == False:
|
if _found == False:
|
||||||
raise ImportError("ERROR: fail to load the dynamic library.")
|
raise ImportError("ERROR: fail to load the dynamic library.")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue