Update config, web GUI, and add debug features
This commit is contained in:
1 parent
4492b77d67
commit
7eb72bd00e
6 files changed
+140
-9
No files matched your search
+14
-5
@@ -17,8 +17,16 @@ if errorlevel 1 (
|
||||
goto :cleanup
|
||||
)
|
||||
|
||||
REM Change to project root directory (parent of scripts)
|
||||
cd /d "%~dp0.."
|
||||
if errorlevel 1 (
|
||||
echo [ERROR] Cannot change to project root directory
|
||||
pause
|
||||
goto :cleanup
|
||||
)
|
||||
|
||||
REM Save current directory to variable (for delayed expansion)
|
||||
set "WORK_DIR=%~dp0"
|
||||
set "WORK_DIR=%~dp0.."
|
||||
set "WORK_DIR=!WORK_DIR:~0,-1!"
|
||||
|
||||
REM Create log file
|
||||
@@ -50,9 +58,10 @@ echo.
|
||||
|
||||
REM [2/6] Check required files
|
||||
echo [2/6] Checking required files...
|
||||
if not exist "web_gui.py" (
|
||||
if not exist "gui\web_gui.py" (
|
||||
echo [ERROR] web_gui.py not found
|
||||
echo Current directory: !WORK_DIR!
|
||||
echo Expected path: !WORK_DIR!\gui\web_gui.py
|
||||
echo [ERROR] web_gui.py does not exist >> "%LOG_FILE%"
|
||||
pause
|
||||
goto :cleanup
|
||||
@@ -105,13 +114,13 @@ if exist ".venv\Scripts\python.exe" (
|
||||
REM Start service (in new window, keep window open)
|
||||
if !USE_VENV! equ 1 (
|
||||
REM Use virtual environment python.exe directly (use full path)
|
||||
set "PYTHON_CMD=!WORK_DIR!\.venv\Scripts\python.exe web_gui.py"
|
||||
set "PYTHON_CMD=!WORK_DIR!\.venv\Scripts\python.exe gui\web_gui.py"
|
||||
) else if !USE_VENV! equ 2 (
|
||||
REM Use activate.bat
|
||||
set "PYTHON_CMD=call !WORK_DIR!\.venv\Scripts\activate.bat && python web_gui.py"
|
||||
set "PYTHON_CMD=call !WORK_DIR!\.venv\Scripts\activate.bat && python gui\web_gui.py"
|
||||
) else (
|
||||
REM Use system Python
|
||||
set "PYTHON_CMD=python web_gui.py"
|
||||
set "PYTHON_CMD=python gui\web_gui.py"
|
||||
)
|
||||
|
||||
REM Start command with proper quoting
|
||||
|
||||
Reference in new issue
Block a user