| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #import('dart:io'); | 5 #import('dart:io'); |
| 6 #import('dart:uri'); | 6 #import('dart:uri'); |
| 7 | 7 |
| 8 #import('../../lib/compiler/implementation/util/uri_extras.dart'); | 8 #import('../../lib/compiler/implementation/util/uri_extras.dart'); |
| 9 #import('../../lib/compiler/implementation/filenames.dart'); | 9 #import('../../lib/compiler/implementation/filenames.dart'); |
| 10 | 10 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 print('${name}PathWin = $pathWin'); | 91 print('${name}PathWin = $pathWin'); |
| 92 | 92 |
| 93 // Tell the VM to grow the heap more aggressively. This should only | 93 // Tell the VM to grow the heap more aggressively. This should only |
| 94 // be necessary temporarily until the VM is better at detecting how | 94 // be necessary temporarily until the VM is better at detecting how |
| 95 // applications use memory. | 95 // applications use memory. |
| 96 // TODO(ahe): Remove this option. | 96 // TODO(ahe): Remove this option. |
| 97 options = ' --heap_growth_rate=32$options'; | 97 options = ' --heap_growth_rate=32$options'; |
| 98 | 98 |
| 99 return [ | 99 return [ |
| 100 ''' | 100 ''' |
| 101 #!/bin/bash | 101 #!/bin/sh |
| 102 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 102 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 103 # for details. All rights reserved. Use of this source code is governed by a | 103 # for details. All rights reserved. Use of this source code is governed by a |
| 104 # BSD-style license that can be found in the LICENSE file. | 104 # BSD-style license that can be found in the LICENSE file. |
| 105 | 105 |
| 106 # The following line MUST be the first command in the script. | 106 BIN_DIR=`dirname \$0` |
| 107 ABS_SCRIPT_PATH="\$_" | |
| 108 | |
| 109 # Setting BIN_DIR this way is ugly, but is needed to handle the case where | |
| 110 # dart-sdk/bin has been symlinked to. On MacOS, readlink doesn't work | |
| 111 # with this case. | |
| 112 BIN_DIR="\$(cd "\${ABS_SCRIPT_PATH%/*}" ; pwd -P)" | |
| 113 | |
| 114 unset COLORS | 107 unset COLORS |
| 115 if test -t 1; then | 108 if test -t 1; then |
| 116 # Stdout is a terminal. | 109 # Stdout is a terminal. |
| 117 if test 8 -le `tput colors`; then | 110 if test 8 -le `tput colors`; then |
| 118 # Stdout has at least 8 colors, so enable colors. | 111 # Stdout has at least 8 colors, so enable colors. |
| 119 COLORS="--enable-diagnostic-colors" | 112 COLORS="--enable-diagnostic-colors" |
| 120 fi | 113 fi |
| 121 fi | 114 fi |
| 122 exec "\$BIN_DIR"/dart$options "\$BIN_DIR/$path" \$COLORS "\$@" | 115 exec \$BIN_DIR/dart$options \$BIN_DIR/$path \$COLORS "\$@" |
| 123 ''', | 116 ''', |
| 124 ''' | 117 ''' |
| 125 @echo off | 118 @echo off |
| 126 REM Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 119 REM Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 127 REM for details. All rights reserved. Use of this source code is governed by a | 120 REM for details. All rights reserved. Use of this source code is governed by a |
| 128 REM BSD-style license that can be found in the LICENSE file. | 121 REM BSD-style license that can be found in the LICENSE file. |
| 129 | 122 |
| 130 set SCRIPTPATH=%~dp0 | 123 set SCRIPTPATH=%~dp0 |
| 131 | 124 |
| 132 REM Does the path have a trailing slash? If so, remove it. | 125 REM Does the path have a trailing slash? If so, remove it. |
| 133 if %SCRIPTPATH:~-1%==\ set SCRIPTPATH=%SCRIPTPATH:~0,-1% | 126 if %SCRIPTPATH:~-1%==\ set SCRIPTPATH=%SCRIPTPATH:~0,-1% |
| 134 | 127 |
| 135 set arguments=%* | 128 set arguments=%* |
| 136 | 129 |
| 137 "%SCRIPTPATH%\dart.exe"$options "%SCRIPTPATH%$pathWin" %arguments% | 130 "%SCRIPTPATH%\dart.exe"$options "%SCRIPTPATH%$pathWin" %arguments% |
| 138 '''.replaceAll('\n', '\r\n')]; | 131 '''.replaceAll('\n', '\r\n')]; |
| 139 } | 132 } |
| OLD | NEW |