[PR #2774] [CLOSED] [codex] Add macOS Apple Silicon tray fallback #2942

Closed
opened 2026-10-15 04:06:22 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/amnezia-vpn/amnezia-client/pull/2774
Author: @oneyar
Created: 6/26/2026
Status: ❌ Closed

Base: feat/macos-arm64-non-ne ← Head: codex/macos-arm64-build


📝 Commits (10+)

  • c62cdf8 Build macOS prebuilts for arm64 and x86_64
  • ca54ddc chore: remove parallel thingy from CI/CD
  • 01227fb feat: rework amnezia-xray-bindings for multiarch
  • cbecca4 Fix macOS universal recipe builds
  • 6e7925b Sign macOS OpenVPN helper script
  • c9befdf Address macOS build review comments
  • 9b8b716 Isolate awg-go universal builds
  • 0a85137 Disable Xcode signing for non-NE macOS
  • 07b43df Address remaining macOS recipe review comments
  • 23ce235 Add macOS Apple Silicon build helper

📊 Changes

11 files changed (+376 additions, -51 deletions)

View changed files

📝 client/CMakeLists.txt (+4 -0)
📝 client/platforms/macos/macosstatusicon.mm (+9 -0)
📝 client/ui/utils/systemTrayNotificationHandler.cpp (+56 -6)
📝 client/ui/utils/systemTrayNotificationHandler.h (+4 -0)
📝 cmake/platform_settings.cmake (+1 -1)
📝 deploy/build.sh (+1 -0)
➕ deploy/build_macos_apple_silicon.sh (+76 -0)
➕ docs/macos-apple-silicon-build.md (+46 -0)
📝 recipes/amnezia-xray-bindings/conanfile.py (+71 -20)
📝 recipes/awg-go/conanfile.py (+58 -9)
📝 recipes/tun2socks/conanfile.py (+50 -15)

📄 Description

What changed

  • Added a macOS Apple Silicon build helper that builds and packages the client with Qt 6.10+.
  • Disabled the Qt Cocoa tray context-menu path on macOS 26+ where opening the tray menu crashes the app.
  • Added a native NSStatusItem fallback for the tray menu, notifications, and menu-bar icon rendering.
  • Fixed native menu-bar icon sizing so the 200x200 PNG resources are scaled correctly instead of being cropped.

Why

On newer macOS versions, QSystemTrayIcon::setContextMenu() with Qt 6.10 can crash when the status item menu is opened. Avoiding Qt's tray context menu prevented the crash but initially removed the context menu; this PR restores the menu through the existing native macOS status item bridge.

Validation

  • Built AmneziaVPN with Qt 6.10.3 from /Users/yar/Qt/6.10.3/macos.
  • Re-signed and verified the local app bundle with codesign --verify --deep --strict --verbose=2.
  • Launched /Users/yar/Documents/amnezia-client-macos-arm64/deploy/build/client/AmneziaVPN.app and verified the status item appears with a correctly scaled icon.
  • Opened the tray menu path locally without generating an AmneziaVPN crash report.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/amnezia-vpn/amnezia-client/pull/2774 **Author:** [@oneyar](https://github.com/oneyar) **Created:** 6/26/2026 **Status:** ❌ Closed **Base:** `feat/macos-arm64-non-ne` ← **Head:** `codex/macos-arm64-build` --- ### 📝 Commits (10+) - [`c62cdf8`](https://github.com/amnezia-vpn/amnezia-client/commit/c62cdf810a7deb8227c5e63f96d158324abe59ba) Build macOS prebuilts for arm64 and x86_64 - [`ca54ddc`](https://github.com/amnezia-vpn/amnezia-client/commit/ca54ddcc83b6dec1982ed3111fa737ba229081fc) chore: remove parallel thingy from CI/CD - [`01227fb`](https://github.com/amnezia-vpn/amnezia-client/commit/01227fbd7260d292c085b6f973099800bc5eb25c) feat: rework amnezia-xray-bindings for multiarch - [`cbecca4`](https://github.com/amnezia-vpn/amnezia-client/commit/cbecca407c4b8b9c48f267adb986adb93e9bb5f5) Fix macOS universal recipe builds - [`6e7925b`](https://github.com/amnezia-vpn/amnezia-client/commit/6e7925b534c1be159eaaa8430fb569f2ff3e67f6) Sign macOS OpenVPN helper script - [`c9befdf`](https://github.com/amnezia-vpn/amnezia-client/commit/c9befdfaad7a078d8e30d43f8fcebecb3b2463ad) Address macOS build review comments - [`9b8b716`](https://github.com/amnezia-vpn/amnezia-client/commit/9b8b71647920e726714d7e803625b93123003015) Isolate awg-go universal builds - [`0a85137`](https://github.com/amnezia-vpn/amnezia-client/commit/0a85137d37e8b2671747b0d132dfb2c5ac1a0edf) Disable Xcode signing for non-NE macOS - [`07b43df`](https://github.com/amnezia-vpn/amnezia-client/commit/07b43df2bfbb59a58acdb1ffa2c220f1da7d44d1) Address remaining macOS recipe review comments - [`23ce235`](https://github.com/amnezia-vpn/amnezia-client/commit/23ce235b57573e81dca3739c1de310a1040830ff) Add macOS Apple Silicon build helper ### 📊 Changes **11 files changed** (+376 additions, -51 deletions) <details> <summary>View changed files</summary> 📝 `client/CMakeLists.txt` (+4 -0) 📝 `client/platforms/macos/macosstatusicon.mm` (+9 -0) 📝 `client/ui/utils/systemTrayNotificationHandler.cpp` (+56 -6) 📝 `client/ui/utils/systemTrayNotificationHandler.h` (+4 -0) 📝 `cmake/platform_settings.cmake` (+1 -1) 📝 `deploy/build.sh` (+1 -0) ➕ `deploy/build_macos_apple_silicon.sh` (+76 -0) ➕ `docs/macos-apple-silicon-build.md` (+46 -0) 📝 `recipes/amnezia-xray-bindings/conanfile.py` (+71 -20) 📝 `recipes/awg-go/conanfile.py` (+58 -9) 📝 `recipes/tun2socks/conanfile.py` (+50 -15) </details> ### 📄 Description ## What changed - Added a macOS Apple Silicon build helper that builds and packages the client with Qt 6.10+. - Disabled the Qt Cocoa tray context-menu path on macOS 26+ where opening the tray menu crashes the app. - Added a native `NSStatusItem` fallback for the tray menu, notifications, and menu-bar icon rendering. - Fixed native menu-bar icon sizing so the 200x200 PNG resources are scaled correctly instead of being cropped. ## Why On newer macOS versions, `QSystemTrayIcon::setContextMenu()` with Qt 6.10 can crash when the status item menu is opened. Avoiding Qt's tray context menu prevented the crash but initially removed the context menu; this PR restores the menu through the existing native macOS status item bridge. ## Validation - Built `AmneziaVPN` with Qt 6.10.3 from `/Users/yar/Qt/6.10.3/macos`. - Re-signed and verified the local app bundle with `codesign --verify --deep --strict --verbose=2`. - Launched `/Users/yar/Documents/amnezia-client-macos-arm64/deploy/build/client/AmneziaVPN.app` and verified the status item appears with a correctly scaled icon. - Opened the tray menu path locally without generating an `AmneziaVPN` crash report. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-15 04:06:22 +07:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amnezia-client#2942
No description provided.