30 lines
641 B
Batchfile
30 lines
641 B
Batchfile
@echo off
|
|
setlocal enabledelayedexpansion
|
|
|
|
echo === Starting CSG QR Label Printer Server ===
|
|
|
|
REM Activate virtual environment if present
|
|
if exist .venv\Scripts\activate.bat (
|
|
call .venv\Scripts\activate.bat
|
|
) else if exist venv\Scripts\activate.bat (
|
|
call venv\Scripts\activate.bat
|
|
)
|
|
|
|
REM Determine Python command
|
|
set PYTHON_CMD=python
|
|
where %PYTHON_CMD% >nul 2>nul
|
|
if errorlevel 1 (
|
|
set PYTHON_CMD=py
|
|
)
|
|
|
|
echo Starting server in background...
|
|
start /min "CSG QR Printer" !PYTHON_CMD! run_picker.py
|
|
|
|
echo Waiting for server to initialize...
|
|
timeout /t 2 >nul
|
|
|
|
echo Opening browser...
|
|
start http://localhost:5001/picker
|
|
|
|
endlocal
|