Repository navigation
Expand file tree
/
Copy pathformencoder.bat
More file actions
44 lines (44 loc) · 2.45 KB
/
Copy pathformencoder.bat
File metadata and controls
44 lines (44 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
@echo off
setlocal
if not defined FORMENCODER_CWD set "FORMENCODER_CWD=%CD%"
cd /d "%~dp0"
set "CMD=%~1"
set "REST="
for /f "tokens=1,* delims= " %%a in ("%*") do set "REST=%%b"
if "%CMD%"=="" set "CMD=boot"
if /i "%CMD%"=="boot" ( call setup\boot_all.bat & goto :eof )
if /i "%CMD%"=="dev" ( call setup\boot_all.bat & goto :eof )
if /i "%CMD%"=="install" ( call setup\install_all.bat %REST% & goto :eof )
if /i "%CMD%"=="install-native" ( call setup\build_native.bat %REST% & goto :eof )
if /i "%CMD%"=="install-desktop" ( call setup\install_desktop.bat & goto :eof )
if /i "%CMD%"=="install-tools" ( call :py setup\install_tools.py %REST% & goto :eof )
if /i "%CMD%"=="backend" ( call setup\boot_backend.bat & goto :eof )
if /i "%CMD%"=="frontend" ( call setup\boot_frontend.bat & goto :eof )
if /i "%CMD%"=="build" ( call setup\build_frontend.bat & goto :eof )
if /i "%CMD%"=="serve" ( call setup\serve.bat & goto :eof )
if /i "%CMD%"=="freeze" ( call setup\freeze_backend.bat & goto :eof )
if /i "%CMD%"=="desktop" (
if /i "%~2"=="build" ( call setup\desktop_build.bat %3 %4 %5 %6 %7 %8 %9 ) else ( call setup\desktop_dev.bat )
goto :eof
)
if /i "%CMD%"=="doctor" ( call setup\doctor.bat & goto :eof )
for %%C in (encode queue exec batch commands describe presets probe frame wait extensions extension) do if /i "%CMD%"=="%%C" ( call :py setup\fe.py %* & goto :eof )
if /i "%CMD%"=="mcp" ( call :py setup\mcp_stdio.py %REST% & goto :eof )
if /i "%CMD%"=="agents" ( call :py setup\agents.py %REST% & goto :eof )
if /i "%CMD%"=="counts" ( call :py setup\line_counts.py %REST% & goto :eof )
if /i "%CMD%"=="clean" ( call setup\clean.bat %2 & goto :eof )
if /i "%CMD%"=="help" ( call :usage & exit /b 0 )
if not "%CMD:.=%"=="%CMD%" ( call :py setup\fe.py %* & goto :eof )
echo [formencoder] unknown command: %CMD%
call :usage
exit /b 2
:py
if exist backend\venv\Scripts\python.exe ( backend\venv\Scripts\python.exe %* ) else ( py -3 %* )
exit /b %errorlevel%
:usage
echo formencoder.bat [command]
echo boot ^| install [--dev] ^| install-native [--dev] ^| install-desktop ^| install-tools [TOOL] [--stage] ^| backend ^| frontend
echo build ^| serve ^| freeze ^| desktop dev ^| desktop build ^| doctor
echo encode FILE... [--preset ID] ^| queue ^| exec ID [JSON] ^| batch JSON ^| commands [FILTER] ^| describe ID
echo presets [QUERY] ^| probe FILE ^| frame OUT.png ^| wait ^| extensions ^| extension ID COMMAND ^| mcp ^| agents install^|sync^|status ^| counts ^| clean [--all] ^| help
exit /b 0