2025-12-25 18:48:23 -08:00
|
|
|
@echo off
|
2025-12-28 19:09:36 -08:00
|
|
|
REM Build script for Windows with CUDA support (falls back to CPU if no GPU)
|
2025-12-25 18:48:23 -08:00
|
|
|
|
|
|
|
|
echo Building Local Transcription for Windows...
|
|
|
|
|
echo ==========================================
|
|
|
|
|
echo.
|
2025-12-28 19:09:36 -08:00
|
|
|
echo This build includes CUDA support and works on both GPU and CPU systems.
|
|
|
|
|
echo.
|
2025-12-25 18:48:23 -08:00
|
|
|
|
|
|
|
|
REM Clean previous builds
|
|
|
|
|
echo Cleaning previous builds...
|
|
|
|
|
if exist build rmdir /s /q build
|
|
|
|
|
if exist dist rmdir /s /q dist
|
|
|
|
|
|
2025-12-28 19:09:36 -08:00
|
|
|
REM Sync dependencies (uses PyTorch CUDA from pyproject.toml)
|
|
|
|
|
echo Installing dependencies with CUDA support...
|
|
|
|
|
uv sync
|
|
|
|
|
|
2025-12-25 18:48:23 -08:00
|
|
|
REM Build with PyInstaller
|
2025-12-28 19:32:23 -08:00
|
|
|
REM Note: enum34 is excluded in local-transcription.spec
|
2025-12-25 18:48:23 -08:00
|
|
|
echo Running PyInstaller...
|
|
|
|
|
uv run pyinstaller local-transcription.spec
|
|
|
|
|
|
|
|
|
|
REM Check if build succeeded
|
|
|
|
|
if exist "dist\LocalTranscription" (
|
|
|
|
|
echo.
|
|
|
|
|
echo Build successful!
|
|
|
|
|
echo Executable location: dist\LocalTranscription\LocalTranscription.exe
|
|
|
|
|
echo.
|
2025-12-28 19:09:36 -08:00
|
|
|
echo CUDA Support: YES (automatically falls back to CPU if no GPU detected^)
|
|
|
|
|
echo.
|
2025-12-25 18:48:23 -08:00
|
|
|
echo To run the application:
|
|
|
|
|
echo cd dist\LocalTranscription
|
|
|
|
|
echo LocalTranscription.exe
|
|
|
|
|
echo.
|
|
|
|
|
echo To create a distributable package:
|
|
|
|
|
echo - Install 7-Zip or WinRAR
|
|
|
|
|
echo - Compress the dist\LocalTranscription folder to a ZIP file
|
|
|
|
|
) else (
|
|
|
|
|
echo.
|
|
|
|
|
echo Build failed!
|
|
|
|
|
exit /b 1
|
|
|
|
|
)
|