OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
4 # for details. All rights reserved. Use of this source code is governed by a | 4 # for details. All rights reserved. Use of this source code is governed by a |
5 # BSD-style license that can be found in the LICENSE file. | 5 # BSD-style license that can be found in the LICENSE file. |
6 # | 6 # |
7 # A script which will be invoked from gyp to create an SDK. | 7 # A script which will be invoked from gyp to create an SDK. |
8 # | 8 # |
9 # Usage: create_sdk.py sdk_directory | 9 # Usage: create_sdk.py sdk_directory |
10 # | 10 # |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 # Create and copy Analyzer library into 'util' | 236 # Create and copy Analyzer library into 'util' |
237 ANALYZER_DEST = join(UTIL, 'analyzer') | 237 ANALYZER_DEST = join(UTIL, 'analyzer') |
238 os.makedirs(ANALYZER_DEST) | 238 os.makedirs(ANALYZER_DEST) |
239 | 239 |
240 analyzer_src_jar = join(ANALYZER_HOME, 'util', 'analyzer', | 240 analyzer_src_jar = join(ANALYZER_HOME, 'util', 'analyzer', |
241 'dart_analyzer.jar') | 241 'dart_analyzer.jar') |
242 analyzer_dest_jar = join(ANALYZER_DEST, 'dart_analyzer.jar') | 242 analyzer_dest_jar = join(ANALYZER_DEST, 'dart_analyzer.jar') |
243 copyfile(analyzer_src_jar, analyzer_dest_jar) | 243 copyfile(analyzer_src_jar, analyzer_dest_jar) |
244 | 244 |
245 jarsToCopy = [ join("args4j", "2.0.12", "args4j-2.0.12.jar"), | 245 jarsToCopy = [ join("args4j", "2.0.12", "args4j-2.0.12.jar"), |
246 join("guava", "r09", "guava-r09.jar"), | 246 join("guava", "r13", "guava-13.0.1.jar"), |
247 join("json", "r2_20080312", "json.jar") ] | 247 join("json", "r2_20080312", "json.jar") ] |
248 for jarToCopy in jarsToCopy: | 248 for jarToCopy in jarsToCopy: |
249 dest_dir = join (ANALYZER_DEST, os.path.dirname(jarToCopy)) | 249 dest_dir = join (ANALYZER_DEST, os.path.dirname(jarToCopy)) |
250 os.makedirs(dest_dir) | 250 os.makedirs(dest_dir) |
251 dest_file = join (ANALYZER_DEST, jarToCopy) | 251 dest_file = join (ANALYZER_DEST, jarToCopy) |
252 src_file = join(ANALYZER_HOME, 'util', 'analyzer', jarToCopy) | 252 src_file = join(ANALYZER_HOME, 'util', 'analyzer', jarToCopy) |
253 copyfile(src_file, dest_file) | 253 copyfile(src_file, dest_file) |
254 | 254 |
255 # Create and populate util/pub. | 255 # Create and populate util/pub. |
256 copytree(join(HOME, 'utils', 'pub'), join(UTIL, 'pub'), | 256 copytree(join(HOME, 'utils', 'pub'), join(UTIL, 'pub'), |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: | 293 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: |
294 f.write(revision + '\n') | 294 f.write(revision + '\n') |
295 f.close() | 295 f.close() |
296 | 296 |
297 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) | 297 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) |
298 | 298 |
299 move(SDK_tmp, SDK) | 299 move(SDK_tmp, SDK) |
300 | 300 |
301 if __name__ == '__main__': | 301 if __name__ == '__main__': |
302 sys.exit(Main(sys.argv)) | 302 sys.exit(Main(sys.argv)) |
OLD | NEW |