55 lines
1.1 KiB
Batchfile
55 lines
1.1 KiB
Batchfile
@echo off
|
|
REM Build-Script fuer AnwesenheitPDF.exe
|
|
REM
|
|
REM Ergebnis:
|
|
REM build/ - temporaere PyInstaller-Artefakte
|
|
REM dist/ - fertiges Programmverzeichnis (AnwesenheitPDF.exe + alle Abhaengigkeiten)
|
|
REM
|
|
REM Voraussetzungen:
|
|
REM pip install -r requirements-dev.txt
|
|
|
|
cd /d "%~dp0"
|
|
|
|
echo.
|
|
echo === AnwesenheitPDF Build ===
|
|
echo.
|
|
|
|
echo [1/2] Abhaengigkeiten installieren...
|
|
pip install -r requirements.txt --quiet && pip install -r requirements-dev.txt --quiet
|
|
if %ERRORLEVEL% neq 0 (
|
|
echo [FEHLER] pip install fehlgeschlagen.
|
|
pause
|
|
exit /b 1
|
|
)
|
|
|
|
echo [2/2] Build starten...
|
|
echo.
|
|
|
|
python -m PyInstaller ^
|
|
--noconfirm ^
|
|
--onedir ^
|
|
--windowed ^
|
|
--distpath dist ^
|
|
--workpath build ^
|
|
--specpath build ^
|
|
--icon "%~dp0assets\icon.ico" ^
|
|
--add-data "%~dp0template;template" ^
|
|
--add-data "%~dp0config.json;." ^
|
|
--add-data "%~dp0schema.json;." ^
|
|
--add-data "%~dp0assets;assets" ^
|
|
--name "AnwesenheitPDF" ^
|
|
gui.py
|
|
|
|
if %ERRORLEVEL% neq 0 (
|
|
echo.
|
|
echo [FEHLER] Build fehlgeschlagen.
|
|
pause
|
|
exit /b 1
|
|
)
|
|
|
|
echo.
|
|
echo [OK] Build abgeschlossen.
|
|
echo Programm: dist\AnwesenheitPDF\AnwesenheitPDF.exe
|
|
echo.
|
|
pause
|