| name | windows-flutter-exe |
| description | 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. |
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
2) Build 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 ./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 ./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