Enhance autostart setup with a one-command installer and improve script logic for KVM switch launch
This commit is contained in:
+21
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user