mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-23 11:39:53 +00:00
ci: Check DLLs against /mingw64/bin instead of C:\Windows
This commit is contained in:
parent
2fe8618d24
commit
5bf7bc2bcf
@ -33,15 +33,18 @@ def main():
|
|||||||
sout = subprocess.check_output(['ldd', args.prog]).decode('utf-8')
|
sout = subprocess.check_output(['ldd', args.prog]).decode('utf-8')
|
||||||
for line in sout.splitlines():
|
for line in sout.splitlines():
|
||||||
line = line.strip().split()
|
line = line.strip().split()
|
||||||
dll_name, dll_path, dll_load_addr = line[0], line[2], line[3]
|
dll_name, original_dll_path, dll_load_addr = line[0], line[2], line[3]
|
||||||
if dll_name.startswith('???'):
|
if dll_name.startswith('???'):
|
||||||
print('Unknown DLL?')
|
print('Unknown DLL?')
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# ldd on msys gives Unix-style paths, but mingw Python wants them Windows-style
|
# ldd on msys gives Unix-style paths, but mingw Python wants them Windows-style
|
||||||
# Use cygpath to convert the paths, because both mingw and msys Python can handle them
|
# Use cygpath to convert the paths, because both mingw and msys Python can handle them
|
||||||
|
# Force lookup against /mingw64/bin to avoid external DLLs
|
||||||
|
dll_path = '/mingw64/bin/' + dll_name
|
||||||
dll_path = subprocess.check_output(['cygpath', '-w', dll_path]).decode('utf-8').strip()
|
dll_path = subprocess.check_output(['cygpath', '-w', dll_path]).decode('utf-8').strip()
|
||||||
if dll_path.lower().startswith('c:\\windows'):
|
if not os.path.exists(dll_path):
|
||||||
print('Skipping system DLL %s' % dll_path)
|
print('Skipping DLL outside /mingw64/bin: %s' % original_dll_path)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
dest_path = os.path.join(args.dest, dll_name)
|
dest_path = os.path.join(args.dest, dll_name)
|
||||||
|
Loading…
Reference in New Issue
Block a user