feat(launcher): add verified first-run installer
This commit is contained in:
parent
60f627998c
commit
ff6ebb6a6a
28 changed files with 3259 additions and 125 deletions
34
src/AcDream.Bake/BakeProgressReporter.cs
Normal file
34
src/AcDream.Bake/BakeProgressReporter.cs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
namespace AcDream.Bake;
|
||||
|
||||
internal static class BakeProgressReporter
|
||||
{
|
||||
public static void Write(
|
||||
TextWriter humanOutput,
|
||||
IBakeProgressSink? machineOutput,
|
||||
string phase,
|
||||
long completed,
|
||||
int total,
|
||||
int failures,
|
||||
TimeSpan elapsed,
|
||||
double etaSeconds,
|
||||
long privateBytes,
|
||||
long managedBytes)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(humanOutput);
|
||||
humanOutput.WriteLine(
|
||||
$"[{elapsed:hh\\:mm\\:ss}] extracted {completed:N0}/{total:N0}, "
|
||||
+ $"failures={failures:N0}, elapsed={elapsed.TotalSeconds:F0}s, "
|
||||
+ $"ETA={etaSeconds:F0}s, "
|
||||
+ $"private={privateBytes / 1024.0 / 1024.0:F0}MB, "
|
||||
+ $"managed={managedBytes / 1024.0 / 1024.0:F0}MB");
|
||||
machineOutput?.Progress(
|
||||
phase,
|
||||
completed,
|
||||
total,
|
||||
failures,
|
||||
elapsed.TotalSeconds,
|
||||
etaSeconds,
|
||||
privateBytes,
|
||||
managedBytes);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue