v2.2.3: stage updater.exe outside dist/ to survive main.spec --clean

main.spec's --clean flag wipes dist/ at the start of main.exe build,
which deleted dist/updater.exe before it could be embedded as data
(v2.2.2 main.exe shipped without embedded updater).

Fix: release.ps1 copies dist/updater.exe to build/staging/ after
the updater build, and main.spec datas references that staged path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
KINDNICK 2026-04-30 16:15:51 +09:00
parent 7661afd33a
commit b91b229731
4 changed files with 30 additions and 3 deletions

View File

@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
## [2.2.3] — 2026-04-30
### Fixed
- **`updater.exe` 임베딩 빌드 안정화**
- v2.2.2에서 `main.spec --clean`이 빌드 시작 시 `dist/updater.exe`를 지우면서
임베딩이 누락되던 문제 수정
- `release.ps1``dist/updater.exe``build/staging/`로 복사 후 main.spec이 그걸 참조
- main.exe 사이즈가 다시 ~78MB (updater 내장) 로 정상화
## [2.2.2] — 2026-04-30
### Added

View File

@ -4,4 +4,4 @@
릴리스 값을 올린 git tag push.
CHANGELOG.md의 최상단 항목과 일치시킬 .
"""
__version__ = '2.2.2'
__version__ = '2.2.3'

View File

@ -4,9 +4,15 @@
# the embedded updater is auto-extracted next to main.exe on first launch.
import os
# release.ps1 stages updater.exe at build/staging/updater.exe
# (avoids PyInstaller --clean wiping dist/updater.exe before main build).
_extra_datas = []
if os.path.exists('dist/updater.exe'):
_extra_datas.append(('dist/updater.exe', '.'))
_staged = 'build/staging/updater.exe'
_fallback = 'dist/updater.exe'
if os.path.exists(_staged):
_extra_datas.append((_staged, '.'))
elif os.path.exists(_fallback):
_extra_datas.append((_fallback, '.'))
a = Analysis(
['main.py'],

View File

@ -120,11 +120,23 @@ $rc = Invoke-Native python -m PyInstaller --clean updater.spec
if ($rc -ne 0) { Fail "updater.exe build failed (exit $rc)" }
if (-not (Test-Path 'dist/updater.exe')) { Fail "dist/updater.exe missing" }
# Stage updater.exe outside dist/ so main.spec --clean does not wipe it
$stagingDir = 'build/staging'
if (-not (Test-Path $stagingDir)) { New-Item -ItemType Directory -Path $stagingDir | Out-Null }
Copy-Item 'dist/updater.exe' "$stagingDir/updater.exe" -Force
Info "Staged updater.exe -> $stagingDir/updater.exe"
Info "Building main.exe (with embedded updater)..."
$rc = Invoke-Native python -m PyInstaller --clean main.spec
if ($rc -ne 0) { Fail "main.exe build failed (exit $rc)" }
if (-not (Test-Path 'dist/main.exe')) { Fail "dist/main.exe missing" }
# Restore updater.exe to dist/ for separate Release asset upload
if (-not (Test-Path 'dist/updater.exe')) {
Copy-Item "$stagingDir/updater.exe" 'dist/updater.exe' -Force
Info "Restored updater.exe to dist/"
}
$mainSize = "{0:N1}MB" -f ((Get-Item dist/main.exe).Length / 1MB)
$updaterSize = "{0:N1}MB" -f ((Get-Item dist/updater.exe).Length / 1MB)
OkMsg "main.exe ($mainSize) + updater.exe ($updaterSize)"