| 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 json | 6 import json |
| 7 import os | 7 import os |
| 8 import pipes | 8 import pipes |
| 9 import shutil | 9 import shutil |
| 10 import subprocess | 10 import subprocess |
| 11 import sys | 11 import sys |
| 12 | 12 |
| 13 | 13 |
| 14 script_dir = os.path.dirname(os.path.realpath(__file__)) | 14 script_dir = os.path.dirname(os.path.realpath(__file__)) |
| 15 fletch_src = os.path.abspath(os.path.join(script_dir, os.pardir, os.pardir)) | 15 dartino_src = os.path.abspath(os.path.join(script_dir, os.pardir, os.pardir)) |
| 16 SRC_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | 16 SRC_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) |
| 17 sys.path.insert(0, os.path.join(fletch_src, 'third_party', 'gyp', 'pylib')) | 17 sys.path.insert(0, os.path.join(dartino_src, 'third_party', 'gyp', 'pylib')) |
| 18 json_data_file = os.path.join(script_dir, 'win_toolchain.json') | 18 json_data_file = os.path.join(script_dir, 'win_toolchain.json') |
| 19 | 19 |
| 20 | 20 |
| 21 import gyp | 21 import gyp |
| 22 | 22 |
| 23 | 23 |
| 24 def SetEnvironmentAndGetRuntimeDllDirs(): | 24 def SetEnvironmentAndGetRuntimeDllDirs(): |
| 25 """Sets up os.environ to use the depot_tools VS toolchain with gyp, and | 25 """Sets up os.environ to use the depot_tools VS toolchain with gyp, and |
| 26 returns the location of the VS runtime DLLs so they can be copied into | 26 returns the location of the VS runtime DLLs so they can be copied into |
| 27 the output directory after gyp generation. | 27 the output directory after gyp generation. |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 'copy_dlls': CopyDlls, | 256 'copy_dlls': CopyDlls, |
| 257 } | 257 } |
| 258 if len(sys.argv) < 2 or sys.argv[1] not in commands: | 258 if len(sys.argv) < 2 or sys.argv[1] not in commands: |
| 259 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) | 259 print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands) |
| 260 return 1 | 260 return 1 |
| 261 return commands[sys.argv[1]](*sys.argv[2:]) | 261 return commands[sys.argv[1]](*sys.argv[2:]) |
| 262 | 262 |
| 263 | 263 |
| 264 if __name__ == '__main__': | 264 if __name__ == '__main__': |
| 265 sys.exit(main()) | 265 sys.exit(main()) |
| OLD | NEW |