# -*- mode: python ; coding: utf-8 -*-

from PyInstaller.utils.hooks import collect_submodules


hiddenimports = [
    'web_sentinel.checks.headers',
    'web_sentinel.checks.tls',
    'web_sentinel.checks.injection',
    'web_sentinel.checks.static_analysis',
    'web_sentinel.checks.third_party',
    'web_sentinel.telemetry',
    # GUI moderne et ses sections (sinon PyInstaller retombe sur l'ancien GUI)
    'web_sentinel.gui.modern_tabbed_window',
    'web_sentinel.gui.sections',
    'web_sentinel.gui.sections.history',
    'web_sentinel.gui.sections.license',
    'web_sentinel.gui.sections.payment',
    'web_sentinel.gui.sections.sast',
] + collect_submodules('web_sentinel.gui.sections')


a = Analysis(
    ['web_sentinel\\gui\\modern_window_launcher.py'],
    pathex=[],
    binaries=[],
    datas=[
        ('web_sentinel/localization', 'web_sentinel/localization'),
        ('web_sentinel/gui/assets', 'web_sentinel/gui/assets'),
        ('web_sentinel/gui/templates', 'web_sentinel/gui/templates'),
        ('web_sentinel/gui/themes_gui', 'web_sentinel/gui/themes_gui'),
    ],
    hiddenimports=hiddenimports,
    hookspath=[],
    hooksconfig={},
    runtime_hooks=[],
    excludes=['pytest', 'test'],
    noarchive=False,
    optimize=0,
)
pyz = PYZ(a.pure)

exe = EXE(
    pyz,
    a.scripts,
    a.binaries,
    a.datas,
    [],
    name='web-sentinel-gui-modern',
    debug=False,
    bootloader_ignore_signals=False,
    strip=False,
    upx=True,
    upx_exclude=[],
    runtime_tmpdir=None,
    console=False,
    disable_windowed_traceback=False,
    argv_emulation=False,
    target_arch=None,
    codesign_identity=None,
    entitlements_file=None,
)
