mirror of
https://github.com/Yuyi-Oak/BlueArchiveToolkit.git
synced 2026-07-22 06:28:00 +08:00
3.1 KiB
3.1 KiB
官方资源拉取用户指南
本文档描述当前可用的官方日服资源拉取流程。
默认平台:
WindowsAndroid
不包含:
iOSmacOSbluearchive.cafe或其他镜像域名- 任何本地客户端目录
1. 当前流程
运行时链路只走官方日服:
- 请求官方 launcher API。
- 从官方 launcher manifest 链路得到最新游戏包 ZIP。
- 解包
resources.assets。 - 解密
GameMainConfig。 - 从
GameMainConfig自动读取server-infoURL 和默认connection-group。 - 请求官方
server-info。 - 生成 Windows + Android 的官方资源 discovery 端点。
- 拉取 seed catalog,生成完整官方 pull plan。
- dry-run 只输出 URL;非 dry-run 下载全部官方 URL。
--server-info-file 和 --server-info-path 都不是硬依赖。
2. 先做 launcher bootstrap
先确认 launcher API 和官方 ZIP 链路正常:
cargo run -p bat-infrastructure --example official_launcher_bootstrap -- \
--launcher-version 1.7.2 \
--manifest
这一步会输出:
game_latest_versiongame_latest_file_pathprimary_cdnbackup_cdnmanifest_urlmanifest_sourcemanifest_file_count
所有 URL 都应来自官方域名。
3. 先做 dry-run
推荐默认流程是不提供本地 server-info 文件,也不提供本地客户端目录:
cargo run -p bat-infrastructure --example official_pull_plan -- \
--launcher-bootstrap \
--platforms Windows,Android \
--output /tmp/ba-official-pull \
--dry-run
如果你已经有官方 server-info 文件,也可以显式传入:
cargo run -p bat-infrastructure --example official_pull_plan -- \
--server-info-file r93_70_xxxxxxxxxxxxxxxxxxxx.json \
--connection-group Prod-Audit \
--app-version 1.70.0 \
--platforms Windows,Android \
--output /tmp/ba-official-pull \
--dry-run
检查输出时,重点看:
platforms=[Windows, Android]discovery_url_count大于 0content_url_count大于 0- 不出现
bluearchive.cafe
4. 执行真实拉取
确认 dry-run 正常后,去掉 --dry-run:
cargo run -p bat-infrastructure --example official_pull_plan -- \
--launcher-bootstrap \
--platforms Windows,Android \
--output /tmp/ba-official-pull
程序会:
- 只接受官方 URL
- 下载完整官方资源集合
- 把结果写入
--output
5. 例外输入
如果必须使用本地 server-info,只接受:
--server-info-file <官方文件名>--server-info-path <本地官方 JSON>
但这两项不再是主流程依赖。
6. 代码入口
当前可用的用户入口:
infrastructure/examples/official_launcher_bootstrap.rsinfrastructure/examples/official_pull_plan.rsadapters/examples/yostar_jp_client_bootstrap.rsadapters/examples/yostar_jp_discovery.rsadapters/examples/yostar_jp_inventory.rs
7. 验证
推荐验证命令:
cargo test -p bat-adapters
cargo test -p bat-infrastructure
cargo test -p bat-infrastructure --example official_launcher_bootstrap -- --nocapture
cargo test -p bat-infrastructure --example official_pull_plan -- --nocapture