[gimp/wip/Jehan/incremental-win-installer-improvements] build: test.




commit 71e84a8c13e6be1786d1b45526a5a3bc3373c15f
Author: Jehan <jehan girinstud io>
Date:   Mon Jun 28 15:07:47 2021 +0200

    build: test.

 build/windows/gitlab-ci/dll_link.py | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/build/windows/gitlab-ci/dll_link.py b/build/windows/gitlab-ci/dll_link.py
index 61528e7ed9..098d43f0e3 100755
--- a/build/windows/gitlab-ci/dll_link.py
+++ b/build/windows/gitlab-ci/dll_link.py
@@ -14,6 +14,7 @@
 # Windows environnment should be passed, here /winenv/.
 
 import argparse
+import filecmp
 import os
 import subprocess
 import re
@@ -35,6 +36,7 @@ bindir = 'bin'
 
 # Main function
 def main(binary, srcdir, destdir, debug):
+  sys.stdout.write("{} (INFO): searching for dependencies of {} in {}\n".format(os.path.basename(__file__), 
binary, srcdir))
   find_dependencies(binary, srcdir)
   if args.debug:
     print("Running in debug mode (no DLL moved)")
@@ -105,7 +107,15 @@ def copy_dlls(dll_list, srcdir, destdir):
   for dll in dll_list:
     full_file_name = os.path.join(srcdir, bindir, dll)
     if os.path.isfile(full_file_name):
-      shutil.copy(full_file_name, destbin)
+      if not os.path.exists(os.path.join(destbin, dll)):
+        sys.stdout.write("{} (INFO): copying {} to {}\n".format(os.path.basename(__file__), full_file_name, 
destbin))
+        shutil.copy(full_file_name, destbin)
+      else:
+        sys.stderr.write("WAAAAA: {} exists!\n".format(os.path.join(destbin, dll)))
+        if filecmp.cmp(full_file_name, os.path.join(destbin, dll), shallow=False):
+          sys.stderr.write("YEAH {} and {} are equal!\n".format( full_file_name, os.path.join(destbin, dll)))
+        else:
+          sys.stderr.write("OUPS {} and {} are different!\n".format(full_file_name, os.path.join(destbin, 
dll)))
     else:
       sys.stderr.write("Missing DLL: {}\n".format(full_file_name))
       sys.exit(os.EX_DATAERR)


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