Index: win_toolchain/package_from_installed.py |
diff --git a/win_toolchain/package_from_installed.py b/win_toolchain/package_from_installed.py |
index 7f065b6912725255ddadfd4e64f4f7841a94fc40..2762201284115e82e17d5d8457fcb508df7e2b90 100644 |
--- a/win_toolchain/package_from_installed.py |
+++ b/win_toolchain/package_from_installed.py |
@@ -8,11 +8,11 @@ into a .zip file. |
It assumes default install locations for tools, in particular: |
- C:\Program Files (x86)\Microsoft Visual Studio 12.0\... |
-- C:\Program Files (x86)\Windows Kits\8.1\... |
+- C:\Program Files (x86)\Windows Kits\10\... |
1. Start from a fresh Win7 VM image. |
2. Install VS Pro. Deselect everything except MFC. |
-3. Install Windows 8 SDK. Select only the Windows SDK and Debugging Tools for |
+3. Install Windows 10 SDK. Select only the Windows SDK and Debugging Tools for |
Windows. |
4. Run this script, which will build a <sha1>.zip. |
@@ -106,11 +106,17 @@ def BuildFileList(): |
result.append((final_from, dest)) |
# Just copy the whole SDK. |
- sdk_path = r'C:\Program Files (x86)\Windows Kits\8.1' |
+ sdk_path = r'C:\Program Files (x86)\Windows Kits\10' |
for root, _, files in os.walk(sdk_path): |
for f in files: |
combined = os.path.normpath(os.path.join(root, f)) |
- to = os.path.join('win_sdk', combined[len(sdk_path) + 1:]) |
+ # Some of the files in this directory are exceedingly long (and exceed |
+ #_MAX_PATH for any moderately long root), so exclude them. We don't need |
+ # them anyway. |
+ tail = combined[len(sdk_path) + 1:] |
+ if tail.startswith('References\\'): |
+ continue |
+ to = os.path.join('win_sdk', tail) |
result.append((combined, to)) |
if VS_VERSION == '2015': |
@@ -175,10 +181,9 @@ def GenerateSetEnvCmd(target_dir): |
':: Generated by win_toolchain\\package_from_installed.py.\n' |
# Common to x86 and x64 |
'set PATH=%~dp0..\\..\\Common7\\IDE;%PATH%\n' |
- 'set INCLUDE=%~dp0..\\..\\win_sdk\\Include\\um;' |
- '%~dp0..\\..\\win_sdk\\Include\\shared;' |
- '%~dp0..\\..\\win_sdk\\Include\\winrt;' |
- '%~dp0..\\..\\ucrt\\Include\\10.0.10056.0\\ucrt;' |
+ 'set INCLUDE=%~dp0..\\..\\win_sdk\\Include\\10.0.10240.0\\um;' |
+ '%~dp0..\\..\\win_sdk\\Include\\10.0.10240.0\\shared;' |
+ '%~dp0..\\..\\win_sdk\\Include\\10.0.10240.0\\winrt;' |
'%~dp0..\\..\\VC\\include;' |
'%~dp0..\\..\\VC\\atlmfc\\include\n' |
'if "%1"=="/x64" goto x64\n') |
@@ -189,8 +194,7 @@ def GenerateSetEnvCmd(target_dir): |
'%~dp0..\\..\\VC\\bin\\amd64;' # Needed for mspdb1x0.dll. |
'%PATH%\n') |
f.write('set LIB=%~dp0..\\..\\VC\\lib;' |
- '%~dp0..\\..\\win_sdk\\Lib\\winv6.3\\um\\x86;' |
- '%~dp0..\\..\\ucrt\\Lib\\10.0.10056.0\\ucrt\\x86;' |
+ '%~dp0..\\..\\win_sdk\\Lib\\10.0.10240.0\\um\\x86;' |
'%~dp0..\\..\\VC\\atlmfc\\lib\n' |
'goto :EOF\n') |
@@ -200,8 +204,7 @@ def GenerateSetEnvCmd(target_dir): |
'%~dp0..\\..\\VC\\bin\\amd64;' |
'%PATH%\n') |
f.write('set LIB=%~dp0..\\..\\VC\\lib\\amd64;' |
- '%~dp0..\\..\\win_sdk\\Lib\\winv6.3\\um\\x64;' |
- '%~dp0..\\..\\ucrt\\Lib\\10.0.10056.0\\ucrt\\x64;' |
+ '%~dp0..\\..\\win_sdk\\Lib\\10.0.10240.0\\um\\x64;' |
'%~dp0..\\..\\VC\\atlmfc\\lib\\amd64\n') |
@@ -226,7 +229,10 @@ def RenameToSha1(output): |
tempdir = tempfile.mkdtemp() |
old_dir = os.getcwd() |
os.chdir(tempdir) |
- rel_dir = 'vs_files' |
+ if VS_VERSION == '2013': |
+ rel_dir = 'vs2013_files' |
+ else: |
+ rel_dir = 'vs_files' |
with zipfile.ZipFile( |
os.path.join(old_dir, output), 'r', zipfile.ZIP_DEFLATED, True) as zf: |
zf.extractall(rel_dir) |