| 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 21 matching lines...) Expand all Loading... |
| 32 ) | 32 ) |
| 33 | 33 |
| 34 rem Get absolute full name for DART_ROOT. | 34 rem Get absolute full name for DART_ROOT. |
| 35 for %%i in ("%SDK_DIR%\..\") do set DART_ROOT=%%~fi | 35 for %%i in ("%SDK_DIR%\..\") do set DART_ROOT=%%~fi |
| 36 | 36 |
| 37 rem Remove trailing backslash if there is one | 37 rem Remove trailing backslash if there is one |
| 38 if %DART_ROOT:~-1%==\ set DART_ROOT=%DART_ROOT:~0,-1% | 38 if %DART_ROOT:~-1%==\ set DART_ROOT=%DART_ROOT:~0,-1% |
| 39 | 39 |
| 40 set DART2JS=%DART_ROOT%\pkg\compiler\lib\src\dart2js.dart | 40 set DART2JS=%DART_ROOT%\pkg\compiler\lib\src\dart2js.dart |
| 41 | 41 |
| 42 rem DART_CONFIGURATION defaults to ReleaseIA32 | 42 rem DART_CONFIGURATION defaults to ReleaseX64 |
| 43 if "%DART_CONFIGURATION%"=="" set DART_CONFIGURATION=ReleaseIA32 | 43 if "%DART_CONFIGURATION%"=="" set DART_CONFIGURATION=ReleaseX64 |
| 44 | 44 |
| 45 set BUILD_DIR=%DART_ROOT%\build\%DART_CONFIGURATION% | 45 set BUILD_DIR=%DART_ROOT%\build\%DART_CONFIGURATION% |
| 46 | 46 |
| 47 set PACKAGE_ROOT=%BUILD_DIR%\packages | 47 set PACKAGE_ROOT=%BUILD_DIR%\packages |
| 48 | 48 |
| 49 "%DART%" %EXTRA_VM_OPTIONS% "--package-root=%PACKAGE_ROOT%" "%DART2JS%" %EXTRA_O
PTIONS% %* | 49 "%DART%" %EXTRA_VM_OPTIONS% "--package-root=%PACKAGE_ROOT%" "%DART2JS%" %EXTRA_O
PTIONS% %* |
| 50 | 50 |
| 51 endlocal | 51 endlocal |
| 52 | 52 |
| 53 exit /b %errorlevel% | 53 exit /b %errorlevel% |
| 54 | 54 |
| 55 :follow_links | 55 :follow_links |
| 56 setlocal | 56 setlocal |
| 57 for %%i in (%1) do set result=%%~fi | 57 for %%i in (%1) do set result=%%~fi |
| 58 set current= | 58 set current= |
| 59 for /f "usebackq tokens=2 delims=[]" %%i in (`dir /a:l "%~dp1" 2^>nul ^ | 59 for /f "usebackq tokens=2 delims=[]" %%i in (`dir /a:l "%~dp1" 2^>nul ^ |
| 60 ^| find "> %~n1 ["`) do ( | 60 ^| find "> %~n1 ["`) do ( |
| 61 set current=%%i | 61 set current=%%i |
| 62 ) | 62 ) |
| 63 if not "%current%"=="" call :follow_links "%current%", result | 63 if not "%current%"=="" call :follow_links "%current%", result |
| 64 endlocal & set %~2=%result% | 64 endlocal & set %~2=%result% |
| 65 goto :eof | 65 goto :eof |
| 66 | 66 |
| 67 :end | 67 :end |
| OLD | NEW |