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.
This commit is contained in:
Mogzol 2016-03-11 19:13:16 -08:00
parent f4179e4f0a
commit aa033fda28

View File

@ -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 + "\"" : ""); 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 false;
return true; 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 // Determine if we want wit to be hidden or not
if (!_showWit && !forceNoProgress) if (!_showWit && !forceNoProgress)
@ -779,6 +779,17 @@ namespace BrawlBuilder
if (m.Groups.Count > 1) if (m.Groups.Count > 1)
_progress = int.Parse(m.Groups[1].Value); _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) if (buildWorker.CancellationPending)
{ {
// Stop blinker // Stop blinker