Add Windows build script

This commit is contained in:
Hermes Agent
2026-09-11 12:56:19 +02:00
parent 464324aedf
commit e779bd3423
2 changed files with 50 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
@echo off
setlocal
cd /d "%~dp0"
if not exist ".venv\Scripts\python.exe" (
echo [1/4] Creation de l'environnement virtuel...
py -3 -m venv .venv
if errorlevel 1 goto :error
)
echo [2/4] Installation des dependances...
".venv\Scripts\python.exe" -m pip install --upgrade pip
if errorlevel 1 goto :error
".venv\Scripts\python.exe" -m pip install -r requirements.txt -e .
if errorlevel 1 goto :error
echo [3/4] Nettoyage des anciens builds...
if exist build rmdir /s /q build
if exist dist rmdir /s /q dist
if exist ai-typewriter.exe.spec del /q ai-typewriter.exe.spec
echo [4/4] Compilation Windows one-file...
".venv\Scripts\python.exe" -m PyInstaller --clean --onefile --paths src --name ai-typewriter.exe main.py
if errorlevel 1 goto :error
echo.
echo Build termine : dist\ai-typewriter.exe
exit /b 0
:error
echo.
echo Build echoue.
exit /b 1