setup_windows.md

July 9, 2026 ยท View on GitHub

Setup on Windows

Prerequisites

Anthem is developed with the Flutter framework. You can see instructions for installing Flutter for Windows here.

In addition to Flutter, Anthem needs the following:

  • The MSVC C++ compiler: Already required by Flutter for Windows development.
  • CMake: Required to build the C++ components of Anthem. Download and install CMake from here.
  • LLVM 22: Required for clang-format, clang-tidy, and the Windows clang engine workflow. Formatting can differ between LLVM major versions, so use LLVM 22 to match CI. You can install it from llvm.org, or with Chocolatey:
    choco install llvm --version=22.1.0 -y
    
  • Ninja: Required by the Windows clang engine workflow used by dart run anthem:cli engine lint. You can install it from ninja-build.org, or with Chocolatey:
    choco install ninja -y
    
  • MSYS2 with the Clang toolchain: Required by dart run anthem:cli engine build-lame. Install MSYS2 from msys2.org, then install the x64 toolchain from an MSYS2 shell:
    pacman -S --needed base-devel mingw-w64-clang-x86_64-toolchain
    
    On Windows ARM64, use mingw-w64-clang-aarch64-toolchain instead.

If LLVM is installed but its bin directory is not on PATH, you can set ANTHEM_LLVM_BIN to that directory before running the Anthem CLI. If MSYS2 is installed somewhere other than C:\msys64, set ANTHEM_MSYS2_BASH to the full path of bash.exe.

Instructions

  1. Clone this repository.
  2. Navigate to the local clone folder.
  3. Run git submodule init and git submodule update.
  4. Run flutter pub get in the repository root.
  5. Run dart run anthem:cli codegen generate to create or update generated code.
  6. Run dart run anthem:cli engine build --debug. This will build the engine executable.
  7. Use the following commands to format and lint engine C++ code:
    • dart run anthem:cli engine format
    • dart run anthem:cli engine lint
  8. (Optional) Open the project in your preferred IDE, such as Visual Studio Code.
  9. To keep the generated code updated with the source, you have two options:
    1. Open a new terminal session and run dart run anthem:cli codegen generate --root-only --watch. This will run Dart-related code generation, and keep the generated files up-to-date as you develop.
    2. Run dart run anthem:cli codegen generate --root-only manually after modifying the model or the IPC messages. This method is a bit more surgical during update, and as a result, C++ build times may be faster when updating generated code with this method.
    • Note: you may need to clean and re-run code generation in order to re-generate the files for the IPC messages if they are changed, since they sometimes don't re-generate automatically. There is a note that prints when running the codegen command above which has more info about this.
  10. Use flutter run to run Anthem, or start Anthem via your IDE.