douyinWEB/scripts/start-desktop.bat
Eric 960a268fa2 Make desktop the sole Windows client with unmanned live and boot/poll hardening.
Consolidate Douyin→YouTube RTMPS into /live, parallel local service boot, poll-only realtime, slimmer packs/charts, and deprecate youtube-live-win.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-23 14:10:07 +01:00

57 lines
1.2 KiB
Batchfile

@echo off
setlocal
cd /d %~dp0\..\desktop
if not exist node_modules (
echo Installing desktop dependencies...
call npm install
if errorlevel 1 goto :fail
)
if not exist ..\youtube-svc\node_modules (
echo Installing youtube-svc dependencies...
pushd ..\youtube-svc
call npm install
if errorlevel 1 (
popd
goto :fail
)
popd
)
if not exist runtime\ffmpeg\ffmpeg.exe (
where ffmpeg >nul 2>&1
if errorlevel 1 (
echo Fetching bundled ffmpeg...
call npm run fetch-ffmpeg
if errorlevel 1 echo WARN: ffmpeg fetch failed — install ffmpeg or retry npm run fetch-ffmpeg
) else (
echo System ffmpeg found on PATH.
)
)
if not exist ..\pb\pocketbase.exe (
echo Fetching PocketBase...
call npm run fetch-pocketbase
if errorlevel 1 (
echo ERROR: pb\pocketbase.exe missing. Run: cd desktop ^&^& npm run fetch-pocketbase
goto :fail
)
)
echo Ensuring Python deps ^(tzdata / requirements^)...
call npm run ensure-python
if errorlevel 1 (
echo WARN: ensure-python failed — API may not start. Run: pip install -r ..\backend\requirements.txt
)
echo Starting Electron desktop ^(local FastAPI + PocketBase + youtube-svc^)...
call npm run electron:dev
goto :eof
:fail
echo.
echo Desktop start aborted.
exit /b 1
endlocal