| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 138            ignore=ignore_patterns('.svn')) | 138            ignore=ignore_patterns('.svn')) | 
| 139   copytree(os.path.join('runtime', 'bin'), | 139   copytree(os.path.join('runtime', 'bin'), | 
| 140            os.path.join(sdk_root, 'lib', 'dart2js', 'runtime', 'bin'), | 140            os.path.join(sdk_root, 'lib', 'dart2js', 'runtime', 'bin'), | 
| 141            ignore=ignore_patterns('.svn')) | 141            ignore=ignore_patterns('.svn')) | 
| 142   if utils.GuessOS() == 'win32': | 142   if utils.GuessOS() == 'win32': | 
| 143     dart2js = os.path.join(sdk_root, 'bin', 'dart2js.bat') | 143     dart2js = os.path.join(sdk_root, 'bin', 'dart2js.bat') | 
| 144     Copy(os.path.join(build_dir, 'dart2js.bat'), dart2js) | 144     Copy(os.path.join(build_dir, 'dart2js.bat'), dart2js) | 
| 145     ReplaceInFiles([dart2js], | 145     ReplaceInFiles([dart2js], | 
| 146                    [(r'%SCRIPTPATH%\.\.\\lib', | 146                    [(r'%SCRIPTPATH%\.\.\\lib', | 
| 147                      r'%SCRIPTPATH%..\lib\dart2js\lib')]) | 147                      r'%SCRIPTPATH%..\lib\dart2js\lib')]) | 
|  | 148     dartdoc = os.path.join(sdk_root, 'bin', 'dartdoc.bat') | 
|  | 149     Copy(os.path.join(build_dir, 'dartdoc.bat'), dartdoc) | 
| 148   else: | 150   else: | 
| 149     dart2js = os.path.join(sdk_root, 'bin', 'dart2js') | 151     dart2js = os.path.join(sdk_root, 'bin', 'dart2js') | 
| 150     Copy(os.path.join(build_dir, 'dart2js'), dart2js) | 152     Copy(os.path.join(build_dir, 'dart2js'), dart2js) | 
| 151     ReplaceInFiles([dart2js], | 153     ReplaceInFiles([dart2js], | 
| 152                    [(r'\$BIN_DIR/\.\./\.\./lib', | 154                    [(r'\$BIN_DIR/\.\./\.\./lib', | 
| 153                      r'$BIN_DIR/../lib/dart2js/lib')]) | 155                      r'$BIN_DIR/../lib/dart2js/lib')]) | 
|  | 156     dartdoc = os.path.join(sdk_root, 'bin', 'dartdoc') | 
|  | 157     Copy(os.path.join(build_dir, 'dartdoc'), dartdoc) | 
| 154 | 158 | 
| 155 | 159 | 
| 156 def Main(argv): | 160 def Main(argv): | 
| 157   # Pull in all of the gpyi files which will be munged into the sdk. | 161   # Pull in all of the gpyi files which will be munged into the sdk. | 
| 158   builtin_runtime_sources = \ | 162   builtin_runtime_sources = \ | 
| 159     (eval(open("runtime/bin/builtin_sources.gypi").read()))['sources'] | 163     (eval(open("runtime/bin/builtin_sources.gypi").read()))['sources'] | 
| 160   io_runtime_sources = \ | 164   io_runtime_sources = \ | 
| 161     (eval(open("runtime/bin/io_sources.gypi").read()))['sources'] | 165     (eval(open("runtime/bin/io_sources.gypi").read()))['sources'] | 
| 162   corelib_sources = \ | 166   corelib_sources = \ | 
| 163     (eval(open("corelib/src/corelib_sources.gypi").read()))['sources'] | 167     (eval(open("corelib/src/corelib_sources.gypi").read()))['sources'] | 
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 459   if revision is not None: | 463   if revision is not None: | 
| 460     with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: | 464     with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: | 
| 461       f.write(revision + '\n') | 465       f.write(revision + '\n') | 
| 462       f.close() | 466       f.close() | 
| 463 | 467 | 
| 464   move(SDK_tmp, SDK) | 468   move(SDK_tmp, SDK) | 
| 465   utils.Touch(os.path.join(SDK, 'create.stamp')) | 469   utils.Touch(os.path.join(SDK, 'create.stamp')) | 
| 466 | 470 | 
| 467 if __name__ == '__main__': | 471 if __name__ == '__main__': | 
| 468   sys.exit(Main(sys.argv)) | 472   sys.exit(Main(sys.argv)) | 
| OLD | NEW | 
|---|