修改下载完成的条件,如果还有文件在下载不视为完成
This commit is contained in:
2
Windows/CS/Framework4.0/Updater/build.bat
Normal file
2
Windows/CS/Framework4.0/Updater/build.bat
Normal file
@@ -0,0 +1,2 @@
|
||||
set RUSTFLAGS=-C target-feature=+crt-static
|
||||
cargo build --release
|
||||
@@ -2,7 +2,7 @@ extern crate winres;
|
||||
|
||||
fn main() {
|
||||
let mut res = winres::WindowsResource::new();
|
||||
res.set("FileVersion", "0.0.0.2");
|
||||
res.set("ProductVersion", "0.0.0.1");
|
||||
res.set("FileVersion", "0.0.0.3");
|
||||
res.set("ProductVersion", "1.0.0.1");
|
||||
res.compile().unwrap();
|
||||
}
|
||||
@@ -1802,7 +1802,7 @@ async fn run_updater(debug_mode: bool) -> bool {
|
||||
// 加载初始 URL
|
||||
let server_url = resolve_ws_url();
|
||||
|
||||
// 扫描候选应用(阶段3使用)
|
||||
// 每次运行都重新扫描候选应用(阶段3使用)
|
||||
let app_candidates = get_app_candidates(debug_mode);
|
||||
|
||||
// 将候选应用保存到 ctx
|
||||
@@ -2363,8 +2363,9 @@ async fn run_updater(debug_mode: bool) -> bool {
|
||||
}
|
||||
}
|
||||
|
||||
// 6. 检查是否所有应用都处理完成(AllFile 收完 且 队列清空)
|
||||
if pending_apps.is_empty() && ctx_clone.download_queue.lock().unwrap().is_empty() {
|
||||
// 6. 检查是否所有应用都处理完成(AllFile 收完 且 队列清空 且 没有正在下载)
|
||||
let is_downloading = *ctx_clone.is_downloading.lock().unwrap();
|
||||
if pending_apps.is_empty() && ctx_clone.download_queue.lock().unwrap().is_empty() && !is_downloading {
|
||||
log_print!("{} [AllFile] 所有应用文件同步完成,进入 Complete 阶段", ts);
|
||||
*ctx_clone.current_phase.lock().unwrap() = UpdatePhase::Complete;
|
||||
update_check_done_clone2.store(true, std::sync::atomic::Ordering::SeqCst);
|
||||
|
||||
Reference in New Issue
Block a user