| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 } | 43 } |
| 44 | 44 |
| 45 f = new File('${uriPathToNative(uri.path)}.bat'); | 45 f = new File('${uriPathToNative(uri.path)}.bat'); |
| 46 stream = f.openSync(FileMode.WRITE); | 46 stream = f.openSync(FileMode.WRITE); |
| 47 try { | 47 try { |
| 48 stream.writeStringSync(batFile); | 48 stream.writeStringSync(batFile); |
| 49 } finally { | 49 } finally { |
| 50 stream.closeSync(); | 50 stream.closeSync(); |
| 51 } | 51 } |
| 52 | 52 |
| 53 if (Platform.operatingSystem() != 'windows') { | 53 if (Platform.operatingSystem != 'windows') { |
| 54 onExit(int exitCode, String stdout, String stderr) { | 54 onExit(int exitCode, String stdout, String stderr) { |
| 55 if (exitCode != 0) { | 55 if (exitCode != 0) { |
| 56 print(stdout); | 56 print(stdout); |
| 57 print(stderr); | 57 print(stderr); |
| 58 exit(exitCode); | 58 exit(exitCode); |
| 59 } | 59 } |
| 60 } | 60 } |
| 61 new Process.run('/bin/chmod', ['+x', uri.path], null, onExit); | 61 new Process.run('/bin/chmod', ['+x', uri.path], null, onExit); |
| 62 } | 62 } |
| 63 } | 63 } |
| (...skipping 28 matching lines...) Expand all Loading... |
| 92 set SCRIPTPATH=%~dp0 | 92 set SCRIPTPATH=%~dp0 |
| 93 | 93 |
| 94 REM Does the path have a trailing slash? If so, remove it. | 94 REM Does the path have a trailing slash? If so, remove it. |
| 95 if %SCRIPTPATH:~-1%==\ set SCRIPTPATH=%SCRIPTPATH:~0,-1% | 95 if %SCRIPTPATH:~-1%==\ set SCRIPTPATH=%SCRIPTPATH:~0,-1% |
| 96 | 96 |
| 97 set arguments=%* | 97 set arguments=%* |
| 98 | 98 |
| 99 "%SCRIPTPATH%\dart.exe"$options "%SCRIPTPATH%$dart2jsPathWin" %arguments% | 99 "%SCRIPTPATH%\dart.exe"$options "%SCRIPTPATH%$dart2jsPathWin" %arguments% |
| 100 '''.replaceAll('\n', '\r\n')]; | 100 '''.replaceAll('\n', '\r\n')]; |
| 101 } | 101 } |
| OLD | NEW |