OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 import glob | 6 import glob |
7 import json | 7 import json |
8 import os | 8 import os |
9 import pipes | 9 import pipes |
10 import platform | 10 import platform |
11 import shutil | 11 import shutil |
12 import stat | 12 import stat |
13 import subprocess | 13 import subprocess |
14 import sys | 14 import sys |
15 | 15 |
16 | 16 |
17 script_dir = os.path.dirname(os.path.realpath(__file__)) | 17 script_dir = os.path.dirname(os.path.realpath(__file__)) |
18 chrome_src = os.path.abspath(os.path.join(script_dir, os.pardir)) | 18 chrome_src = os.path.abspath(os.path.join(script_dir, os.pardir)) |
19 SRC_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | 19 SRC_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) |
20 sys.path.insert(0, os.path.join(chrome_src, 'tools', 'gyp', 'pylib')) | 20 sys.path.insert(0, os.path.join(chrome_src, 'tools', 'gyp', 'pylib')) |
21 json_data_file = os.path.join(script_dir, 'win_toolchain.json') | 21 json_data_file = os.path.join(script_dir, 'win_toolchain.json') |
22 | 22 |
23 | 23 |
24 # Use MSVS2015 as the default toolchain. | 24 # Use MSVS2015 as the default toolchain. |
25 CURRENT_DEFAULT_TOOLCHAIN_VERSION = '2017' | 25 CURRENT_DEFAULT_TOOLCHAIN_VERSION = '2015' |
26 | 26 |
27 | 27 |
28 def SetEnvironmentAndGetRuntimeDllDirs(): | 28 def SetEnvironmentAndGetRuntimeDllDirs(): |
29 """Sets up os.environ to use the depot_tools VS toolchain with gyp, and | 29 """Sets up os.environ to use the depot_tools VS toolchain with gyp, and |
30 returns the location of the VS runtime DLLs so they can be copied into | 30 returns the location of the VS runtime DLLs so they can be copied into |
31 the output directory after gyp generation. | 31 the output directory after gyp generation. |
32 | 32 |
33 Return value is [x64path, x86path] or None | 33 Return value is [x64path, x86path] or None |
34 """ | 34 """ |
35 vs_runtime_dll_dirs = None | 35 vs_runtime_dll_dirs = None |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 'copy_dlls': CopyDlls, | 435 'copy_dlls': CopyDlls, |
436 } | 436 } |
437 if len(sys.argv) < 2 or sys.argv[1] not in commands: | 437 if len(sys.argv) < 2 or sys.argv[1] not in commands: |
438 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) | 438 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) |
439 return 1 | 439 return 1 |
440 return commands[sys.argv[1]](*sys.argv[2:]) | 440 return commands[sys.argv[1]](*sys.argv[2:]) |
441 | 441 |
442 | 442 |
443 if __name__ == '__main__': | 443 if __name__ == '__main__': |
444 sys.exit(main()) | 444 sys.exit(main()) |
OLD | NEW |