Stock-Tool/build.bat

58 lines
1.5 KiB
Batchfile

@echo off
cd /d "%~dp0"
echo ======================================
echo Ultimate Investment Tool - Build EXE
echo ======================================
echo.
echo Installing dependencies...
python -m pip install pyinstaller matplotlib --quiet
if errorlevel 1 (
echo ERROR: pip failed. Make sure Python is installed and on PATH.
pause
exit /b 1
)
echo.
echo Copying source files from dist\ for bundling...
copy /Y dist\screener_gui.py screener_gui.py >nul
copy /Y dist\stock_screener.py stock_screener.py >nul
echo Building executable...
echo.
python -m PyInstaller StockScreener.spec
if errorlevel 1 (
echo.
echo BUILD FAILED. See errors above.
echo.
echo Cleaning up temporary files...
if exist screener_gui.py del screener_gui.py
if exist stock_screener.py del stock_screener.py
pause
exit /b 1
)
echo.
echo Cleaning up temporary source copies from project root...
if exist screener_gui.py del screener_gui.py
if exist stock_screener.py del stock_screener.py
echo.
echo ======================================
echo SUCCESS!
echo.
echo Folder: dist\
echo - StockScreener.exe (distribute this)
echo - screener_gui.py (distribute alongside exe)
echo - stock_screener.py (distribute alongside exe)
echo.
echo DO NOT distribute:
echo - issue_license.py (admin only)
echo - supabase_schema.sql (admin only)
echo - hwid.py / license_check.py / updater.py / activation_dialog.py
echo (these are bundled inside the exe)
echo ======================================
pause