KINDNICK d1f6791b96 Embed updater.exe into main.exe (single-file deployment)
- main.spec: include dist/updater.exe in datas (when present)
- main.py: extract embedded updater.exe next to main.exe on launch
- updater_client.py: _MEIPASS fallback to TEMP if extraction fails
- release.ps1: build updater FIRST so main.spec can embed it

Now users can deploy main.exe alone; auto-update still works because
main.exe self-extracts updater.exe on first launch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 13:53:31 +09:00

51 lines
1.2 KiB
Python

# -*- mode: python ; coding: utf-8 -*-
# Build order: updater.spec FIRST, then main.spec.
# main.exe embeds dist/updater.exe so users can deploy main.exe alone;
# the embedded updater is auto-extracted next to main.exe on first launch.
import os
_extra_datas = []
if os.path.exists('dist/updater.exe'):
_extra_datas.append(('dist/updater.exe', '.'))
a = Analysis(
['main.py'],
pathex=[],
binaries=[],
datas=[('3d-alarm.png', '.')] + _extra_datas,
hiddenimports=[
'holidays', 'holidays.countries.south_korea',
'win32evtlog', 'win32evtlogutil',
'matplotlib.backends.backend_qt5agg',
],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=['pandas', 'numpy.testing', 'PyQt5.QtWebEngineWidgets'],
noarchive=False,
optimize=0,
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name='main',
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,
icon=['3d-alarm.ico'],
)