hypertwist/Solvers/tentone/build.bat
axiomlogicnexus 0fbae2f3bc Phase 1: Browser bundle + TTS/Tentone solver scaffolding
- Content/Browser: package.json, vite.config.ts, src/index.ts for JS bundling
- Content/Browser/build-browser.bat for Windows npm build
- Solvers/piper/piper_tts_wrapper.py for TTS sidecar (1C)
- Solvers/tentone/build.bat for OpenCV-aware standalone build (1G)
- Supports 1H (pmndrs spatial), 1I (echarts analytics), 1J (model-viewer)
2026-06-10 17:45:42 +00:00

53 lines
1.7 KiB
Batchfile

@echo off
setlocal
REM Build tentone/rubix-solver as standalone executable
REM Requires OpenCV. If OpenCV is not installed, only the solver logic
REM (cube.cpp, solver.cpp, solution.cpp) can be compiled without vision.
set SRCDIR=..\..\.external\rubix-solver
set OUTDIR=..\..\UnrealHyperTwist\Binaries\Win64\Solvers
if not exist %OUTDIR% mkdir %OUTDIR%
REM Try to find OpenCV
set OPENCV_DIR=
if exist "C:\opencv\build" set OPENCV_DIR=C:\opencv\build
if exist "C:\tools\opencv\build" set OPENCV_DIR=C:\tools\opencv\build
if "%OPENCV_DIR%"=="" (
echo WARNING: OpenCV not found. Building solver-only executable without vision.
echo Install OpenCV and set OPENCV_DIR to enable computer vision features.
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
if errorlevel 1 exit /b 1
cl /nologo /W4 /O2 /Fe%OUTDIR%\tentone-solver.exe ^
%SRCDIR%\cube.cpp ^
%SRCDIR%\solver.cpp ^
%SRCDIR%\solution.cpp ^
%SRCDIR%\utils.cpp ^
%SRCDIR%\config.cpp ^
%SRCDIR%\main.cpp
) else (
echo Found OpenCV at %OPENCV_DIR%
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
if errorlevel 1 exit /b 1
cl /nologo /W4 /O2 /I%OPENCV_DIR%\include /Fe%OUTDIR%\tentone-solver.exe ^
%SRCDIR%\cube.cpp ^
%SRCDIR%\solver.cpp ^
%SRCDIR%\solution.cpp ^
%SRCDIR%\utils.cpp ^
%SRCDIR%\config.cpp ^
%SRCDIR%\vision.cpp ^
%SRCDIR%\main.cpp ^
/link /LIBPATH:%OPENCV_DIR%\x64\vc16\lib opencv_world490.lib
)
if errorlevel 1 (
echo Build failed
exit /b 1
)
echo tentone-solver built successfully at %OUTDIR%\tentone-solver.exe