@echo off chcp 65001 >nul 2>&1 setlocal enabledelayedexpansion set "ROOT_DIR=%~dp0" set "BACKEND_DIR=%ROOT_DIR%backend" set "FRONTEND_DIR=%ROOT_DIR%frontend" echo [install] AIGC-Director one-click install where python >nul 2>nul if errorlevel 1 ( echo [install] Python 3.9+ is required. Please install Python first. exit /b 1 ) where node >nul 2>nul if errorlevel 1 ( echo [install] Node.js 18+ is required. Please install Node.js first. exit /b 1 ) where npm >nul 2>nul if errorlevel 1 ( echo [install] npm is required. Please install npm first. exit /b 1 ) where ffmpeg >nul 2>nul if errorlevel 1 ( echo [install] ffmpeg was not found. Video concatenation and audio/video post-processing will be unavailable. ) cd /d "%BACKEND_DIR%" if not exist "config.yaml" if exist "config.yaml.example" ( copy "config.yaml.example" "config.yaml" >nul echo [install] Created backend config.yaml from config.yaml.example. Fill in API keys before generating videos. ) where uv >nul 2>nul if errorlevel 1 ( echo [install] uv was not found. Installing uv with python -m pip... python -m pip install --user uv ) where uv >nul 2>nul if errorlevel 1 ( echo [install] uv is still not on PATH. Falling back to venv + pip. python -m venv venv call venv\Scripts\activate.bat python -m pip install --upgrade pip python -m pip install -r requirements.txt ) else ( uv sync ) cd /d "%FRONTEND_DIR%" if exist "package-lock.json" ( npm ci ) else ( npm install ) if "%AIGC_DIRECTOR_SKIP_FRONTEND_BUILD%"=="1" ( echo [install] Skipping frontend build because AIGC_DIRECTOR_SKIP_FRONTEND_BUILD=1. ) else ( npm run build ) echo. echo [install] AIGC-Director installation complete. echo. echo Next steps: echo 1. Edit backend API keys: echo %BACKEND_DIR%\config.yaml echo. echo 2. Start backend: echo cd /d "%BACKEND_DIR%" echo uv run python api_server.py echo or: venv\Scripts\activate.bat ^&^& python api_server.py echo. echo 3. Start frontend in a new terminal: echo cd /d "%FRONTEND_DIR%" echo npm start echo. echo URLs: echo Backend: http://localhost:8000/api/health echo Frontend: http://localhost:3000 endlocal