|
| 1 | +@ECHO off |
| 2 | +REM Copyright 2013 The Flutter Authors. All rights reserved. |
| 3 | +REM Use of this source code is governed by a BSD-style license that can be |
| 4 | +REM found in the LICENSE file. |
| 5 | + |
| 6 | +REM ---------------------------------- NOTE ---------------------------------- |
| 7 | +REM |
| 8 | +REM Please keep the logic in this file consistent with the logic in the |
| 9 | +REM `et` script in the same directory to ensure that it continues to |
| 10 | +REM work across all platforms! |
| 11 | +REM |
| 12 | +REM -------------------------------------------------------------------------- |
| 13 | + |
| 14 | +SETLOCAL ENABLEDELAYEDEXPANSION |
| 15 | + |
| 16 | +FOR %%i IN ("%~dp0..\..") DO SET SRC_DIR=%%~fi |
| 17 | + |
| 18 | +REM Test if Git is available on the Host |
| 19 | +where /q git || ECHO Error: Unable to find git in your PATH. && EXIT /B 1 |
| 20 | + |
| 21 | +SET repo_dir=%SRC_DIR%\flutter |
| 22 | +SET engine_tool_dir=%repo_dir%\tools\engine_tool |
| 23 | + |
| 24 | +REM Determine which platform we are on and use the right prebuilt Dart SDK |
| 25 | +IF "%PROCESSOR_ARCHITECTURE%"=="AMD64" ( |
| 26 | + SET dart_sdk_path=%SRC_DIR%\flutter\prebuilts\windows-x64\dart-sdk |
| 27 | +) ELSE IF "%PROCESSOR_ARCHITECTURE%"=="ARM64" ( |
| 28 | + SET dart_sdk_path=%SRC_DIR%\flutter\prebuilts\windows-arm64\dart-sdk |
| 29 | +) ELSE ( |
| 30 | + ECHO "Windows x86 (32-bit) is not supported" && EXIT /B 1 |
| 31 | +) |
| 32 | + |
| 33 | +SET dart=%dart_sdk_path%\bin\dart.exe |
| 34 | + |
| 35 | +cd "%engine_tool_dir%" |
| 36 | + |
| 37 | +REM Do not use the CALL command in the next line to execute Dart. CALL causes |
| 38 | +REM Windows to re-read the line from disk after the CALL command has finished |
| 39 | +REM regardless of the ampersand chain. |
| 40 | +"%dart%" --disable-dart-dev bin\et.dart %* & exit /B !ERRORLEVEL! |
0 commit comments