Includes earlier uncommitted work: Tomie and Unity adapters, benchmark, structured output, call metrics. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
28 lines
795 B
Batchfile
28 lines
795 B
Batchfile
@echo off
|
|
setlocal
|
|
chcp 65001 >nul
|
|
cd /d "%~dp0..\..\.."
|
|
if exist ".venv\Scripts\python.exe" goto dependencies
|
|
where py >nul 2>nul
|
|
if not errorlevel 1 (
|
|
py -3 -m venv .venv
|
|
) else (
|
|
python -m venv .venv
|
|
)
|
|
if errorlevel 1 goto failed
|
|
:dependencies
|
|
".venv\Scripts\python.exe" -c "import local_translator, UnityPy, fontTools" >nul 2>nul
|
|
if not errorlevel 1 goto run
|
|
".venv\Scripts\python.exe" -m pip install -e ".[unity]"
|
|
if errorlevel 1 goto failed
|
|
:run
|
|
if not exist tomie.json copy /y tomie.example.json tomie.json >nul
|
|
".venv\Scripts\python.exe" -X utf8 -m local_translator.tomie --config tomie.json %*
|
|
if errorlevel 1 goto failed
|
|
if not defined LOCAL_TRANSLATOR_NO_PAUSE pause
|
|
exit /b 0
|
|
:failed
|
|
echo Failed. See the error above.
|
|
if not defined LOCAL_TRANSLATOR_NO_PAUSE pause
|
|
exit /b 1
|