@echo off
setlocal
cd /d "%~dp0"
py -m pip install -r requirements.txt
if errorlevel 1 goto :fail

rem Safe mode: building the EXE never starts bulk network downloads.
rem The optional full pack can still be prepared manually with:
rem prepare_full_asset_pack.bat
py -m PyInstaller --noconfirm --clean --onefile --windowed ^
  --name "BW_Crafting_Tool_by_Arg_v0_15_2" ^
  --add-data "data;data" ^
  --add-data "assets;assets" ^
  awakening_app.py
if errorlevel 1 goto :fail

echo.
echo Gotowe: dist\BW_Crafting_Tool_by_Arg_v0_15_2.exe
pause
exit /b 0

:fail
echo.
echo BUILD FAILED.
pause
exit /b 1
