Files
juc500/juc500-windows-onefile.spec
T
2026-07-21 21:11:19 +09:00

76 lines
1.6 KiB
RPMSpec

# -*- mode: python ; coding: utf-8 -*-
# Windows 64-bit 단일 EXE (포터블)
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")
+ collect_submodules("usb")
+ collect_submodules("pynput")
+ [
"six",
"usb.core",
"usb.util",
"usb.backend",
"usb.backend.libusb1",
"pynput.keyboard",
"pynput.mouse",
"pynput.keyboard._win32",
"pynput.mouse._win32",
]
)
datas = []
if STATIC.is_dir():
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,
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=0,
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name="JUC500-portable",
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=False,
upx_exclude=[],
runtime_tmpdir=None,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
icon=None,
)