| OLD | NEW |
| 1 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 # for details. All rights reserved. Use of this source code is governed by a | 2 # for details. All rights reserved. Use of this source code is governed by a |
| 3 # BSD-style license that can be found in the LICENSE file. | 3 # BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 # This file contains a set of utilities functions used by other Python-based | 5 # This file contains a set of utilities functions used by other Python-based |
| 6 # scripts. | 6 # scripts. |
| 7 | 7 |
| 8 import commands | 8 import commands |
| 9 import os | 9 import os |
| 10 import platform | 10 import platform |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 | 189 |
| 190 | 190 |
| 191 # Mapping table between OS and build output location. | 191 # Mapping table between OS and build output location. |
| 192 BUILD_ROOT = { | 192 BUILD_ROOT = { |
| 193 'win32': os.path.join('build'), | 193 'win32': os.path.join('build'), |
| 194 'linux': os.path.join('out'), | 194 'linux': os.path.join('out'), |
| 195 'freebsd': os.path.join('out'), | 195 'freebsd': os.path.join('out'), |
| 196 'macos': os.path.join('xcodebuild'), | 196 'macos': os.path.join('xcodebuild'), |
| 197 } | 197 } |
| 198 | 198 |
| 199 def GetBuildbotGSUtilPath(): |
| 200 gsutil = '/b/build/scripts/slave/gsutil' |
| 201 if platform.system() == 'Windows': |
| 202 gsutil = 'e:\\\\b\\build\\scripts\\slave\\gsutil' |
| 203 return gsutil |
| 204 |
| 199 def GetBuildMode(mode): | 205 def GetBuildMode(mode): |
| 200 global BUILD_MODES | 206 global BUILD_MODES |
| 201 return BUILD_MODES[mode] | 207 return BUILD_MODES[mode] |
| 202 | 208 |
| 203 | 209 |
| 204 def GetBuildConf(mode, arch): | 210 def GetBuildConf(mode, arch): |
| 205 return '%s%s' % (GetBuildMode(mode), arch.upper()) | 211 return '%s%s' % (GetBuildMode(mode), arch.upper()) |
| 206 | 212 |
| 207 ARCH_GUESS = GuessArchitecture() | 213 ARCH_GUESS = GuessArchitecture() |
| 208 BASE_DIR = os.path.abspath(os.path.join(os.curdir, '..')) | 214 BASE_DIR = os.path.abspath(os.path.join(os.curdir, '..')) |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 | 400 |
| 395 def DartSdkBinary(): | 401 def DartSdkBinary(): |
| 396 tools_dir = os.path.dirname(os.path.realpath(__file__)) | 402 tools_dir = os.path.dirname(os.path.realpath(__file__)) |
| 397 dart_binary_prefix = os.path.join(tools_dir, '..', 'sdk' , 'bin') | 403 dart_binary_prefix = os.path.join(tools_dir, '..', 'sdk' , 'bin') |
| 398 return os.path.join(dart_binary_prefix, 'dart') | 404 return os.path.join(dart_binary_prefix, 'dart') |
| 399 | 405 |
| 400 | 406 |
| 401 if __name__ == "__main__": | 407 if __name__ == "__main__": |
| 402 import sys | 408 import sys |
| 403 Main(sys.argv) | 409 Main(sys.argv) |
| OLD | NEW |