Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit de4957b

Browse files
committed
[et] Adds a .bat entrypoint for Windows
1 parent f636f96 commit de4957b

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed

bin/et.bat

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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!

tools/engine_tool/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ There are currently many missing features. Some overall goals are listed in the
2323
GitHub issue [here](https://github.com/flutter/flutter/issues/132807). Some
2424
desirable new features would do the following:
2525

26-
* Support Windows hosts.
2726
* Add a `doctor` command.
2827
* Update the engine checkout so that engine developers no longer have to remeber
2928
to run `gclient sync -D`.

0 commit comments

Comments
 (0)