[pan: 2/9] Make wininstall.py work with different msys bases




commit 96caa880587c3baa0852b1ae5ec83021eaec14c6
Author: Thomas Tanner <thosrtanner googlemail com>
Date:   Sun Jun 12 20:13:48 2022 +0100

    Make wininstall.py work with different msys bases

 wininstall.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/wininstall.py b/wininstall.py
index 708c948..75e1fca 100644
--- a/wininstall.py
+++ b/wininstall.py
@@ -82,15 +82,16 @@ class Copier:
             self._dlls.remove(source)
             return
 
-        if os.path.splitext(source)[1] not in ( ".dll", ".exe" ):
+        if os.path.splitext(source)[1] not in (".dll", ".exe"):
             return
 
         # Get all the dlls we need in the root
         output = subprocess.run(
             [ "ldd", source ], capture_output=True, text=True, check=True
         )
+        prefix = os.environ['MSYSTEM'].lower()
         for line in output.stdout.splitlines():
-            dll = re.search(r'(/mingw64.*\.dll)', line)
+            dll = re.search(r'(/' + prefix + '/.*\.dll)', line)
             if dll:
                 dll = self.convert_name_to_windows(dll.group())
                 if dll not in self._copied_files:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]