Writing this thing because its a pain setting up the repo + the docs are outdated.
- Make sure that you don’t have any flutter executable in your PATH.
Install python3
gitdepot_toolsVisual Studio 2017Windows 10 SDK` (required for non-Googlers only). Make sure to install the “Debugging Tools for Windows” feature.git clone https://github.com/flutter/flutter.git
cd fluttergit remote rename origin upstreamFork flutter and change the origin to your fork:
git remote add origin git@github.com:\<your fork\>/flutter.gitAdd flutter/bin to PATH.
- make sure flutter is in your PATH
where.exe flutteryou'd might need to restart your terminal
Setting up the engine development environment
- Add these to your env vars:
DEPOT_TOOLS_WIN_TOOLCHAIN=0-
GYP_MSVS_OVERRIDE_PATH=C:\Program Files\Microsoft Visual Studio\2022\Community(make sure the path is correct)
- cd flutter/engine
- cp
.\scripts\standard.gclient../.gclientcopy to root folder (before engine) -
cd ../and rungclient sync - Flutter has a tool for building the engine called
et. Add it to PATH:C:\Users\temp\Desktop\flutter\engine\src\flutter\bin - cd into
flutter/engineand runet buildto build the engine. (make sureetis in your PATH) - Go make some ☕️ 🕐
- In the mean time, you can configure your VS Code C++ LSP. I suggest that you first disable Dart and Flutter extensions in order to avoid them running commands you don’t want.
- What should be done is:
- Open Code in
flutter/engineand make sure you have thems-vscode.cpptoolsextension installed. - Configure VS Code to use
compile_commands.json, which should be inC:\Users\temp\Desktop\flutter\engine\src\out\host_debug.
- Open Code in
- After several years et build should finish successfully, if not, don't start making changes you'd regret that later.
- Implement your patches and create a PR on Flutter. Remember that Flutter's team requires signed commits… ___ ### Running Flutter projects with your custom engine
as per flutter docs on GH you should use et run inside your project (as if it was flutter run ) although for some reason it didn't worked for me, so I instead ran the et tool directly like so
ps
dart C:\Users\temp\Desktop\flutter\engine\src\flutter\tools\engine_tool\bin\et.dart run



Top comments (0)