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

Unified Diff: sdk/bin/dartanalyzer.bat

Issue 14110004: Add the new dart analyzer to the SDK. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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/dartanalyzer ('k') | tools/create_sdk.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/bin/dartanalyzer.bat
===================================================================
--- sdk/bin/dartanalyzer.bat (revision 21232)
+++ sdk/bin/dartanalyzer.bat (working copy)
@@ -1,18 +1,11 @@
@echo off
-rem #!/bin/bash --posix
-rem Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+rem Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
rem for details. All rights reserved. Use of this source code is governed by a
rem BSD-style license that can be found in the LICENSE file.
-rem
-rem stop if any of the steps fails
-rem set -e
-rem
-rem SCRIPT_DIR=$(dirname $0)
set SCRIPT_DIR=%~dp0
if %SCRIPT_DIR:~-1%==\ set SCRIPT_DIR=%SCRIPT_DIR:~0,-1%
-rem DART_ANALYZER_HOME=$(dirname $SCRIPT_DIR)
for %%I in ("%SCRIPT_DIR%\..") do set "DART_ANALYZER_HOME=%%~fI"
if %DART_ANALYZER_HOME:~-1%==\ set DART_ANALYZER_HOME=%DART_ANALYZER_HOME:~0,-1%
@@ -24,23 +17,6 @@
if [%%a] == [--dart-sdk] set FOUND_SDK=1
)
-rem FOUND_BATCH=0
-rem FOUND_SDK=0
-rem for ARG in "$@"
-rem do
-rem case $ARG in
-rem -batch|--batch)
-rem FOUND_BATCH=1
-rem ;;
-rem --dart-sdk)
-rem FOUND_SDK=1
-rem ;;
-rem *)
-rem ;;
-rem esac
-rem done
-rem
-
setlocal EnableDelayedExpansion
set DART_SDK=""
if [%FOUND_SDK%] == [0] (
@@ -62,50 +38,15 @@
)
endlocal & set "DART_SDK=%DART_SDK%" & set "DART_SDK_HOME=%DART_SDK_HOME%"
-rem DART_SDK=""
-rem if [ $FOUND_SDK = 0 ] ; then
-rem if [ -f $DART_ANALYZER_HOME/lib/core/core.dart ] ; then
-rem DART_SDK="--dart-sdk $DART_ANALYZER_HOME"
-rem else
-rem DART_SDK_HOME=$(dirname $DART_ANALYZER_HOME)/dart-sdk
-rem if [ -d $DART_SDK_HOME ] ; then
-rem DART_SDK="--dart-sdk $DART_SDK_HOME"
-rem else
-rem DART_SDK_HOME=$(dirname $DART_SDK_HOME)/dart-sdk
-rem if [ -d $DART_SDK_HOME ] ; then
-rem DART_SDK="--dart-sdk $DART_SDK_HOME"
-rem else
-rem echo "Couldn't find Dart SDK. Specify with --dart-sdk cmdline argument"
-rem fi
-rem fi
-rem fi
-rem fi
-rem
-
-if exist "%DART_SDK_HOME%\util\analyzer\dart_analyzer.jar" (
- set DART_ANALYZER_LIBS=%DART_SDK_HOME%\util\analyzer
-) else if exist "%DART_ANALYZER_HOME%\util\analyzer\dart_analyzer.jar" (
- set DART_ANALYZER_LIBS=%DART_ANALYZER_HOME%\util\analyzer
+if exist "%DART_SDK_HOME%\util\dartanalyzer\dartanalyzer.jar" (
+ set DART_ANALYZER_LIBS=%DART_SDK_HOME%\util\dartanalyzer
dgrove 2013/04/14 09:34:04 I'm not a Windows expert, but does this work corr
+) else if exist "%DART_ANALYZER_HOME%\util\dartanalyzer\dartanalyzer.jar" (
+ set DART_ANALYZER_LIBS=%DART_ANALYZER_HOME%\util\dartanalyzer
dgrove 2013/04/14 09:34:04 ditto
) else (
- echo Configuration problem. Couldn't find dart_analyzer.jar.
+ echo Configuration problem. Couldn't find dartanalyzer.jar.
exit /b 1
)
-rem if [ -f $DART_SDK_HOME/util/analyzer/dart_analyzer.jar ] ; then
-rem DART_ANALYZER_LIBS=$DART_SDK_HOME/util/analyzer
-rem elif [ -f $DART_ANALYZER_HOME/util/analyzer/dart_analyzer.jar ] ; then
-rem DART_ANALYZER_LIBS=$DART_ANALYZER_HOME/util/analyzer
-rem else
-rem echo "Configuration problem. Couldn't find dart_analyzer.jar."
-rem exit 1
-rem fi
-
-rem
-rem if [ -x /usr/libexec/java_home ]; then
-rem export JAVA_HOME=$(/usr/libexec/java_home -v '1.6+')
-rem fi
-rem
-
setlocal EnableDelayedExpansion
set EXTRA_JVMARGS=-Xss2M
if [%FOUND_BATCH%] == [1] (
@@ -113,27 +54,5 @@
)
endlocal & set "EXTRA_JVMARGS=%EXTRA_JVMARGS%"
-rem EXTRA_JVMARGS="-Xss2M "
-rem OS=`uname | tr [A-Z] [a-z]`
-rem if [ "$OS" == "darwin" ] ; then
-rem # Bump up the heap on Mac VMs, some of which default to 128M or less.
-rem # Users can specify DART_JVMARGS in the environment to override
-rem # this setting. Force to 32 bit client vm. 64 bit and server VM make for
-rem # poor performance.
-rem EXTRA_JVMARGS+=" -Xmx256M -client -d32 "
-rem else
-rem # On other architectures
-rem # -batch invocations will do better with a server vm
-rem # invocations for analyzing a single file do better with a client vm
-rem if [ $FOUND_BATCH = 0 ] ; then
-rem EXTRA_JVMARGS+=" -client "
-rem fi
-rem fi
-rem
-
-java %EXTRA_JVMARGS% %DART_JVMARGS% -ea -classpath "@CLASSPATH@" ^
- com.google.dart.compiler.DartCompiler %DART_SDK% %*
-
-rem exec java $EXTRA_JVMARGS $DART_JVMARGS -ea -classpath "@CLASSPATH@" \
-rem com.google.dart.compiler.DartCompiler ${DART_SDK} $@
-rem
+java %EXTRA_JVMARGS% %DART_JVMARGS% -ea -jar \
+ "%DART_ANALYZER_LIBS%\dartanalyzer.jar" %DART_SDK% %*
« no previous file with comments | « sdk/bin/dartanalyzer ('k') | tools/create_sdk.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698