flutter build gives you a build folder. fpack gives you the files you ship: a signed APK and AAB, an IPA, a notarized DMG, a Windows installer,
.deb / .rpm / AppImage / Snap packages and a web zip, each named consistently, checksummed and collected in one
dist/ folder.
dart pub global activate fpack
cd my_app
fpack doctor # what can this machine build? what is missing, and how do I install it?
fpack build apk aab # → dist/1.0.0+1/my_app-1.0.0+1-android-universal.apk, … .aab
fpack build --all # everything this machine can build; the rest is skipped with a reason
Start here#
New to fpack? Read these four pages in order. About twenty minutes, and you end with a real artifact.
- 1 · How fpack works targets, the build pipeline, where files go, what fpack never touches
-
2 · Install one command, and what to do when
fpackis not found -
3 · Your first build
doctor, a dry run, a real build, reading the result - 4 · Pick your platform a complete walk-through for each platform
Platform tutorials#
Each tutorial goes from prerequisites to a signed, verified file you can publish.
- Android keystore, signed APK / AAB, per-ABI splits, Google Play
- iOS team, export methods, ad hoc, unsigned, App Store Connect
- macOS zip / DMG / pkg, Developer ID signing, notarization
- Windows portable zip, Inno Setup installer, MSIX, code signing
- Linux tar.gz, deb, rpm, AppImage, Snap (also in LXD / Multipass)
- Web a deployable zip, base href, WebAssembly
Configure it for your project#
fpack works with no configuration. When you need more, the guides are organised by what you want to do:
- Names, versions and output app metadata, version overrides, file names, checksums
-
Flavors, entry points and defines
--flavor,-t,--dart-define, obfuscation - Secrets and variables keep passwords out of files; precedence of flags, variables and file
- Hooks run your scripts before and after a build or package
-
Many targets, one command
--all, dry runs, JSON, monorepos
Look something up#
- Commands every command and option
- fpack.yaml reference every key, with type, default and example
-
Environment variables every
FPACK_*variable - Targets names, aliases, artifacts, required tools
- Exit codes and JSON for scripts and CI
- JSON Schema editor completion for
fpack.yaml - CI recipes GitHub Actions for every platform
- Troubleshooting by symptom
Why fpack#
-
Zero configuration. It reads
pubspec.yaml, Gradle and the Xcode projects.fpack.yamlis optional. -
It never edits your project. Signing data is injected through environment variables and temporary files; artifacts go to
dist/, scratch files tobuild/fpack/. -
Safe to try.
fpack doctortells you what is missing and how to install it;--dry-runprints every command it would run. - Signing and notarization included. Android keystores (v1–v4), iOS export options, macOS Developer ID with resumable notarization, Windows Authenticode (pfx, certificate store, Azure Trusted Signing).
-
Everything is configurable. 216 validated
fpack.yamlkeys, a JSON Schema for editor completion,${VAR}interpolation and dedicatedFPACK_*variables. -
Built for CI. Stable exit codes,
--jsonresults, secrets redacted from logs, English and Chinese output. - Fast and dependency-free. A native core (about 10 ms startup) behind a thin Dart launcher that downloads the matching, SHA-256 verified binary.
A complete example project with a commented fpack.yaml lives in example/.
flutter build 给你的是一个构建目录,fpack 给你的是可以直接发布的文件:已签名的 APK 和 AAB、IPA、已公证的 DMG、Windows 安装程序、.deb
/ .rpm / AppImage / Snap 包和 Web 压缩包。文件名统一、带校验和,全部收集在一个 dist/ 目录里。
dart pub global activate fpack
cd my_app
fpack doctor # 这台机器能构建什么?缺什么、怎么装?
fpack build apk aab # → dist/1.0.0+1/my_app-1.0.0+1-android-universal.apk、… .aab
fpack build --all # 构建这台机器能构建的全部目标,其余的会注明原因并跳过
从这里开始#
第一次使用 fpack?按顺序读下面四页,大约二十分钟,最后你会得到一个真实的产物。
- 1 · fpack 如何工作 目标、构建流程、文件放在哪里、fpack 绝不会动什么
- 2 · 安装 一条命令,以及找不到
fpack时怎么办 - 3 · 第一次构建
doctor、预演、真正构建、看懂结果 - 4 · 选择你的平台 每个平台一份完整教程
平台教程#
每份教程都从前置条件一路走到可以发布、并且验证过的已签名文件。
为你的项目配置#
fpack 不配置也能用。需要更多控制时,指南按“你想做什么”来组织:
- 名称、版本与输出 应用元数据、版本覆盖、文件名、校验和
-
Flavor、入口与编译变量
--flavor、-t、--dart-define、混淆 - 密钥与环境变量 让密码不进文件;参数、变量、配置文件的优先级
- 钩子 在构建或打包前后运行你自己的脚本
- 多目标一条命令
--all、预演、JSON、monorepo
查阅#
- 命令 每个命令和选项
- fpack.yaml 参考 每个键的类型、默认值和示例
- 环境变量 每个
FPACK_*变量 - 目标与产物 名称、别名、产物、所需工具
- 退出码与 JSON 输出 给脚本和 CI 用
- JSON Schema 编辑器里
fpack.yaml的补全 - CI 示例 各平台的 GitHub Actions
- 故障排查 按症状查找
为什么选择 fpack#
- 零配置。 读取
pubspec.yaml、Gradle 和 Xcode 工程,fpack.yaml可选。 -
绝不修改你的项目。 签名信息通过环境变量和临时文件注入;产物放进
dist/,临时文件放进build/fpack/。 - 可以放心试。
fpack doctor告诉你缺什么、怎么装;--dry-run打印它将运行的每一条命令。 - 内置签名与公证。 Android 密钥库(v1–v4)、iOS 导出选项、macOS Developer ID 与可恢复的公证、Windows Authenticode(pfx、证书库、Azure Trusted Signing)。
-
一切皆可配置。 216 个经过校验的
fpack.yaml键、用于编辑器补全的 JSON Schema、${VAR}插值和专用的FPACK_*变量。 - 为 CI 而生。 稳定的退出码、
--json结果、日志中的密钥脱敏、中英文输出。 - 快且无依赖。 原生核心(启动约 10 毫秒)加一个轻量的 Dart 启动器,后者会下载版本匹配、经 SHA-256 校验的二进制。
完整的示例项目和带注释的 fpack.yaml 在 example/。