Repository navigation
build(windows): embed PE version info in PyInstaller executables - #1559
TimeToBuildBob wants to merge 4 commits into
Conversation
Gives every bundled exe a ProductName/ProductVersion/FileVersion resource derived from the release tag. Code-signing services (SignPath Foundation) require consistent product metadata; see ActivityWatch#632 / ActivityWatch#1558. No-op on Linux/macOS: PyInstaller's versioninfo module only imports on Windows. Git-Session-Id: ee739f7c-b2fa-4f0d-b3a5-15e7b341e7df
Review guide (auto-posted)Structured warm-up for reviewers — what changed, what to run, where to look. Key files
Suggested verification
Known risks / watch points
Suggested review focus
Generated by |
[Medium impact] The PR appears safe to merge; no new blocking issues were found. SummaryWindows packaging now adds and checks version information on the bundled Python executables before creating the zip or installer.
Reviews (5) · Last reviewed commit: "fix(windows): use venv Python for the ar..." · Reviewed by Greptile |
Git-Session-Id: c91cae29-4f6a-510a-8986-b41d7f75441b
This comment has been minimized.
This comment has been minimized.
🤖 AI code reviewAdds a new script scripts/package/windows-version-info.py that stamps PE version resources onto the bundled Python executables (aw-qt, aw-server, and the Python watchers) before Windows zip/Inno Setup creation. Updates package-all.sh to invoke this script on Windows using Safe to merge — no P0/P1 findingsConfidence 5/5 ✅ No findings. The diff looks correct to me on this pass. Files changed (5) — the diff as I read it
Previous review passes
Reviewed Maintainer commands
|
Git-Session-Id: 643fbc0c-eccc-54f8-89a0-1e3caf0a9393
|
@greptileai review |
Git-Session-Id: 3b0ad55c-84e1-59bf-af04-b43356c9ccb2
Review-findings adjudicationRecommendation: the reported findings are disposed; leave merge to the maintainer after current-head CI and automatic review complete. No manual Greptile re-review requested, and no merge performed. Fixed
Remaining — non-blocking dispositionsEach finding has one inline explanation and is resolved:
The summary-only numeric-version-prefix and exact-resource-roundtrip advisories remain non-blocking: leading numeric components are the documented contract for prerelease/dev strings, and the real Windows roundtrip passed. No unsupported parser generalization or speculative serializer workaround added. Verified against
CIAt the post-push snapshot, Ubuntu packaging tests and Research Edition packaging smoke tests pass; Windows packaging tests, CodeQL analysis and release builds are still pending. The preceding reviewed head passed all 13 native Windows resource tests; that result does not substitute for new-head CI. Domain riskBefore release, inspect version properties and launch the actual stamped Windows bundle/installer (including Python watchers). The Windows resource roundtrip covers a copied interpreter with overlay bytes, not a complete frozen release app or Authenticode signing. This PR does not claim to resolve Smart App Control or complete signing. ConvergenceDetector reports no unresolved Greptile P1/P2 findings; our reviewer also reports zero open finding threads. Its historical |
Prerequisite for signing Windows releases through SignPath Foundation (#632), made more urgent by the Smart App Control block in #1558.
Windows
make packagebuilds the subprojects with their own PyInstaller specs and copies them intodist/activitywatch; the rootaw.specis used only for the macOS app. This PR now stamps the assembled Windows Python executables inscripts/package/package-all.sh, before creating either the zip or Inno Setup installer. It does not change the subproject builds or macOS/Linux packaging.ActivityWatch, CompanyNameActivityWatch Contributors, and module-specific FileDescription/InternalName/OriginalFilename.getversion.sh), retaining beta/RC/dev suffixes in string fields. Numeric PE fields use the leading dotted components, padded to four integers (0.14.0b5→0.14.0.0).aw-qt,aw-server, and the Python AFK/window/input watchers. Cargo/Tauri binaries and third-party helpers are untouched.aw-notifyis now Rust, so it is excluded too.Verification:
bash -npass.Not included: Cargo executable resources, Authenticode signing, certificate/application setup, or a claim that Smart App Control is resolved.