| 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 11 matching lines...) Expand all Loading... |
| 22 Uri productUri = cwd.resolve(productDir); | 22 Uri productUri = cwd.resolve(productDir); |
| 23 | 23 |
| 24 Uri dartVmUri = productUri.resolve(dartVmPath); | 24 Uri dartVmUri = productUri.resolve(dartVmPath); |
| 25 Uri productionUri = productUri.resolve(arguments[2]); | 25 Uri productionUri = productUri.resolve(arguments[2]); |
| 26 Uri developerUri = productUri.resolve(arguments[3]); | 26 Uri developerUri = productUri.resolve(arguments[3]); |
| 27 Uri dartdocUri = productUri.resolve(arguments[4]); | 27 Uri dartdocUri = productUri.resolve(arguments[4]); |
| 28 | 28 |
| 29 List<String> productionScript = buildScript( | 29 List<String> productionScript = buildScript( |
| 30 'dart2js-production', | 30 'dart2js-production', |
| 31 dartUri, dartVmUri, | 31 dartUri, dartVmUri, |
| 32 'lib/compiler/implementation/dart2js.dart', | 32 'lib/compiler/implementation/dart2js.dart', ''); |
| 33 ''); | |
| 34 writeScript(productionUri, productionScript); | 33 writeScript(productionUri, productionScript); |
| 35 | 34 |
| 36 List<String> developerScript = buildScript( | 35 List<String> developerScript = buildScript( |
| 37 'dart2js-developer', | 36 'dart2js-developer', |
| 38 dartUri, dartVmUri, | 37 dartUri, dartVmUri, |
| 39 'lib/compiler/implementation/dart2js.dart', | 38 'lib/compiler/implementation/dart2js.dart', ' --enable_checked_mode'); |
| 40 r' ${DART_VM_FLAGS:---enable_checked_mode}'); | |
| 41 writeScript(developerUri, developerScript); | 39 writeScript(developerUri, developerScript); |
| 42 | 40 |
| 43 List<String> dartdocScript = buildScript( | 41 List<String> dartdocScript = buildScript( |
| 44 'dartdoc', | 42 'dartdoc', |
| 45 dartUri, dartVmUri, | 43 dartUri, dartVmUri, |
| 46 'pkg/dartdoc/bin/dartdoc.dart', | 44 'pkg/dartdoc/bin/dartdoc.dart', ''); |
| 47 ''); | |
| 48 writeScript(dartdocUri, dartdocScript); | 45 writeScript(dartdocUri, dartdocScript); |
| 49 } | 46 } |
| 50 | 47 |
| 51 writeScript(Uri uri, List<String> scripts) { | 48 writeScript(Uri uri, List<String> scripts) { |
| 52 String unixScript = scripts[0]; | 49 String unixScript = scripts[0]; |
| 53 String batFile = scripts[1]; | 50 String batFile = scripts[1]; |
| 54 var f = new File(uriPathToNative(uri.path)); | 51 var f = new File(uriPathToNative(uri.path)); |
| 55 var stream = f.openSync(FileMode.WRITE); | 52 var stream = f.openSync(FileMode.WRITE); |
| 56 try { | 53 try { |
| 57 stream.writeStringSync(unixScript); | 54 stream.writeStringSync(unixScript); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 set SCRIPTPATH=%~dp0 | 139 set SCRIPTPATH=%~dp0 |
| 143 | 140 |
| 144 REM Does the path have a trailing slash? If so, remove it. | 141 REM Does the path have a trailing slash? If so, remove it. |
| 145 if %SCRIPTPATH:~-1%==\ set SCRIPTPATH=%SCRIPTPATH:~0,-1% | 142 if %SCRIPTPATH:~-1%==\ set SCRIPTPATH=%SCRIPTPATH:~0,-1% |
| 146 | 143 |
| 147 set arguments=%* | 144 set arguments=%* |
| 148 | 145 |
| 149 "%SCRIPTPATH%\dart.exe"$options "%SCRIPTPATH%$pathWin" %arguments% | 146 "%SCRIPTPATH%\dart.exe"$options "%SCRIPTPATH%$pathWin" %arguments% |
| 150 '''.replaceAll('\n', '\r\n')]; | 147 '''.replaceAll('\n', '\r\n')]; |
| 151 } | 148 } |
| OLD | NEW |