Add reliable built-in demo mode

This commit is contained in:
2026-08-26 11:44:14 +02:00
parent e14462f41c
commit b8e299e95f
7 changed files with 1045 additions and 76 deletions
+20
View File
@@ -0,0 +1,20 @@
$ErrorActionPreference = "Stop"
$projectRoot = Split-Path -Parent $MyInvocation.MyCommand.Path
Set-Location -LiteralPath $projectRoot
$existingListener = Get-NetTCPConnection -LocalPort 5760 -State Listen -ErrorAction SilentlyContinue | Select-Object -First 1
if ($existingListener) {
$existingProcess = Get-CimInstance Win32_Process -Filter "ProcessId=$($existingListener.OwningProcess)" -ErrorAction SilentlyContinue
Write-Host ""
Write-Host "The simulator is already LISTENING on tcp:127.0.0.1:5760." -ForegroundColor Green
Write-Host "Process: $($existingListener.OwningProcess) $($existingProcess.Name)"
Write-Host "Leave that simulator running and select 'Simulator (TCP 5760)' in SUB Control."
Write-Host ""
exit 0
}
if (Test-Path -LiteralPath ".venv\Scripts\python.exe") {
& .venv\Scripts\python.exe -u fc_spoofer.py @args
} else {
& python -u fc_spoofer.py @args
}