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

Unified Diff: tools/create_sdk.py

Issue 11527010: Add the dart_analyzer tool to the sdk for Windows. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/create_sdk.py
===================================================================
--- tools/create_sdk.py (revision 16004)
+++ tools/create_sdk.py (working copy)
@@ -84,12 +84,7 @@
copyfile(src, dest)
copymode(src, dest)
-# TODO(zundel): this excludes the analyzer from the sdk build until builders
-# have all prerequisite software installed. Also update dart.gyp.
-def ShouldCopyAnalyzer():
- return HOST_OS == 'linux' or HOST_OS == 'macos'
-
def CopyShellScript(src_file, dest_dir):
'''Copies a shell/batch script to the given destination directory. Handles
using the appropriate platform-specific file extension.'''
@@ -152,7 +147,7 @@
analyzer_file_extension = ''
if HOST_OS == 'win32':
dart_file_extension = '.exe'
- analyzer_file_extension = '.bat' # TODO(zundel): test on Windows
+ analyzer_file_extension = '.bat'
dart_import_lib_src = join(HOME, build_dir, 'dart.lib')
dart_import_lib_dest = join(BIN, 'dart.lib')
copyfile(dart_import_lib_src, dart_import_lib_dest)
@@ -166,14 +161,14 @@
elif HOST_OS == 'macos':
subprocess.call(['strip', '-x', dart_dest_binary])
- if ShouldCopyAnalyzer():
- # Copy analyzer into sdk/bin
- ANALYZER_HOME = join(HOME, build_dir, 'analyzer')
- dart_analyzer_src_binary = join(ANALYZER_HOME, 'bin', 'dart_analyzer')
- dart_analyzer_dest_binary = join(BIN,
- 'dart_analyzer' + analyzer_file_extension)
- copyfile(dart_analyzer_src_binary, dart_analyzer_dest_binary)
- copymode(dart_analyzer_src_binary, dart_analyzer_dest_binary)
+ # Copy analyzer into sdk/bin
+ ANALYZER_HOME = join(HOME, build_dir, 'analyzer')
+ dart_analyzer_src_binary = join(ANALYZER_HOME, 'bin',
+ 'dart_analyzer' + analyzer_file_extension)
+ dart_analyzer_dest_binary = join(BIN,
+ 'dart_analyzer' + analyzer_file_extension)
+ copyfile(dart_analyzer_src_binary, dart_analyzer_dest_binary)
+ copymode(dart_analyzer_src_binary, dart_analyzer_dest_binary)
# Create pub shell script.
# TODO(dgrove) - delete this once issue 6619 is fixed
@@ -232,25 +227,24 @@
UTIL = join(SDK_tmp, 'util')
os.makedirs(UTIL)
- if ShouldCopyAnalyzer():
- # Create and copy Analyzer library into 'util'
- ANALYZER_DEST = join(UTIL, 'analyzer')
- os.makedirs(ANALYZER_DEST)
+ # Create and copy Analyzer library into 'util'
+ ANALYZER_DEST = join(UTIL, 'analyzer')
+ os.makedirs(ANALYZER_DEST)
- analyzer_src_jar = join(ANALYZER_HOME, 'util', 'analyzer',
- 'dart_analyzer.jar')
- analyzer_dest_jar = join(ANALYZER_DEST, 'dart_analyzer.jar')
- copyfile(analyzer_src_jar, analyzer_dest_jar)
+ analyzer_src_jar = join(ANALYZER_HOME, 'util', 'analyzer',
+ 'dart_analyzer.jar')
+ analyzer_dest_jar = join(ANALYZER_DEST, 'dart_analyzer.jar')
+ copyfile(analyzer_src_jar, analyzer_dest_jar)
- jarsToCopy = [ join("args4j", "2.0.12", "args4j-2.0.12.jar"),
- join("guava", "r09", "guava-r09.jar"),
- join("json", "r2_20080312", "json.jar") ]
- for jarToCopy in jarsToCopy:
- dest_dir = join (ANALYZER_DEST, os.path.dirname(jarToCopy))
- os.makedirs(dest_dir)
- dest_file = join (ANALYZER_DEST, jarToCopy)
- src_file = join(ANALYZER_HOME, 'util', 'analyzer', jarToCopy)
- copyfile(src_file, dest_file)
+ jarsToCopy = [ join("args4j", "2.0.12", "args4j-2.0.12.jar"),
+ join("guava", "r09", "guava-r09.jar"),
+ join("json", "r2_20080312", "json.jar") ]
+ for jarToCopy in jarsToCopy:
+ dest_dir = join (ANALYZER_DEST, os.path.dirname(jarToCopy))
+ os.makedirs(dest_dir)
+ dest_file = join (ANALYZER_DEST, jarToCopy)
+ src_file = join(ANALYZER_HOME, 'util', 'analyzer', jarToCopy)
+ copyfile(src_file, dest_file)
# Create and populate util/pub.
copytree(join(HOME, 'utils', 'pub'), join(UTIL, 'pub'),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698