Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: win_toolchain/package_from_installed.py

Issue 1588673004: Package/Install the Windows 10 Universal C Runtime for VS 2015 (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Use OSError instead of WindowsError for pylint on Linux Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « win_toolchain/get_toolchain_if_necessary.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """ 5 """
6 From a system-installed copy of the toolchain, packages all the required bits 6 From a system-installed copy of the toolchain, packages all the required bits
7 into a .zip file. 7 into a .zip file.
8 8
9 It assumes default install locations for tools, in particular: 9 It assumes default install locations for tools, in particular:
10 - C:\Program Files (x86)\Microsoft Visual Studio 12.0\... 10 - C:\Program Files (x86)\Microsoft Visual Studio 12.0\...
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 # (uncompressed) per version and wastes time. Only copy the specified 126 # (uncompressed) per version and wastes time. Only copy the specified
127 # version. 127 # version.
128 if (tail.startswith('Include\\') or tail.startswith('Lib\\') or 128 if (tail.startswith('Include\\') or tail.startswith('Lib\\') or
129 tail.startswith('Source\\')): 129 tail.startswith('Source\\')):
130 if tail.count(WIN_VERSION) == 0: 130 if tail.count(WIN_VERSION) == 0:
131 continue 131 continue
132 to = os.path.join('win_sdk', tail) 132 to = os.path.join('win_sdk', tail)
133 result.append((combined, to)) 133 result.append((combined, to))
134 134
135 if VS_VERSION == '2015': 135 if VS_VERSION == '2015':
136 # The Windows 10 Universal C Runtime installers are needed when packaging
137 # VS 2015. They can be download from here:
138 # https://support.microsoft.com/en-us/kb/2999226
139 # and they must be downloaded to the current user's downloads directory.
140 # The versions needed are those for 64-bit Windows 7, Windows 8, and
141 # Windows 8.1. The 64-bit Server 2008 R2, Server 2012, and Server 2012 R2
142 # versions are identical (same name and contents).
143 universal_runtime_installers = [
144 'Windows6.1-KB2999226-x64.msu',
145 'Windows8-RT-KB2999226-x64.msu',
146 'Windows8.1-KB2999226-x64.msu',
147 ]
148
149 for installer in universal_runtime_installers:
150 result.append((os.path.join(os.environ['userprofile'], 'downloads',
151 installer),
152 os.path.join('installers', installer)))
136 153
137 system_crt_files = [ 154 system_crt_files = [
138 'api-ms-win-core-file-l1-2-0.dll', 155 # Needed to let debug binaries run.
139 'api-ms-win-core-file-l2-1-0.dll',
140 'api-ms-win-core-localization-l1-2-0.dll',
141 'api-ms-win-core-processthreads-l1-1-1.dll',
142 'api-ms-win-core-synch-l1-2-0.dll',
143 'api-ms-win-core-timezone-l1-1-0.dll',
144 'api-ms-win-core-xstate-l2-1-0.dll',
145 'api-ms-win-crt-conio-l1-1-0.dll',
146 'api-ms-win-crt-convert-l1-1-0.dll',
147 'api-ms-win-crt-environment-l1-1-0.dll',
148 'api-ms-win-crt-filesystem-l1-1-0.dll',
149 'api-ms-win-crt-heap-l1-1-0.dll',
150 'api-ms-win-crt-locale-l1-1-0.dll',
151 'api-ms-win-crt-math-l1-1-0.dll',
152 'api-ms-win-crt-multibyte-l1-1-0.dll',
153 'api-ms-win-crt-private-l1-1-0.dll',
154 'api-ms-win-crt-process-l1-1-0.dll',
155 'api-ms-win-crt-runtime-l1-1-0.dll',
156 'api-ms-win-crt-stdio-l1-1-0.dll',
157 'api-ms-win-crt-string-l1-1-0.dll',
158 'api-ms-win-crt-time-l1-1-0.dll',
159 'api-ms-win-crt-utility-l1-1-0.dll',
160 'api-ms-win-eventing-provider-l1-1-0.dll',
161 'ucrtbase.dll',
162 'ucrtbased.dll', 156 'ucrtbased.dll',
163 ] 157 ]
164 bitness = platform.architecture()[0] 158 bitness = platform.architecture()[0]
165 # When running 64-bit python the x64 DLLs will be in System32 159 # When running 64-bit python the x64 DLLs will be in System32
166 x64_path = 'System32' if bitness == '64bit' else 'Sysnative' 160 x64_path = 'System32' if bitness == '64bit' else 'Sysnative'
167 x64_path = os.path.join(r'C:\Windows', x64_path) 161 x64_path = os.path.join(r'C:\Windows', x64_path)
168 for system_crt_file in system_crt_files: 162 for system_crt_file in system_crt_files:
169 result.append((os.path.join(r'C:\Windows\SysWOW64', system_crt_file), 163 result.append((os.path.join(r'C:\Windows\SysWOW64', system_crt_file),
170 os.path.join('sys32', system_crt_file))) 164 os.path.join('sys32', system_crt_file)))
171 result.append((os.path.join(x64_path, system_crt_file), 165 result.append((os.path.join(x64_path, system_crt_file),
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 sys.stdout.write('\rWrote to %s.%s\n' % (output, ' '*50)) 317 sys.stdout.write('\rWrote to %s.%s\n' % (output, ' '*50))
324 sys.stdout.flush() 318 sys.stdout.flush()
325 319
326 RenameToSha1(output) 320 RenameToSha1(output)
327 321
328 return 0 322 return 0
329 323
330 324
331 if __name__ == '__main__': 325 if __name__ == '__main__':
332 sys.exit(main()) 326 sys.exit(main())
OLDNEW
« no previous file with comments | « win_toolchain/get_toolchain_if_necessary.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698