feat(update): 应用内更新(检查/下载/安装)与发版流程;版本 1.2.0

- 工具栏新增检查更新按钮:启动静默检查,发现新版本时显示红色角标;
  未检测到新版本或安装包时弹窗提示「当前已是最新版本」
- 更新源:Gitea Releases(说明 = Release 正文 Markdown;安装包 = 附件,
  不进入 git 历史,仓库保持精简)
- 安卓:下载 APK → FileProvider + 系统安装器直接覆盖安装(签名一致)
- Windows:下载绿色版 zip → 解压 → 生成替换脚本,主程序退出后原地覆盖并自动重启
- 新增 lib/update/update_service.dart、lib/ui/update_dialog.dart、lib/version.dart
- 安卓侧:REQUEST_INSTALL_PACKAGES + FileProvider + installApk/getCacheDir 通道 + androidx.core
- 发版工具:scripts/publish_release.ps1(打包 dist、创建 Release、上传附件)
- 测试:test/update_version_test.dart(版本比较 4 组);启动检查在测试环境自动跳过
- 版本号 1.2.0+12;BUILD-NOTES 补充应用内更新与发版流程
This commit is contained in:
2026-10-08 21:08:18 +08:00
parent 91c6132ef9
commit 0ce50d4b8d
15 changed files with 814 additions and 7 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.1.0+11
version: 1.2.0+12
environment:
sdk: ^3.13.3