- @echo off
- rmdir /s /q dist build 2>nul
- REM Step 1: Convert logo.png to .ico
- echo === Converting logo to .ico ===
- python tools\png_to_ico.py assets\logo.png assets\logo.ico
- if %errorlevel% neq 0 exit /b %errorlevel%
- REM Step 2: Build the executable
- echo === Building HookVision.exe ===
- pyinstaller --noconsole --name=HookVision --icon="assets\logo.ico" --paths="." --additional-hooks-dir="hooks" --add-data="config.prod.ini;." --add-data="assets;assets" --hidden-import=av --hidden-import=pymodbus --hidden-import=pymodbus.client --hidden-import=paho.mqtt --hidden-import=paho.mqtt.client --hidden-import=cv2 --hidden-import=qt_material --hidden-import=configparser --hidden-import=numpy --hidden-import=win32com --hidden-import=pythoncom --hidden-import=struct --hidden-import=winsound --hidden-import=wave --hidden-import=hookvision --hidden-import=hookvision.config_loader --hidden-import=hookvision.main_window_v2 --hidden-import=hookvision.mqtt_client --hidden-import=hookvision.modbus_client --hidden-import=hookvision.rfid_client --hidden-import=hookvision.rtsp_player --hidden-import=hookvision.models --collect-all=pywin32 main.py
- if %errorlevel% neq 0 exit /b %errorlevel%
- echo === Build complete! Run the following to install shortcuts: ===
- echo python tools\install_shortcut.py
|