Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Side by Side Diff: tools/create_sdk.py

Issue 8784005: Build the sdk in PRODUCT_DIR. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « dart.gyp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 3 # Copyright (c) 2011, 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. The SDK will be 7 # A script which will be invoked from gyp to create an SDK. The SDK will be
8 # used either from the command-line or from the editor. Top structure is 8 # used either from the command-line or from the editor. Top structure is
9 # 9 #
10 # ..sdk/ 10 # ..sdk/
(...skipping 23 matching lines...) Expand all
34 34
35 35
36 import os 36 import os
37 import re 37 import re
38 import sys 38 import sys
39 import utils 39 import utils
40 40
41 from os.path import dirname, join, realpath, exists, isdir 41 from os.path import dirname, join, realpath, exists, isdir
42 from shutil import copyfile, copymode, copytree, ignore_patterns, rmtree 42 from shutil import copyfile, copymode, copytree, ignore_patterns, rmtree
43 43
44 def Main(): 44 def Main(argv):
45 # Pull in all of the gpyi files which will be munged into the sdk. 45 # Pull in all of the gpyi files which will be munged into the sdk.
46 corelib_sources = \ 46 corelib_sources = \
47 (eval(open("corelib/src/corelib_sources.gypi").read()))['sources'] 47 (eval(open("corelib/src/corelib_sources.gypi").read()))['sources']
48 corelib_frog_sources = \ 48 corelib_frog_sources = \
49 (eval(open("frog/lib/frog_corelib_sources.gypi").read()))['sources'] 49 (eval(open("frog/lib/frog_corelib_sources.gypi").read()))['sources']
50 corelib_runtime_sources = \ 50 corelib_runtime_sources = \
51 (eval(open("runtime/lib/lib_sources.gypi").read()))['sources'] 51 (eval(open("runtime/lib/lib_sources.gypi").read()))['sources']
52 corelib_compiler_sources = \ 52 corelib_compiler_sources = \
53 (eval(open("compiler/compiler_corelib_sources.gypi").read())) \ 53 (eval(open("compiler/compiler_corelib_sources.gypi").read())) \
54 ['variables']['compiler_corelib_resources'] 54 ['variables']['compiler_corelib_resources']
55 coreimpl_sources = \ 55 coreimpl_sources = \
56 (eval(open("corelib/src/implementation/corelib_impl_sources.gypi").read()))\ 56 (eval(open("corelib/src/implementation/corelib_impl_sources.gypi").read()))\
57 ['sources'] 57 ['sources']
58 coreimpl_frog_sources = \ 58 coreimpl_frog_sources = \
59 (eval(open("frog/lib/frog_coreimpl_sources.gypi").read()))['sources'] 59 (eval(open("frog/lib/frog_coreimpl_sources.gypi").read()))['sources']
60 coreimpl_runtime_sources = \ 60 coreimpl_runtime_sources = \
61 (eval(open("runtime/lib/lib_impl_sources.gypi").read()))['sources'] 61 (eval(open("runtime/lib/lib_impl_sources.gypi").read()))['sources']
62 62
63 HOME = dirname(dirname(realpath(__file__))) 63 HOME = dirname(dirname(realpath(__file__)))
64 64
65 SDK = join(HOME, 'sdk') 65 SDK = argv[1]
66 if exists(SDK): 66 if exists(SDK):
67 rmtree(SDK) 67 rmtree(SDK)
68 68
69 # Create and populate sdk/bin. 69 # Create and populate sdk/bin.
70 BIN = join(SDK, 'bin') 70 BIN = join(SDK, 'bin')
71 os.makedirs(BIN) 71 os.makedirs(BIN)
72 72
73 # Copy the Dart VM binary into sdk/bin. 73 # Copy the Dart VM binary into sdk/bin.
74 # TODO(dgrove) - deal with architectures that are not ia32 74 # TODO(dgrove) - deal with architectures that are not ia32
75 build_dir = utils.GetBuildRoot(utils.GuessOS(), 'release', 'ia32') 75 build_dir = utils.GetBuildRoot(utils.GuessOS(), 'release', 'ia32')
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 281
282 # Create and copy tools. 282 # Create and copy tools.
283 283
284 UTIL = join(SDK, 'tools') 284 UTIL = join(SDK, 'tools')
285 os.makedirs(UTIL) 285 os.makedirs(UTIL)
286 286
287 copytree(join(HOME, 'utils', 'dartdoc'), join(UTIL, 'dartdoc'), 287 copytree(join(HOME, 'utils', 'dartdoc'), join(UTIL, 'dartdoc'),
288 ignore=ignore_patterns('.svn')) 288 ignore=ignore_patterns('.svn'))
289 289
290 if __name__ == '__main__': 290 if __name__ == '__main__':
291 sys.exit(Main()) 291 sys.exit(Main(sys.argv))
OLDNEW
« no previous file with comments | « dart.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698