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

Side by Side Diff: dart/utils/compiler/build_helper.dart

Issue 10914094: Improve [relativize] for Windows. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « dart/tests/compiler/dart2js/uri_extras_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 exit(result.exitCode); 72 exit(result.exitCode);
73 } 73 }
74 } 74 }
75 Process.run('/bin/chmod', ['+x', uri.path]).then(onExit); 75 Process.run('/bin/chmod', ['+x', uri.path]).then(onExit);
76 } 76 }
77 } 77 }
78 78
79 List<String> buildScript(String name, 79 List<String> buildScript(String name,
80 Uri dartUri, Uri dartVmLocation, 80 Uri dartUri, Uri dartVmLocation,
81 String entrypoint, String options) { 81 String entrypoint, String options) {
82 bool isWindows = (Platform.operatingSystem == 'windows');
82 Uri uri = dartUri.resolve(entrypoint); 83 Uri uri = dartUri.resolve(entrypoint);
83 String path = relativize(dartVmLocation, uri); 84 String path = relativize(dartVmLocation, uri, isWindows);
84 String pathWin = path.replaceAll("/", "\\"); 85 String pathWin = path.replaceAll("/", "\\");
85 86
86 print('dartUri = $dartUri'); 87 print('dartUri = $dartUri');
87 print('dartVmLocation = $dartVmLocation'); 88 print('dartVmLocation = $dartVmLocation');
88 print('${name}Uri = $uri'); 89 print('${name}Uri = $uri');
89 print('${name}Path = $path'); 90 print('${name}Path = $path');
90 print('${name}PathWin = $pathWin'); 91 print('${name}PathWin = $pathWin');
91 92
92 // 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
93 // be necessary temporarily until the VM is better at detecting how 94 // be necessary temporarily until the VM is better at detecting how
(...skipping 28 matching lines...) Expand all
122 set SCRIPTPATH=%~dp0 123 set SCRIPTPATH=%~dp0
123 124
124 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.
125 if %SCRIPTPATH:~-1%==\ set SCRIPTPATH=%SCRIPTPATH:~0,-1% 126 if %SCRIPTPATH:~-1%==\ set SCRIPTPATH=%SCRIPTPATH:~0,-1%
126 127
127 set arguments=%* 128 set arguments=%*
128 129
129 "%SCRIPTPATH%\dart.exe"$options "%SCRIPTPATH%$pathWin" %arguments% 130 "%SCRIPTPATH%\dart.exe"$options "%SCRIPTPATH%$pathWin" %arguments%
130 '''.replaceAll('\n', '\r\n')]; 131 '''.replaceAll('\n', '\r\n')];
131 } 132 }
OLDNEW
« no previous file with comments | « dart/tests/compiler/dart2js/uri_extras_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698