From aa033fda282c4fee85acc15c05b2276dff255965 Mon Sep 17 00:00:00 2001 From: Mogzol Date: Fri, 11 Mar 2016 19:13:16 -0800 Subject: [PATCH] Add 'Finalizing...' text at end of build Builds would hang on 99% for a long time depending on your drive speed, now the text will switch to 'Finalizing...', so it doesn't seem like the build is frozen. --- BrawlBuilder/BrawlBuilder.WorkerCode.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/BrawlBuilder/BrawlBuilder.WorkerCode.cs b/BrawlBuilder/BrawlBuilder.WorkerCode.cs index 28ef0f6..7dd5f3b 100644 --- a/BrawlBuilder/BrawlBuilder.WorkerCode.cs +++ b/BrawlBuilder/BrawlBuilder.WorkerCode.cs @@ -730,13 +730,13 @@ namespace BrawlBuilder pStartInfo.Arguments = "copy ssbb.d \"" + _saveFileName + "\" -ovv" + (splitOutput ? "z" : "") + (customID.Checked ? " --id=" + gameID.Text : "") + (cutomTitle.Checked ? " --name \"" + gameTitle.Text + "\"" : ""); - if (!DoWit(pStartInfo)) + if (!DoWit(pStartInfo, false, true)) return false; return true; } - private bool DoWit(ProcessStartInfo pStartInfo, bool forceNoProgress = false) + private bool DoWit(ProcessStartInfo pStartInfo, bool forceNoProgress = false, bool finalize = false) { // Determine if we want wit to be hidden or not if (!_showWit && !forceNoProgress) @@ -779,6 +779,17 @@ namespace BrawlBuilder if (m.Groups.Count > 1) _progress = int.Parse(m.Groups[1].Value); + // During build 99% can stay up for a loooong time depending on drive speed, so switch status to Finalizing... + if (_progress >= 99 && finalize) + { + blinker.CancelAsync(); + while (blinker.IsBusy) + Thread.Sleep(100); + + SetStatus("Finalizing..."); + finalize = false; // No need to keep setting it, once is enough + } + if (buildWorker.CancellationPending) { // Stop blinker