Skip to contentSkip to conversation

Windows installer: keep dependency cache

PATCH Superseded Arthur Sengileyev 2 participants 3 messages Jan 14, 2023 – Jan 15, 2023

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Windows installer: keep dependency cache

It should be possible to reuse cache built by previous iteration to process next executables. Processed dependencies are already skipped later based on dll name.

Changes for v2:
(1) changed variable name
(2) changed wording in description

---
 scripts/nsis.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
scripts/nsis.py +2 -1
index 03ed7608a2..7cffba70ff 100644
@@ -91,12 +91,13 @@ def main():
         print("Searching '%s' for the dependent dlls ..." % search_path)
         dlldir = os.path.join(destdir + prefix, "dll")
         os.mkdir(dlldir)
+        deps_cache = set()
 
         for exe in glob.glob(os.path.join(destdir + prefix, "*.exe")):
             signcode(exe)
 
             # find all dll dependencies
-            deps = set(find_deps(exe, search_path, set()))
+            deps = set(find_deps(exe, search_path, deps_cache))
             deps.remove(exe)
 
             # copy all dlls to the DLLDIR
Signature · 1 line
2.39.0
#1 lore raw
Quoted 8 lines · Arthur Sengileyev

It should be possible to reuse cache built by previous iteration to process next executables. Processed dependencies are already skipped later based on dll name.

Changes for v2:
(1) changed variable name
(2) changed wording in description

The changelog should not be in the commit message.

Quoted 17 lines
---
 scripts/nsis.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
scripts/nsis.py +1 -0
index 03ed7608a2..7cffba70ff 100644
@@ -91,12 +91,13 @@ def main():
         print("Searching '%s' for the dependent dlls ..." % search_path)
         dlldir = os.path.join(destdir + prefix, "dll")
         os.mkdir(dlldir)
+        deps_cache = set()
 

scripts/nsis.py def main():

Quoted 10 lines
scripts/nsis.py +1 -2
         for exe in glob.glob(os.path.join(destdir + prefix, "*.exe")):
             signcode(exe)
 
             # find all dll dependencies
-            deps = set(find_deps(exe, search_path, set()))
+            deps = set(find_deps(exe, search_path, deps_cache))
             deps.remove(exe)
 
             # copy all dlls to the DLLDIR
--

Regards,
Bin

#2 lore raw

Will resubmit v3 fixing this. Sorry for this. This is my first time using the mailing list to submit changes.

Regards,
Arthur

Quoted 44 lines · Bin Meng
Quoted 8 lines · Arthur Sengileyev

It should be possible to reuse cache built by previous iteration to process next executables. Processed dependencies are already skipped later based on dll name.

Changes for v2:
(1) changed variable name
(2) changed wording in description

The changelog should not be in the commit message.

Quoted 17 lines
---
 scripts/nsis.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
scripts/nsis.py +1 -0
index 03ed7608a2..7cffba70ff 100644
@@ -91,12 +91,13 @@ def main():
         print("Searching '%s' for the dependent dlls ..." % search_path)
         dlldir = os.path.join(destdir + prefix, "dll")
         os.mkdir(dlldir)
+        deps_cache = set()
 

scripts/nsis.py def main():

Quoted 10 lines
scripts/nsis.py +1 -2
         for exe in glob.glob(os.path.join(destdir + prefix, "*.exe")):
             signcode(exe)
 
             # find all dll dependencies
-            deps = set(find_deps(exe, search_path, set()))
+            deps = set(find_deps(exe, search_path, deps_cache))
             deps.remove(exe)
 
             # copy all dlls to the DLLDIR
--

Regards,
Bin