publish start-all.ps1

This commit is contained in:
brockdarnold 2026-06-15 03:48:22 +00:00
parent 5c5dfe0380
commit f0609dbd2d

View file

@ -7,11 +7,22 @@
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
Set-Location $here
if (Get-Command python -ErrorAction SilentlyContinue) {
python -m pip install --quiet -r (Join-Path $here "requirements.txt") 2>$null
} else {
Write-Warning "Python not found - run setup.ps1 first."; exit 1
# Resolve a real Python. Bare 'python'/'pythonw' are NOT on PATH in a scheduled-task
# or SSH-launched context, so don't depend on Get-Command — fall back to known installs.
$pyExe = $null; $pywExe = $null
$cmd = Get-Command python -ErrorAction SilentlyContinue
if ($cmd) { $pyExe = $cmd.Source }
foreach ($c in @(
"$env:LOCALAPPDATA\Programs\Python\Python312\python.exe",
"C:\Program Files\Python312\python.exe",
"C:\Program Files\Python311\python.exe",
"C:\Python312\python.exe")) {
if (-not $pyExe -and (Test-Path $c)) { $pyExe = $c }
}
if (-not $pyExe) { Write-Warning "Python not found - run setup.ps1 first."; exit 1 }
$pywExe = Join-Path (Split-Path $pyExe) "pythonw.exe"
if (-not (Test-Path $pywExe)) { $pywExe = $pyExe }
& $pyExe -m pip install --quiet -r (Join-Path $here "requirements.txt") 2>$null
# Headless intel watchers + the auto-update poller (run continuously, no interaction)
# NOTE: eve_local_watcher disabled — on a multi-monitor desktop its OCR region reads
@ -21,7 +32,7 @@ $watchers = @("eve_combat_watcher.py", "eve_chat_watcher.py", "eve_rock_watcher.
"eve_audio_watcher.py", "eve_orehold_watcher.py", "eve_autoupdate.py")
foreach ($w in $watchers) {
$err = Join-Path $here ("_err_" + $w + ".log")
Start-Process pythonw -ArgumentList "`"$here\$w`"" -WorkingDirectory $here `
Start-Process $pywExe -ArgumentList "`"$here\$w`"" -WorkingDirectory $here `
-WindowStyle Hidden -RedirectStandardError $err
Write-Host "started $w"
}