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 23 matching lines...) Expand all Loading... |
34 | 34 |
35 List<String> developerScript = buildScript( | 35 List<String> developerScript = buildScript( |
36 'dart2js-developer', | 36 'dart2js-developer', |
37 dartUri, dartVmUri, | 37 dartUri, dartVmUri, |
38 'lib/compiler/implementation/dart2js.dart', ' --enable_checked_mode'); | 38 'lib/compiler/implementation/dart2js.dart', ' --enable_checked_mode'); |
39 writeScript(developerUri, developerScript); | 39 writeScript(developerUri, developerScript); |
40 | 40 |
41 List<String> dartdocScript = buildScript( | 41 List<String> dartdocScript = buildScript( |
42 'dartdoc', | 42 'dartdoc', |
43 dartUri, dartVmUri, | 43 dartUri, dartVmUri, |
44 'pkg/dartdoc/dartdoc.dart', ''); | 44 'pkg/dartdoc/bin/dartdoc.dart', ''); |
45 writeScript(dartdocUri, dartdocScript); | 45 writeScript(dartdocUri, dartdocScript); |
46 } | 46 } |
47 | 47 |
48 writeScript(Uri uri, List<String> scripts) { | 48 writeScript(Uri uri, List<String> scripts) { |
49 String unixScript = scripts[0]; | 49 String unixScript = scripts[0]; |
50 String batFile = scripts[1]; | 50 String batFile = scripts[1]; |
51 var f = new File(uriPathToNative(uri.path)); | 51 var f = new File(uriPathToNative(uri.path)); |
52 var stream = f.openSync(FileMode.WRITE); | 52 var stream = f.openSync(FileMode.WRITE); |
53 try { | 53 try { |
54 stream.writeStringSync(unixScript); | 54 stream.writeStringSync(unixScript); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 set SCRIPTPATH=%~dp0 | 123 set SCRIPTPATH=%~dp0 |
124 | 124 |
125 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. |
126 if %SCRIPTPATH:~-1%==\ set SCRIPTPATH=%SCRIPTPATH:~0,-1% | 126 if %SCRIPTPATH:~-1%==\ set SCRIPTPATH=%SCRIPTPATH:~0,-1% |
127 | 127 |
128 set arguments=%* | 128 set arguments=%* |
129 | 129 |
130 "%SCRIPTPATH%\dart.exe"$options "%SCRIPTPATH%$pathWin" %arguments% | 130 "%SCRIPTPATH%\dart.exe"$options "%SCRIPTPATH%$pathWin" %arguments% |
131 '''.replaceAll('\n', '\r\n')]; | 131 '''.replaceAll('\n', '\r\n')]; |
132 } | 132 } |
OLD | NEW |