Wire EVE native program output contract
This commit is contained in:
parent
c5506e2fa7
commit
d7e39fe495
9 changed files with 232 additions and 2 deletions
47
scripts/start-eve-program-output.ps1
Normal file
47
scripts/start-eve-program-output.ps1
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
param(
|
||||
[string] $Target = "eve",
|
||||
[string] $SharedTextureName = "Global\MimirFensalirProgramTexture",
|
||||
[string] $Configuration = "Debug",
|
||||
[string] $LogPath = "logs\eve-program-output-fensalir.log",
|
||||
[string[]] $AppArguments = @()
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$repoRoot = Split-Path -Parent $PSScriptRoot
|
||||
$absoluteLogPath = Join-Path $repoRoot $LogPath
|
||||
$absoluteErrorLogPath = [System.IO.Path]::ChangeExtension($absoluteLogPath, ".err.log")
|
||||
$logDirectory = Split-Path -Parent $absoluteLogPath
|
||||
if (-not (Test-Path $logDirectory)) {
|
||||
New-Item -ItemType Directory -Path $logDirectory | Out-Null
|
||||
}
|
||||
|
||||
Write-Host "Checking EVE SSH target: $Target"
|
||||
ssh $Target "uname -a >/tmp/mimir-eve-program-output-check.txt && cat /tmp/mimir-eve-program-output-check.txt"
|
||||
|
||||
$env:FENSALIR_PROGRAM_OUTPUT_D3D12 = "1"
|
||||
$env:FENSALIR_PROGRAM_OUTPUT_NAME = $SharedTextureName
|
||||
|
||||
$projectPath = Join-Path $repoRoot "src\Mimir.App\Mimir.App.csproj"
|
||||
$dotnetArgs = @(
|
||||
"run",
|
||||
"--project",
|
||||
$projectPath,
|
||||
"-c",
|
||||
$Configuration,
|
||||
"--"
|
||||
) + $AppArguments
|
||||
|
||||
Write-Host "Starting Mimir/Fensalir with shared D3D12 output: $SharedTextureName"
|
||||
Write-Host "Log: $absoluteLogPath"
|
||||
$process = Start-Process -FilePath "dotnet" `
|
||||
-ArgumentList $dotnetArgs `
|
||||
-WorkingDirectory $repoRoot `
|
||||
-RedirectStandardOutput $absoluteLogPath `
|
||||
-RedirectStandardError $absoluteErrorLogPath `
|
||||
-WindowStyle Hidden `
|
||||
-PassThru
|
||||
|
||||
Write-Host "Started PID $($process.Id). Poll with:"
|
||||
Write-Host " Get-Content -Tail 40 '$absoluteLogPath'"
|
||||
Write-Host " Get-Content -Tail 40 '$absoluteErrorLogPath'"
|
||||
Loading…
Reference in a new issue