Compare commits
1 Commits
v0.1.0-alp
...
v0.1.0-alp
| Author | SHA1 | Date | |
|---|---|---|---|
| 564e4c9c9c |
@@ -243,22 +243,11 @@ cd /d "%~dp0"
|
||||
set PYTHONPATH=%~dp0app\src
|
||||
set WLED_CONFIG_PATH=%~dp0app\config\default_config.yaml
|
||||
|
||||
:: Read port from env var or use default
|
||||
if "%WLED_SERVER__PORT%"=="" set WLED_SERVER__PORT=8080
|
||||
|
||||
:: Create data directory if missing
|
||||
if not exist "%~dp0data" mkdir "%~dp0data"
|
||||
if not exist "%~dp0logs" mkdir "%~dp0logs"
|
||||
|
||||
echo.
|
||||
echo =============================================
|
||||
echo LedGrab v${VERSION_CLEAN}
|
||||
echo Open http://localhost:%WLED_SERVER__PORT% in your browser
|
||||
echo =============================================
|
||||
echo.
|
||||
|
||||
:: Start the server — uses config from WLED_CONFIG_PATH, port from config or env
|
||||
start "" /b cmd /c "timeout /t 2 /nobreak >nul && start http://localhost:%WLED_SERVER__PORT%"
|
||||
:: Start the server — reads port from config, prints its own banner
|
||||
"%~dp0python\python.exe" -m wled_controller.main
|
||||
|
||||
pause
|
||||
|
||||
@@ -101,18 +101,8 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
export PYTHONPATH="$SCRIPT_DIR/app/src"
|
||||
export WLED_CONFIG_PATH="$SCRIPT_DIR/app/config/default_config.yaml"
|
||||
|
||||
# Read port from env var or use default
|
||||
PORT="${WLED_SERVER__PORT:-8080}"
|
||||
|
||||
mkdir -p "$SCRIPT_DIR/data" "$SCRIPT_DIR/logs"
|
||||
|
||||
echo ""
|
||||
echo " ============================================="
|
||||
echo " LedGrab vVERSION_PLACEHOLDER"
|
||||
echo " Open http://localhost:$PORT in your browser"
|
||||
echo " ============================================="
|
||||
echo ""
|
||||
|
||||
source "$SCRIPT_DIR/venv/bin/activate"
|
||||
exec python -m wled_controller.main
|
||||
LAUNCHER
|
||||
|
||||
@@ -278,7 +278,12 @@ class OverlayManager:
|
||||
|
||||
def _start_tk_thread(self) -> None:
|
||||
def _run():
|
||||
import tkinter as tk # lazy import — tkinter unavailable in headless CI
|
||||
try:
|
||||
import tkinter as tk # lazy import — tkinter unavailable in embedded Python / headless CI
|
||||
except ImportError:
|
||||
logger.warning("tkinter not available — screen overlay disabled")
|
||||
self._tk_ready.set()
|
||||
return
|
||||
|
||||
try:
|
||||
self._tk_root = tk.Tk()
|
||||
|
||||
@@ -98,6 +98,10 @@ async def lifespan(app: FastAPI):
|
||||
logger.info(f"Starting LED Grab v{__version__}")
|
||||
logger.info(f"Python version: {sys.version}")
|
||||
logger.info(f"Server listening on {config.server.host}:{config.server.port}")
|
||||
print(f"\n =============================================")
|
||||
print(f" LED Grab v{__version__}")
|
||||
print(f" Open http://localhost:{config.server.port} in your browser")
|
||||
print(f" =============================================\n")
|
||||
|
||||
# Validate authentication configuration
|
||||
if not config.auth.api_keys:
|
||||
|
||||
Reference in New Issue
Block a user