mirror of
https://github.com/Yuyi-Oak/BlueArchiveToolkit.git
synced 2026-09-18 12:45:17 +08:00
feat(sync): 接入解析缓存与汉化发布前置
补齐官方 release 解析缓存、TextUnit 明细索引、资源变更集、Crowdin handoff 预留、ResourceRepository 导入元数据和 localized release patch 前置链路。 同时开放文件级 patch.apply 与 UnityFS TextAsset/string/semantic field patch CLI/RPC 入口,并保留官方原版资源与汉化产物双目录发布状态。 验证:cargo test -p bat-assetbundle --locked;cargo clippy -p bat-assetbundle --all-targets --locked -- -D warnings;cargo test -p bat-infrastructure --locked。
This commit is contained in:
@@ -115,8 +115,8 @@ pub struct OfficialResourcePullProgress {
|
||||
///
|
||||
/// `Started` events report the currently completed count before the URL
|
||||
/// finishes; `Finished` events report the count after completion. This is
|
||||
/// intentionally not the URL's plan position, because concurrent downloads
|
||||
/// finish out of plan order and status percentages must not move backward.
|
||||
/// intentionally not the URL's plan position, so status percentages stay
|
||||
/// monotonic even if execution order or skip/resume mix changes.
|
||||
pub index: usize,
|
||||
/// Total URL count in the pull plan.
|
||||
pub total: usize,
|
||||
@@ -2272,14 +2272,16 @@ exit 22
|
||||
}
|
||||
|
||||
fn write_shell_script(path: &Path, script: &str) {
|
||||
fs::write(path, script).unwrap();
|
||||
let temp_path = path.with_extension("tmp");
|
||||
fs::write(&temp_path, script).unwrap();
|
||||
#[cfg(unix)]
|
||||
{
|
||||
use std::os::unix::fs::PermissionsExt;
|
||||
let mut permissions = fs::metadata(path).unwrap().permissions();
|
||||
let mut permissions = fs::metadata(&temp_path).unwrap().permissions();
|
||||
permissions.set_mode(0o755);
|
||||
fs::set_permissions(path, permissions).unwrap();
|
||||
fs::set_permissions(&temp_path, permissions).unwrap();
|
||||
}
|
||||
fs::rename(temp_path, path).unwrap();
|
||||
}
|
||||
|
||||
fn write_fake_curl(path: &Path) {
|
||||
|
||||
Reference in New Issue
Block a user