Problem: helper upgrades hinge on exact build identity — activation is
admitted only between binaries of the same build, and a GUI whose
bundle was replaced underneath it must notice and stop mutating — but
no binary or bundle could say which build it came from, and nothing
distinguished a canonical /Applications install from a displaced copy.
Solution: one NIXMAC_BUILD_ID resolution in build.rs feeds both the
compiled constant in every target and the stamped Info.plist (now
generated from a template), making running-vs-on-disk comparison
possible. Packaged builds fail without a CI-supplied ID; dev builds
fall back to a fixed literal. install_location supplies the
canonical-install verdict the same gates consume.
Summary
Problem: helper upgrades hinge on exact build identity — activation is admitted only between binaries of the same build, and a GUI whose bundle was replaced underneath it must notice and stop mutating — but no binary or bundle could say which build it came from, and nothing distinguished a canonical /Applications install from a displaced copy.
Solution: one
NIXMAC_BUILD_IDresolution in build.rs feeds both the compiled constant in every target and the stamped Info.plist (now generated from a template), so running-vs-on-disk comparison is possible. Packaged builds fail without a CI-supplied ID; dev builds fall back to a fixed literal.install_locationsupplies the canonical-install verdict the later gates consume.First PR of the helper-redesign stack (#667 → #668 → #669 → #670).
Test Plan
cargo testgreen across all targets (build-ID resolution and install-location judgment covered by unit tests)cargo test -p nixmacjob so thecfg(macos)helper coverage actually executesDocs
Prior review
Every file in this PR is byte-identical to content Scott already approved in the closed drain-era stack: build.rs/build_id.rs/Cargo plumbing in #619 and #620, install_location.rs in #635, Info.template.plist/tauri.conf.json/settings in #620. This PR is a re-cut of that reviewed work onto the new stack; nothing changed but the commit story.