Add Windows service host and system tray controller
All checks were successful
CI / test (push) Successful in 7s
All checks were successful
CI / test (push) Successful in 7s
This commit is contained in:
@@ -16,7 +16,22 @@ function Test-EnvVarLine {
|
||||
}
|
||||
|
||||
if (-not (Get-Command python -ErrorAction SilentlyContinue)) {
|
||||
throw "Python was not found in PATH. Install Python 3.11+ and retry."
|
||||
$venvPython = Join-Path $scriptDir ".venv\Scripts\python.exe"
|
||||
if (-not (Test-Path -LiteralPath $venvPython)) {
|
||||
throw "Python was not found in PATH and .venv\\Scripts\\python.exe is missing. Install Python 3.11+ or create .venv first."
|
||||
}
|
||||
}
|
||||
|
||||
$pythonExe = $null
|
||||
$venvPython = Join-Path $scriptDir ".venv\Scripts\python.exe"
|
||||
if (Test-Path -LiteralPath $venvPython) {
|
||||
$pythonExe = $venvPython
|
||||
} else {
|
||||
$pythonCmd = Get-Command python -ErrorAction SilentlyContinue
|
||||
if ($null -eq $pythonCmd) {
|
||||
throw "Python was not found in PATH. Install Python 3.11+ or create .venv first."
|
||||
}
|
||||
$pythonExe = $pythonCmd.Source
|
||||
}
|
||||
|
||||
$envFile = Join-Path $scriptDir ".env"
|
||||
@@ -32,4 +47,4 @@ if (-not (Test-Path -LiteralPath $envFile)) {
|
||||
}
|
||||
|
||||
Write-Host "Starting ScreenJob backend on configured host/port..." -ForegroundColor Cyan
|
||||
python main.py server
|
||||
& $pythonExe main.py server
|
||||
|
||||
Reference in New Issue
Block a user