feat(build): add remote-build-display-control.sh for workstation → Mac builds

Copies display_control.m to laptop 01 via SSH, compiles universal binary
(x86_64 + arm64) on the remote Mac, pulls binary back to resources/bin/.
Defaults to 192.168.32.101; accepts optional IP override as $1.

README: restructure display_control build section — Option A (remote from
workstation, preferred) and Option B (direct on Mac).
This commit is contained in:
Scott Idem
2026-05-20 17:16:25 -04:00
parent 3da3b187ec
commit b6b902ad4a
2 changed files with 126 additions and 11 deletions

View File

@@ -354,32 +354,53 @@ See `documentation/PROJECT__AE_Events_Launcher_Native_integration.md` Section 8
### One-Time: Build the `display_control` Binary (macOS)
The `display_control` binary provides native CoreGraphics display mirror/extend without any Homebrew dependency. It must be compiled once on a Mac and committed to the repo so it is bundled into every packaged app.
The `display_control` binary provides native CoreGraphics display mirror/extend without any Homebrew dependency. It must be compiled on a Mac (Xcode CLT required) and committed to the repo so it is bundled into every packaged app. Produces a universal binary (x86_64 + arm64) that runs on both Intel and Apple Silicon Macs.
Rebuild only if `scripts/display_control.m` changes.
#### Option A — From the Linux workstation (preferred)
Laptop 01 (`192.168.32.101`) is the designated build Mac — Xcode CLT is installed there.
The remote build script copies the source over SSH, compiles on that Mac, and pulls the binary back.
```bash
# Requires Xcode Command Line Tools (one-time install):
xcode-select --install
# From the repo root on the workstation:
./scripts/remote-build-display-control.sh
# From the repo root:
# Override the build Mac IP if needed:
./scripts/remote-build-display-control.sh 192.168.32.102
```
The script prints `file resources/bin/display_control` at the end. Confirm both arches appear:
```
resources/bin/display_control: Mach-O universal binary with 2 architectures: [x86_64] [arm64]
```
Then commit:
```bash
git add resources/bin/display_control
git commit -m "build: update display_control binary (universal)"
```
#### Option B — Directly on a Mac
If you have repo access on the Mac itself (Xcode CLT required — `xcode-select --install`):
```bash
./scripts/build-display-control.sh
# The script compiles x86_64 and arm64 separately then links a universal binary.
# Expected output at the end: x86_64 arm64
# Expected last output line: x86_64 arm64
# Test with a second display connected:
./resources/bin/display_control status
./resources/bin/display_control extend
./resources/bin/display_control mirror
# Commit the binary:
git add resources/bin/display_control
git commit -m "build: add display_control binary (macOS CoreGraphics)"
git commit -m "build: update display_control binary (universal)"
```
Once committed, `brew install displayplacer` is no longer required on any venue Mac. The `displayplacer` fallback remains in the handler only for `configStr` per-device overrides.
Rebuild only if `scripts/display_control.m` changes.
---
### Build Requirements (System Dependencies)