diff --git a/win_toolchain/package_from_installed.py b/win_toolchain/package_from_installed.py index fe8ac29ea..6719e3a64 100644 --- a/win_toolchain/package_from_installed.py +++ b/win_toolchain/package_from_installed.py @@ -97,7 +97,7 @@ def BuildRepackageFileList(src_dir): return result -def BuildFileList(override_dir, include_arm): +def BuildFileList(override_dir, include_arm, vs_path): result = [] # Subset of VS corresponding roughly to VC. @@ -149,8 +149,6 @@ def BuildFileList(override_dir, include_arm): 'sysarm64'), ] - vs_path = GetVSPath() - for path in paths: src = path[0] if isinstance(path, tuple) else path # Note that vs_path is ignored if src is an absolute path. @@ -505,7 +503,7 @@ def main(): _vc_tools = temp_tools_path[len(vs_path) + 1:].replace('\\', '/') print('Building file list for VS %s Windows %s...' % (_vs_version, _win_version)) - files = BuildFileList(options.override_dir, options.arm) + files = BuildFileList(options.override_dir, options.arm, vs_path) AddEnvSetup(files, options.arm)