mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-10-19 02:38:15 +02:00
Allow dlls to be copied out of prebuilt directory
This commit is contained in:
parent
876570c8d7
commit
188a1d78d3
0
bindings/python/prebuilt/.gitkeep
Normal file
0
bindings/python/prebuilt/.gitkeep
Normal file
@ -106,8 +106,11 @@ def build_libraries():
|
|||||||
got_all = True
|
got_all = True
|
||||||
for dll in ALL_WINDOWS_DLLS:
|
for dll in ALL_WINDOWS_DLLS:
|
||||||
dllpath = os.path.join(sys.prefix, 'bin', dll)
|
dllpath = os.path.join(sys.prefix, 'bin', dll)
|
||||||
|
dllpath2 = os.path.join(ROOT_DIR, 'prebuilt', dll)
|
||||||
if os.path.exists(dllpath):
|
if os.path.exists(dllpath):
|
||||||
shutil.copy(dllpath, LIBS_DIR)
|
shutil.copy(dllpath, LIBS_DIR)
|
||||||
|
elif os.path.exists(dllpath2):
|
||||||
|
shutil.copy(dllpath2, LIBS_DIR)
|
||||||
else:
|
else:
|
||||||
got_all = False
|
got_all = False
|
||||||
|
|
||||||
@ -117,6 +120,12 @@ def build_libraries():
|
|||||||
if 'upload' in sys.argv:
|
if 'upload' in sys.argv:
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
# check if a prebuilt library exists
|
||||||
|
# if so, use it instead of building
|
||||||
|
if os.path.exists(os.path.join(ROOT_DIR, 'prebuilt', LIBRARY_FILE)):
|
||||||
|
shutil.copy(os.path.join(ROOT_DIR, 'prebuild', LIBRARY_FILE), LIBS_DIR)
|
||||||
|
return
|
||||||
|
|
||||||
# otherwise, build!!
|
# otherwise, build!!
|
||||||
os.chdir(BUILD_DIR)
|
os.chdir(BUILD_DIR)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user