Enhance autostart setup with a one-command installer and improve script logic for KVM switch launch

This commit is contained in:
Lago
2026-03-27 16:32:06 +01:00
parent dc3b67d00a
commit 4721e386a0
4 changed files with 71 additions and 17 deletions
+21 -1
View File
@@ -1,3 +1,23 @@
@echo off
setlocal
cd /d "%~dp0"
uv run kvm-switch
where uv >nul 2>&1
if %errorlevel%==0 (
uv run kvm-switch
exit /b %errorlevel%
)
if exist ".venv\Scripts\kvm-switch.exe" (
call ".venv\Scripts\kvm-switch.exe"
exit /b %errorlevel%
)
if exist ".venv\Scripts\python.exe" (
call ".venv\Scripts\python.exe" -m main
exit /b %errorlevel%
)
echo [ERROR] Could not start KVM Switch.
echo [ERROR] Neither "uv" nor ".venv" runtime was found.
exit /b 1