# Windows Flutter Exe

> Build, verify, and package Flutter desktop apps for Windows into a distributable executable bundle (EXE plus required DLL/data dependencies, optional installer-ready artifacts). Use when a user asks to generate a Windows Flutter executable, ship a Windows desktop release, include runtime dependencies, or troubleshoot missing DLL/runtime issues in Windows Flutter distribution.

- Skill: `boltzmannentropy/windows-flutter-exe` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add boltzmannentropy/windows-flutter-exe`
- Raw SKILL.md: https://api.skillmd.com/api/skills/boltzmannentropy/windows-flutter-exe/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: BoltzmannEntropy (https://skillmd.com/u/boltzmannentropy)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/boltzmannentropy/windows-flutter-exe

---


# Windows Flutter Executable Packaging

## Overview

Produce a Windows Flutter release bundle that runs on end-user machines by packaging the complete `build/windows/x64/runner/Release` output instead of only the `.exe`.
Use this workflow to avoid broken deliveries caused by missing plugin DLLs, `flutter_windows.dll`, or `data/` assets.

## Required Inputs

- App root containing `pubspec.yaml`
- Windows build host (or CI runner) with Flutter + Visual Studio C++ desktop workload
- Target architecture (default: `x64`)
- Output directory for shipping artifacts

## Workflow

### 1) Preflight

- Confirm Windows target is enabled:
  ```bash
  flutter config --enable-windows-desktop
  ```
- Confirm toolchain:
  ```bash
  flutter doctor -v
  ```
- Ensure `flutter doctor` shows no blocking Windows desktop issues.

### 2) Build Release

- From app root:
  ```bash
  flutter pub get
  flutter build windows --release
  ```
- Release output location:
  `build/windows/x64/runner/Release`

### 3) Bundle All Runtime Dependencies

Package the full `Release` folder, not only `<app>.exe`.
Required runtime surfaces:
- `<app>.exe`
- `flutter_windows.dll`
- `data/` directory
- Plugin/native DLLs generated by Flutter plugins

### 4) Create a Distributable Archive

Run the bundled helper:

```bash
bash ./skills/windows-flutter-exe/scripts/build_windows_flutter_bundle.sh \
  --app-root <APP_ROOT> \
  --out-dir <OUTPUT_DIR>
```

This script can:
- Build Windows release
- Validate required runtime files
- Copy full Release payload into a versioned bundle directory
- Generate SHA256 manifest
- Produce a `.zip` artifact

### 5) Optional VC++ Redistributable Inclusion

If your distribution policy requires bundling the VC++ runtime installer, provide it to the script:

```bash
bash ./skills/windows-flutter-exe/scripts/build_windows_flutter_bundle.sh \
  --app-root <APP_ROOT> \
  --out-dir <OUTPUT_DIR> \
  --vc-redist-path <PATH_TO_VC_REDIST_X64_EXE>
```

### 6) Clean-Machine Validation (Release Gate)

- Test the packaged bundle on a clean Windows machine/VM.
- Confirm app launch without missing DLL errors.
- Confirm plugin features that depend on native libraries.

## Troubleshooting

- `Missing flutter_windows.dll`:
  package entire `Release` directory, not exe-only.
- `MSVCP140.dll` or `VCRUNTIME140.dll` errors:
  install or ship Microsoft Visual C++ Redistributable (x64).
- App runs locally but not on user machine:
  validate on clean VM and compare bundle contents with CI artifact.
- Plugin feature fails in release only:
  verify plugin DLLs are present in packaged bundle.

## Deliverables Checklist

- [ ] `windows-x64/` folder containing exe + all dependencies
- [ ] `windows-x64.zip` archive
- [ ] `SHA256SUMS.txt`
- [ ] Optional `vc_redist.x64.exe` inside bundle (if policy requires)

