import PyInstaller.__main__
import os

os.chdir(os.path.dirname(os.path.abspath(__file__)))

PyInstaller.__main__.run([
    "main.py",
    "--onefile",
    "--windowed",
    "--name=reflector_inspector",
    "--add-data=config.json;.",
    "--add-data=assets;assets",
    "--add-data=ai/models;ai/models",
    "--hidden-import=PyQt5",
    "--hidden-import=PyQt5.QtCore",
    "--hidden-import=PyQt5.QtGui",
    "--hidden-import=PyQt5.QtWidgets",
    "--hidden-import=cv2",
    "--hidden-import=numpy",
    "--hidden-import=pymysql",
    "--hidden-import=ultralytics",
    "--hidden-import=pypylon.pylon",
    "--hidden-import=ftplib",
    "--hidden-import=socket",
    "--collect-all=ultralytics",
    "--collect-all=pypylon",
    "--distpath=E:/ANT/dist",
    "--workpath=E:/ANT/build",
    "--specpath=E:/ANT",
    "--noconfirm",
])
