Add Windows installer packaging (Setup.exe + portable exe)
PyInstaller onedir/onefile specs, Inno Setup script, and GitHub Actions workflow to produce JUC500-Setup-win64.exe and portable builds. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
# -*- 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")
|
||||
|
||||
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,
|
||||
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,
|
||||
)
|
||||
Reference in New Issue
Block a user