OLD | NEW |
1 @echo off | 1 @echo off |
2 REM Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 2 REM Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
3 REM for details. All rights reserved. Use of this source code is governed by a | 3 REM for details. All rights reserved. Use of this source code is governed by a |
4 REM BSD-style license that can be found in the LICENSE file. | 4 REM BSD-style license that can be found in the LICENSE file. |
5 | 5 |
6 setlocal | 6 setlocal |
7 rem Handle the case where dart-sdk/bin has been symlinked to. | 7 rem Handle the case where dart-sdk/bin has been symlinked to. |
8 set DIR_NAME_WITH_SLASH=%~dp0 | 8 set DIR_NAME_WITH_SLASH=%~dp0 |
9 set DIR_NAME=%DIR_NAME_WITH_SLASH:~0,-1%% | 9 set DIR_NAME=%DIR_NAME_WITH_SLASH:~0,-1%% |
10 call :follow_links "%DIR_NAME%", RETURNED_BIN_DIR | 10 call :follow_links "%DIR_NAME%", RETURNED_BIN_DIR |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 if exist "%SNAPSHOT%" ( | 28 if exist "%SNAPSHOT%" ( |
29 echo Using snapshot "%SNAPSHOT%" >&2 | 29 echo Using snapshot "%SNAPSHOT%" >&2 |
30 set EXTRA_OPTIONS=%EXTRA_OPTIONS% --library-root=%SDK_DIR% | 30 set EXTRA_OPTIONS=%EXTRA_OPTIONS% --library-root=%SDK_DIR% |
31 ) | 31 ) |
32 | 32 |
33 rem See comments regarding options below in dart2js shell script. | 33 rem See comments regarding options below in dart2js shell script. |
34 set EXTRA_VM_OPTIONS=%EXTRA_VM_OPTIONS% --heap_growth_rate=512 | 34 set EXTRA_VM_OPTIONS=%EXTRA_VM_OPTIONS% --heap_growth_rate=512 |
35 | 35 |
36 if exist "%SNAPSHOT%" ( | 36 if exist "%SNAPSHOT%" ( |
37 "%DART%" %EXTRA_VM_OPTIONS% "SNAPSHOT%" "dart2js" %EXTRA_OPTIONS% %* | 37 "%DART%" %EXTRA_VM_OPTIONS% "%SNAPSHOT%" "dart2js" %EXTRA_OPTIONS% %* |
38 ) else ( | 38 ) else ( |
39 "%DART%" %EXTRA_VM_OPTIONS% "%DART2JS%" %EXTRA_OPTIONS% %* | 39 "%DART%" %EXTRA_VM_OPTIONS% "%DART2JS%" %EXTRA_OPTIONS% %* |
40 ) | 40 ) |
41 | 41 |
42 endlocal | 42 endlocal |
43 | 43 |
44 exit /b %errorlevel% | 44 exit /b %errorlevel% |
45 | 45 |
46 :follow_links | 46 :follow_links |
47 setlocal | 47 setlocal |
48 for %%i in (%1) do set result=%%~fi | 48 for %%i in (%1) do set result=%%~fi |
49 set current= | 49 set current= |
50 for /f "tokens=2 delims=[]" %%i in ('dir /a:l ^"%~dp1^" 2^>nul ^ | 50 for /f "tokens=2 delims=[]" %%i in ('dir /a:l ^"%~dp1^" 2^>nul ^ |
51 ^| find "> %~n1 ["') do ( | 51 ^| find "> %~n1 ["') do ( |
52 set current=%%i | 52 set current=%%i |
53 ) | 53 ) |
54 if not "%current%"=="" call :follow_links "%current%", result | 54 if not "%current%"=="" call :follow_links "%current%", result |
55 endlocal & set %~2=%result% | 55 endlocal & set %~2=%result% |
56 goto :eof | 56 goto :eof |
57 | 57 |
58 :end | 58 :end |
OLD | NEW |