Skip to content

Commit c6f3b19

Browse files
authored
Fix missing DLL issue Windows machines without VCRuntime (#977)
* Fix missing DLL issue windows without VC This issue was fixed by PyInstaller in a newer version, but since we still use the old one we need to patch it ourselves. It can be removed as soon as we upgrade. For more information, see https://github.com/pyinstaller/pyinstaller/pull/5770/files * Add windows binaries _only_ on windows
1 parent 4346725 commit c6f3b19

File tree

1 file changed

+6
-0
lines changed
  • grr/core/grr_response_core/config

1 file changed

+6
-0
lines changed

grr/core/grr_response_core/config/build.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,20 @@ def FromString(self, string):
131131
CHIPSEC_IMPORTS = ["chipsec.helper.oshelper", "chipsec.helper.linux.linuxhelper"]
132132
133133
WINDOWS_IMPORTS = []
134+
WINDOWS_BINARIES = []
134135
if platform.system\(\).lower\(\) == 'windows':
135136
WINDOWS_IMPORTS = ["win32process", "win32timezone"]
137+
WINDOWS_BINARIES = [\("C:\\\\Windows\\\\System32\\\\VCRUNTIME140_1.dll", "."\)]
136138
137139
a = Analysis\(
138140
[client_path],
139141
# TODO\(https://github.com/pypa/setuptools/issues/1963\): py2_warn is
140142
# a workaround. Revisit in the future, whether this is needed.
141143
hiddenimports=CHIPSEC_IMPORTS + WINDOWS_IMPORTS + ["pkg_resources.py2_warn"],
144+
# TODO: Remove this binary once PyInstaller version is updated.
145+
# The binary below is needed in machines that do not have VC installed.
146+
# This was patched by them in: https://github.com/pyinstaller/pyinstaller/pull/5770/files
147+
binaries=WINDOWS_BINARIES,
142148
hookspath=None\)
143149
144150
# Remove some optional libraries that would be packed but serve no purpose.

0 commit comments

Comments
 (0)