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

Side by Side Diff: tools/create_sdk.py

Issue 368993002: Build bits to add an analysis_server snapshot to the SDK. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 months 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') | utils/analysis_server/.gitignore » ('j') | 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) 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 #
11 # The SDK will be used either from the command-line or from the editor. 11 # The SDK will be used either from the command-line or from the editor.
12 # Top structure is 12 # Top structure is
13 # 13 #
14 # ..dart-sdk/ 14 # ..dart-sdk/
15 # ....bin/ 15 # ....bin/
16 # ......dart or dart.exe (executable) 16 # ......dart or dart.exe (executable)
17 # ......dart.lib (import library for VM native extensions on Windows) 17 # ......dart.lib (import library for VM native extensions on Windows)
18 # ......dartfmt 18 # ......dartfmt
19 # ......dart2js 19 # ......dart2js
20 # ......dartanalyzer 20 # ......dartanalyzer
21 # ......pub 21 # ......pub
22 # ......snapshots/ 22 # ......snapshots/
23 # ........analysis_server.dart.snapshot
23 # ........dart2js.dart.snapshot 24 # ........dart2js.dart.snapshot
24 # ........dartanalyzer.dart.snapshot 25 # ........dartanalyzer.dart.snapshot
25 # ........dartfmt.dart.snapshot 26 # ........dartfmt.dart.snapshot
26 # ........pub.dart.snapshot 27 # ........pub.dart.snapshot
27 # ........utils_wrapper.dart.snapshot 28 # ........utils_wrapper.dart.snapshot
28 # ....include/ 29 # ....include/
29 # ......dart_api.h 30 # ......dart_api.h
30 # ......dart_debugger_api.h 31 # ......dart_debugger_api.h
31 # ......dart_mirrors_api.h 32 # ......dart_mirrors_api.h
32 # ......dart_native_api.h 33 # ......dart_native_api.h
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 Copy(src, dest) 106 Copy(src, dest)
106 107
107 108
108 def CopyDartScripts(home, sdk_root): 109 def CopyDartScripts(home, sdk_root):
109 for executable in ['dart2js', 'dartanalyzer', 'dartfmt', 'docgen', 'pub']: 110 for executable in ['dart2js', 'dartanalyzer', 'dartfmt', 'docgen', 'pub']:
110 CopyShellScript(os.path.join(home, 'sdk', 'bin', executable), 111 CopyShellScript(os.path.join(home, 'sdk', 'bin', executable),
111 os.path.join(sdk_root, 'bin')) 112 os.path.join(sdk_root, 'bin'))
112 113
113 114
114 def CopySnapshots(snapshots, sdk_root): 115 def CopySnapshots(snapshots, sdk_root):
115 for snapshot in ['dart2js', 'dartanalyzer', 'dartfmt', 'utils_wrapper', 116 for snapshot in ['analysis_server', 'dart2js', 'dartanalyzer', 'dartfmt',
116 'pub']: 117 'utils_wrapper', 'pub']:
117 snapshot += '.dart.snapshot' 118 snapshot += '.dart.snapshot'
118 copyfile(join(snapshots, snapshot), 119 copyfile(join(snapshots, snapshot),
119 join(sdk_root, 'bin', 'snapshots', snapshot)) 120 join(sdk_root, 'bin', 'snapshots', snapshot))
120 121
121 122
122 def Main(): 123 def Main():
123 # Pull in all of the gypi files which will be munged into the sdk. 124 # Pull in all of the gypi files which will be munged into the sdk.
124 HOME = dirname(dirname(realpath(__file__))) 125 HOME = dirname(dirname(realpath(__file__)))
125 126
126 (options, args) = GetOptions() 127 (options, args) = GetOptions()
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f: 253 with open(os.path.join(SDK_tmp, 'revision'), 'w') as f:
253 f.write(revision + '\n') 254 f.write(revision + '\n')
254 f.close() 255 f.close()
255 256
256 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README')) 257 Copy(join(HOME, 'README.dart-sdk'), join(SDK_tmp, 'README'))
257 258
258 move(SDK_tmp, SDK) 259 move(SDK_tmp, SDK)
259 260
260 if __name__ == '__main__': 261 if __name__ == '__main__':
261 sys.exit(Main()) 262 sys.exit(Main())
OLDNEW
« no previous file with comments | « dart.gyp ('k') | utils/analysis_server/.gitignore » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698