fix(macos-tray): download DMG matching host CPU architecture#377
Merged
fix(macos-tray): download DMG matching host CPU architecture#377
Conversation
The "Download update" menu item always opened the first darwin DMG found in the GitHub release assets, which is the amd64 build on any release (amd64 sorts before arm64). Apple Silicon users were pushed toward the Intel installer. Detect the host architecture via sysctl (handling Rosetta translation so a translated process still gets offered the native arm64 DMG), match release assets on both "darwin" and the arch token, and prefer the signed/notarized "-installer.dmg" variant when present. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Deploying mcpproxy-docs with
|
| Latest commit: |
6a295bf
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://4ef132bd.mcpproxy-docs.pages.dev |
| Branch Preview URL: | https://fix-tray-update-arch-selecti.mcpproxy-docs.pages.dev |
📦 Build ArtifactsWorkflow Run: View Run Available Artifacts
How to DownloadOption 1: GitHub Web UI (easiest)
Option 2: GitHub CLI gh run download 24283195942 --repo smart-mcp-proxy/mcpproxy-go
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
darwinDMG found in the GitHub release assets. Becauseamd64sorts beforearm64, Apple Silicon users were pushed toward the Intel installer.sysctl(with Rosetta handling so a translated process still gets offered the nativearm64DMG), match release assets on bothdarwinand the arch token, and prefer the signed/notarized-installer.dmgvariant when present.Root cause
UpdateService.checkWithGitHub()iteratedassetsand took the first entry matchingname.contains("darwin") && name.hasSuffix(".dmg"). Release assets published by.github/workflows/release.ymlinclude bothdarwin-amd64anddarwin-arm64variants (plus-installer.dmgsigned/notarized variants), and the iteration always landed on the Intel build.Fix
native/macos/MCPProxy/MCPProxy/Services/UpdateService.swift:hostArchToken()static helper returns"arm64"/"amd64", checkingsysctl.proc_translatedfirst (so Intel binaries under Rosetta 2 still returnarm64) then readinghw.machine.darwin+ the arch token +.dmg, and prefers-installer.dmg(signed + notarized) when both signed and unsigned variants exist for the arch.Test plan
swiftcbuild ofMCPProxytarget succeeds (only pre-existing Sendable warnings remain).darwin-arm64-installer.dmg.darwin-amd64-installer.dmg.arm64DMG.🤖 Generated with Claude Code