# macOS 安装

## 一键

```bash
curl -fsSL http://sc.casstk.com/sa2/install/install | bash -s -- --home "$HOME/sa2-dev" -y
```

Apple Silicon → `darwin_arm64`（若 manifest 已发布该包）。

## 拷贝 install/ 后本地脚本

```bash
bash scripts/install.sh --home "$HOME/sa2-dev" -y
```

## tar

```bash
bash scripts/install-tar.sh --file ~/Downloads/sa2-....tar.gz -y
```

## Docker Desktop

```bash
# auto：macOS 默认 UDP relay（LAN 广播进不了 Desktop 的 8190 publish）
bash scripts/install-docker.sh --compose-only
# 或显式：
bash scripts/install-docker.sh --compose-only --udp-mode relay
```

依赖 **`install/docker/device/compose.yml`**（及 `compose.udp-publish.yml` / `scripts/sa2-udp-relay.sh`），请保持目录完整，见 [portable.md](portable.md)、[docker-install.md](docker-install.md)「UDP 接入模式」。

## 验收

```bash
sa_upgrader status
curl -fsS http://127.0.0.1:8080/health
```

Windows 见 [windows.md](windows.md)。
