diff --git a/Windows/CS/Framework4.0/Updater/build.bat b/Windows/CS/Framework4.0/Updater/build.bat new file mode 100644 index 0000000..de8cad7 --- /dev/null +++ b/Windows/CS/Framework4.0/Updater/build.bat @@ -0,0 +1,2 @@ +set RUSTFLAGS=-C target-feature=+crt-static +cargo build --release \ No newline at end of file diff --git a/Windows/CS/Framework4.0/Updater/build.rs b/Windows/CS/Framework4.0/Updater/build.rs index 5fe9398..5e76e01 100644 --- a/Windows/CS/Framework4.0/Updater/build.rs +++ b/Windows/CS/Framework4.0/Updater/build.rs @@ -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(); } \ No newline at end of file diff --git a/Windows/CS/Framework4.0/Updater/src/main.rs b/Windows/CS/Framework4.0/Updater/src/main.rs index a1d23ab..fe6b655 100644 --- a/Windows/CS/Framework4.0/Updater/src/main.rs +++ b/Windows/CS/Framework4.0/Updater/src/main.rs @@ -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);