# -*- mode: python ; coding: utf-8 -*- # Windows 64-bit PyInstaller spec (onedir → installer / portable) from pathlib import Path from PyInstaller.utils.hooks import collect_submodules ROOT = Path(SPECPATH).resolve() STATIC = ROOT / "juc500_xfer" / "static" VENDOR_DLL = ROOT / "vendor" / "libusb-1.0.dll" hidden = collect_submodules("juc500_xfer") datas = [] for f in STATIC.iterdir(): if f.is_file(): datas.append((str(f), "static")) datas.append((str(f), "juc500_xfer/static")) binaries = [] if VENDOR_DLL.is_file(): binaries.append((str(VENDOR_DLL), ".")) a = Analysis( [str(ROOT / "juc500_app.py")], pathex=[str(ROOT)], binaries=binaries, datas=datas, hiddenimports=hidden + [ "usb", "usb.core", "usb.util", "usb.backend", "usb.backend.libusb1", ], hookspath=[], hooksconfig={}, runtime_hooks=[], excludes=[], noarchive=False, optimize=0, ) pyz = PYZ(a.pure) exe = EXE( pyz, a.scripts, [], exclude_binaries=True, name="JUC500", debug=False, bootloader_ignore_signals=False, strip=False, upx=False, console=True, # USB/디버그 로그 확인. GUI만이면 False argv_emulation=False, target_arch=None, codesign_identity=None, entitlements_file=None, icon=None, ) coll = COLLECT( exe, a.binaries, a.datas, strip=False, upx=False, upx_exclude=[], name="JUC500", )