Add Mimir Aquarium app scaffold
This commit is contained in:
parent
5960c700db
commit
075e8c3ddf
17 changed files with 305 additions and 4 deletions
26
src/Mimir.App/Program.cs
Normal file
26
src/Mimir.App/Program.cs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
using Aquarium.Engine;
|
||||
|
||||
var hostArgs = args.ToList();
|
||||
if (!HasOption(hostArgs, "--client-assembly") && !HasOption(hostArgs, "--live-assembly"))
|
||||
{
|
||||
hostArgs.Add("--client-assembly");
|
||||
hostArgs.Add(ResolveRuntimeAssemblyPath());
|
||||
}
|
||||
|
||||
return AquariumHost.Run(hostArgs.ToArray());
|
||||
|
||||
static bool HasOption(IReadOnlyList<string> args, string option)
|
||||
{
|
||||
return args.Any(arg => string.Equals(arg, option, StringComparison.OrdinalIgnoreCase));
|
||||
}
|
||||
|
||||
static string ResolveRuntimeAssemblyPath()
|
||||
{
|
||||
var configured = Environment.GetEnvironmentVariable("MIMIR_RUNTIME_ASSEMBLY");
|
||||
if (!string.IsNullOrWhiteSpace(configured))
|
||||
{
|
||||
return configured;
|
||||
}
|
||||
|
||||
return Path.Combine(AppContext.BaseDirectory, "Mimir.Runtime.dll");
|
||||
}
|
||||
Loading…
Reference in a new issue