OLD | NEW |
---|---|
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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
176 """Generate a batch file that gyp expects to exist to set up the compiler | 176 """Generate a batch file that gyp expects to exist to set up the compiler |
177 environment. | 177 environment. |
178 | 178 |
179 This is normally generated by a full install of the SDK, but we | 179 This is normally generated by a full install of the SDK, but we |
180 do it here manually since we do not do a full install.""" | 180 do it here manually since we do not do a full install.""" |
181 with open(os.path.join( | 181 with open(os.path.join( |
182 target_dir, r'win_sdk\bin\SetEnv.cmd'), 'w') as f: | 182 target_dir, r'win_sdk\bin\SetEnv.cmd'), 'w') as f: |
183 f.write('@echo off\n' | 183 f.write('@echo off\n' |
184 ':: Generated by win_toolchain\\package_from_installed.py.\n' | 184 ':: Generated by win_toolchain\\package_from_installed.py.\n' |
185 # Common to x86 and x64 | 185 # Common to x86 and x64 |
186 'set VSINSTALLDIR=%~dp0..\\..\\\n' | |
187 'set VCINSTALLDIR=%~dp0..\\..\\VC\\\n' | |
scottmg
2016/01/20 20:50:24
Yuck, these do have trailing \ in vcvarsall. :(
| |
186 'set PATH=%~dp0..\\..\\Common7\\IDE;%PATH%\n' | 188 'set PATH=%~dp0..\\..\\Common7\\IDE;%PATH%\n' |
187 'set INCLUDE=%~dp0..\\..\\win_sdk\\Include\\WINVERSION\\um;' | 189 'set INCLUDE=%~dp0..\\..\\win_sdk\\Include\\WINVERSION\\um;' |
188 '%~dp0..\\..\\win_sdk\\Include\\WINVERSION\\shared;' | 190 '%~dp0..\\..\\win_sdk\\Include\\WINVERSION\\shared;' |
189 '%~dp0..\\..\\win_sdk\\Include\\WINVERSION\\winrt;' | 191 '%~dp0..\\..\\win_sdk\\Include\\WINVERSION\\winrt;' |
190 '%~dp0..\\..\\win_sdk\\Include\\WINVERSION\\ucrt;' # VS 2015 | 192 '%~dp0..\\..\\win_sdk\\Include\\WINVERSION\\ucrt;' # VS 2015 |
191 '%~dp0..\\..\\VC\\include;' | 193 '%~dp0..\\..\\VC\\include;' |
192 '%~dp0..\\..\\VC\\atlmfc\\include\n' | 194 '%~dp0..\\..\\VC\\atlmfc\\include\n' |
193 'if "%1"=="/x64" goto x64\n'.replace('WINVERSION', WIN_VERSION)) | 195 'if "%1"=="/x64" goto x64\n'.replace('WINVERSION', WIN_VERSION)) |
194 | 196 |
195 # x86. Always use amd64_x86 cross, not x86 on x86. | 197 # x86. Always use amd64_x86 cross, not x86 on x86. |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
317 sys.stdout.write('\rWrote to %s.%s\n' % (output, ' '*50)) | 319 sys.stdout.write('\rWrote to %s.%s\n' % (output, ' '*50)) |
318 sys.stdout.flush() | 320 sys.stdout.flush() |
319 | 321 |
320 RenameToSha1(output) | 322 RenameToSha1(output) |
321 | 323 |
322 return 0 | 324 return 0 |
323 | 325 |
324 | 326 |
325 if __name__ == '__main__': | 327 if __name__ == '__main__': |
326 sys.exit(main()) | 328 sys.exit(main()) |
OLD | NEW |