70 lines
1.6 KiB
Batchfile
70 lines
1.6 KiB
Batchfile
@echo off
|
|
REM Piano Highlight Generator - CLI Build Script for Windows
|
|
REM Builds a standalone CLI executable from cli.py
|
|
|
|
set "PYTHON=D:\ProgramData\anaconda3\envs\py312_cuda\python.exe"
|
|
set "PYINSTALLER=D:\ProgramData\anaconda3\envs\py312_cuda\Scripts\pyinstaller.exe"
|
|
|
|
echo ================================================
|
|
echo Piano Highlight Generator - CLI Build
|
|
echo ================================================
|
|
echo.
|
|
|
|
REM Check Python
|
|
"%PYTHON%" --version
|
|
if errorlevel 1 (
|
|
echo ERROR: Python not found
|
|
pause
|
|
exit /b 1
|
|
)
|
|
|
|
REM Install pyinstaller if needed
|
|
"%PYTHON%" -c "import PyInstaller" 2>nul
|
|
if errorlevel 1 (
|
|
echo Installing PyInstaller...
|
|
"%PYTHON%" -m pip install pyinstaller -q
|
|
)
|
|
|
|
REM Build
|
|
echo.
|
|
echo Starting PyInstaller compilation...
|
|
echo This may take several minutes...
|
|
echo.
|
|
|
|
cd /d "D:\F\NewI\opencode\daily-workspace\projects\piano-highlight-app"
|
|
|
|
"%PYTHON%" -m PyInstaller ^
|
|
--name=PianoHighlightCLI ^
|
|
--console ^
|
|
--onefile ^
|
|
--clean ^
|
|
--distpath=dist_cli ^
|
|
--workpath=build_cli ^
|
|
--specpath=build_cli ^
|
|
--additional-hooks-dir= ^
|
|
--hidden-import=pkg_resources ^
|
|
--hidden-import=faster_whisper ^
|
|
--hidden-import=cv2 ^
|
|
--hidden-import= yaml ^
|
|
--hidden-import=requests ^
|
|
--hidden-import=PIL ^
|
|
--collect-all=faster_whisper ^
|
|
--collect-all=transformers ^
|
|
src/cli.py
|
|
|
|
if errorlevel 1 (
|
|
echo.
|
|
echo BUILD FAILED!
|
|
pause
|
|
exit /b 1
|
|
)
|
|
|
|
echo.
|
|
echo ================================================
|
|
echo Build complete!
|
|
echo ================================================
|
|
echo.
|
|
echo Output: dist_cli\PianoHighlightCLI.exe
|
|
echo.
|
|
pause
|