1
Offline regression tests / windows (3.11) (push) Canceled after 0s
Offline regression tests / windows (3.12) (push) Canceled after 0s
Offline regression tests / windows (3.13) (push) Canceled after 0s

This commit is contained in:
listik committed 2026-10-23 20:49:12 +03:00
1 parent 2ea1a79bda
commit 85425483c0
50 files changed
+6468 -1854

No files matched your search

+11 -5
View File
@@ -64,15 +64,21 @@ if ((Server-Processes) -and (Answers)) {
Start-Process $Url
exit 0
}
$haveVenv = Test-Path (Join-Path $Dir ".venv\Scripts\pythonw.exe")
$havePy = [bool](Get-Command py -ErrorAction SilentlyContinue)
if (-not $haveVenv -and -not $havePy) {
Write-Host "Python и библиотеки ещё не установлены — устанавливаю..."
$VenvPython = Join-Path $Dir ".venv\Scripts\python.exe"
$haveVenv = $false
if (Test-Path -LiteralPath $VenvPython) {
try {
& $VenvPython -B -c "import sys, websocket, numpy; sys.exit(0 if sys.version_info >= (3, 11) else 1)" 2>$null
$haveVenv = $LASTEXITCODE -eq 0
} catch { $haveVenv = $false }
}
if (-not $haveVenv) {
Write-Host "Окружение отсутствует или повреждено — запускаю восстановление..."
& powershell -NoProfile -ExecutionPolicy Bypass -File (Join-Path $Dir "setup.ps1") /install-only
if ($LASTEXITCODE -ne 0) { exit 1 }
}
Write-Host "Запускаю сервер в фоне (без окон)..."
Start-Process -FilePath "wscript.exe" -ArgumentList "`"$(Join-Path $Dir 'web_sim_autostart.vbs')`"" -WorkingDirectory $Dir
Start-Process -FilePath "wscript.exe" -ArgumentList "`"$(Join-Path $Dir 'web_sim_autostart.vbs')`"" -WorkingDirectory $Dir -WindowStyle Hidden
Set-Watchdog $true
foreach ($i in 1..45) {
if (Answers) {