auto_agent/edge-agent/scripts/start-windows.ps1
2521690 591df2d18e feat: 增强 edge-agent 服务控制与便携打包能力
- 将 Windows/Linux service control 执行器从占位实现推进到可用
- 新增 service control 测试,覆盖 status/start/stop/restart 主路径
- 增强 edge-agent 启动脚本,优先使用包内私有 Python 运行时
- 增强 Windows/Linux 打包脚本,支持携带私有 Python 运行时
- 更新 edge-agent README 与当前进度总结
- 新增 dist 忽略规则,避免打包产物污染仓库
2026-04-09 11:26:42 +08:00

19 lines
457 B
PowerShell

$ErrorActionPreference = "Stop"
$root = Split-Path -Parent $PSScriptRoot
$runtimePython = Join-Path $root "runtime\python\python.exe"
$venvPython = Join-Path $root ".venv\Scripts\python.exe"
if (Test-Path $runtimePython) {
$python = $runtimePython
}
elseif (Test-Path $venvPython) {
$python = $venvPython
}
else {
throw "Python runtime not found. Checked: $runtimePython and $venvPython"
}
$env:PYTHONPATH = $root
& $python -m app.main @args