feat(render): implement Campaign AR and terrain fidelity

This commit is contained in:
Erik 2026-08-22 13:13:29 +02:00
parent 99cf26e00c
commit 7a5f96ede5
368 changed files with 50611 additions and 950 deletions

View file

@ -12,6 +12,9 @@ public sealed class LauncherSelfUpdateProcessTests : IDisposable
private const string TargetEnvironment = "ACDREAM_SELF_UPDATE_FIXTURE_TARGET";
private const string HelperPidEnvironment =
"ACDREAM_SELF_UPDATE_FIXTURE_HELPER_PID";
private static readonly System.Runtime.CompilerServices.ConditionalWeakTable<
Process,
ProcessOutputCapture> ProcessOutput = new();
private readonly string _root = Path.Combine(
Path.GetTempPath(),
@ -361,8 +364,8 @@ public sealed class LauncherSelfUpdateProcessTests : IDisposable
], environment);
await helper.WaitForExitAsync().WaitAsync(TimeSpan.FromSeconds(10));
string helperError = await helper.StandardError.ReadToEndAsync();
string helperOutput = await helper.StandardOutput.ReadToEndAsync();
string helperError = await ReadStandardErrorAsync(helper);
string helperOutput = await ReadStandardOutputAsync(helper);
Assert.True(
helper.ExitCode == LauncherSelfUpdateBootstrap.UpdateLeaseBusyExitCode,
$"helper exit {helper.ExitCode}; stdout: {helperOutput}; stderr: {helperError}");
@ -481,7 +484,7 @@ public sealed class LauncherSelfUpdateProcessTests : IDisposable
{
using Process process = StartProcess(canonicalPath, arguments, environment);
await process.WaitForExitAsync().WaitAsync(TimeSpan.FromSeconds(10));
string stderr = await process.StandardError.ReadToEndAsync();
string stderr = await ReadStandardErrorAsync(process);
if (exactExit.HasValue)
{
Assert.True(
@ -699,10 +702,26 @@ public sealed class LauncherSelfUpdateProcessTests : IDisposable
}
}
return Process.Start(start)
Process process = Process.Start(start)
?? throw new InvalidOperationException($"Could not start '{executable}'.");
ProcessOutput.Add(
process,
new ProcessOutputCapture(
process.StandardOutput.ReadToEndAsync(),
process.StandardError.ReadToEndAsync()));
return process;
}
private static Task<string> ReadStandardOutputAsync(Process process) =>
ProcessOutput.TryGetValue(process, out ProcessOutputCapture? capture)
? capture.StandardOutput
: process.StandardOutput.ReadToEndAsync();
private static Task<string> ReadStandardErrorAsync(Process process) =>
ProcessOutput.TryGetValue(process, out ProcessOutputCapture? capture)
? capture.StandardError
: process.StandardError.ReadToEndAsync();
private static async Task WaitForFileAsync(
string path,
Process? process,
@ -726,9 +745,9 @@ public sealed class LauncherSelfUpdateProcessTests : IDisposable
{
throw new InvalidOperationException(
$"{failure} Process exited {process.ExitCode}. stdout: "
+ await process.StandardOutput.ReadToEndAsync()
+ await ReadStandardOutputAsync(process)
+ " stderr: "
+ await process.StandardError.ReadToEndAsync());
+ await ReadStandardErrorAsync(process));
}
if (DateTimeOffset.UtcNow >= deadline)
@ -766,6 +785,10 @@ public sealed class LauncherSelfUpdateProcessTests : IDisposable
private static string GetFixtureDllPath() =>
Path.Combine(GetFixtureDirectory(), FixtureBaseName + ".dll");
private sealed record ProcessOutputCapture(
Task<string> StandardOutput,
Task<string> StandardError);
private static string GetFixtureDirectory()
{
string configuration = new DirectoryInfo(AppContext.BaseDirectory)