mirror of
https://github.com/yuzu-emu/unicorn
synced 2024-11-25 14:29:03 +00:00
Merge pull request #706 from angr/fix/static_library_copying_nitpicks
Static library copying nitpicks
This commit is contained in:
commit
d00f773e8e
1 changed files with 8 additions and 3 deletions
|
@ -151,8 +151,10 @@ def build_libraries():
|
||||||
|
|
||||||
# check if a prebuilt library exists
|
# check if a prebuilt library exists
|
||||||
# if so, use it instead of building
|
# if so, use it instead of building
|
||||||
if os.path.exists(os.path.join(ROOT_DIR, 'prebuilt', LIBRARY_FILE)):
|
if os.path.exists(os.path.join(ROOT_DIR, 'prebuilt', LIBRARY_FILE)) \
|
||||||
|
and os.path.exists(os.path.join(ROOT_DIR, 'prebuilt', STATIC_LIBRARY_FILE)):
|
||||||
shutil.copy(os.path.join(ROOT_DIR, 'prebuilt', LIBRARY_FILE), LIBS_DIR)
|
shutil.copy(os.path.join(ROOT_DIR, 'prebuilt', LIBRARY_FILE), LIBS_DIR)
|
||||||
|
shutil.copy(os.path.join(ROOT_DIR, 'prebuilt', STATIC_LIBRARY_FILE), LIBS_DIR)
|
||||||
return
|
return
|
||||||
|
|
||||||
# otherwise, build!!
|
# otherwise, build!!
|
||||||
|
@ -177,10 +179,13 @@ def build_libraries():
|
||||||
|
|
||||||
shutil.copy(LIBRARY_FILE, LIBS_DIR)
|
shutil.copy(LIBRARY_FILE, LIBS_DIR)
|
||||||
try:
|
try:
|
||||||
# static library may fail to build on windows if user doesn't have visual studio 12 installed. this is fine.
|
# static library may fail to build on windows if user doesn't have visual studio installed. this is fine.
|
||||||
shutil.copy(STATIC_LIBRARY_FILE, LIBS_DIR)
|
shutil.copy(STATIC_LIBRARY_FILE, LIBS_DIR)
|
||||||
except:
|
except:
|
||||||
pass
|
print('Warning: Could not build static library file! This build is not appropriate for a binary distribution')
|
||||||
|
# enforce this
|
||||||
|
if 'upload' in sys.argv:
|
||||||
|
sys.exit(1)
|
||||||
os.chdir(cwd)
|
os.chdir(cwd)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue