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

Unified Diff: tools/create_sdk.py

Issue 1295073003: create dartdoc snapshot, add to dart-sdk. Also add resources needed to run dartdoc from the sdk. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: update dartdoc in DEPS Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/bin/dartdoc.bat ('k') | utils/dartdoc/dartdoc.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/create_sdk.py
diff --git a/tools/create_sdk.py b/tools/create_sdk.py
index 4b840708cb660820881d61be651a75fc7199ed2f..b4e2135f765608193d6bc018541a86caec8260d5 100755
--- a/tools/create_sdk.py
+++ b/tools/create_sdk.py
@@ -15,6 +15,7 @@
# ....bin/
# ......dart or dart.exe (executable)
# ......dart.lib (import library for VM native extensions on Windows)
+# ......dartdoc
# ......dartfmt
# ......dart2js
# ......dartanalyzer
@@ -23,9 +24,15 @@
# ........analysis_server.dart.snapshot
# ........dart2js.dart.snapshot
# ........dartanalyzer.dart.snapshot
+# ........dartdoc.dart.snapshot
# ........dartfmt.dart.snapshot
# ........pub.dart.snapshot
# ........utils_wrapper.dart.snapshot
+#.........resources/
+#...........dartdoc/
+#..............packages
+#.............resources/
+#.............templates/
# ....include/
# ......dart_api.h
# ......dart_mirrors_api.h
@@ -114,18 +121,32 @@ def CopyShellScript(src_file, dest_dir):
def CopyDartScripts(home, sdk_root):
for executable in ['dart2js_sdk', 'dartanalyzer_sdk', 'dartfmt_sdk', 'docgen',
- 'dartdocgen', 'pub_sdk']:
+ 'dartdocgen', 'pub_sdk', 'dartdoc']:
CopyShellScript(os.path.join(home, 'sdk', 'bin', executable),
os.path.join(sdk_root, 'bin'))
def CopySnapshots(snapshots, sdk_root):
for snapshot in ['analysis_server', 'dart2js', 'dartanalyzer', 'dartfmt',
- 'utils_wrapper', 'pub']:
+ 'utils_wrapper', 'pub', 'dartdoc']:
snapshot += '.dart.snapshot'
copyfile(join(snapshots, snapshot),
join(sdk_root, 'bin', 'snapshots', snapshot))
+def CopyDartdocResources(home,sdk_root):
+ RESOURCE_DIR = join(sdk_root, 'bin', 'snapshots', 'resources')
+ DARTDOC = join(RESOURCE_DIR, 'dartdoc')
+
+ copytree(join(home, 'third_party', 'pkg', 'dartdoc', 'lib', 'templates'),
+ join(DARTDOC, 'templates'))
+ copytree(join(home, 'third_party', 'pkg', 'dartdoc', 'lib', 'resources'),
+ join(DARTDOC, 'resources'))
+ # write the .packages file
+ PACKAGES_FILE = join(DARTDOC, '.packages')
+ packages_file = open(PACKAGES_FILE, 'w')
+ packages_file.write('dartdoc:.')
+ packages_file.close()
+
def Main():
# Pull in all of the gypi files which will be munged into the sdk.
@@ -251,6 +272,7 @@ def Main():
# Copy dart2js/pub.
CopyDartScripts(HOME, SDK_tmp)
CopySnapshots(SNAPSHOT, SDK_tmp)
+ CopyDartdocResources(HOME, SDK_tmp)
# Write the 'version' file
version = utils.GetVersion()
« no previous file with comments | « sdk/bin/dartdoc.bat ('k') | utils/dartdoc/dartdoc.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698