chore(build): complete unsigned macOS packaging

This commit is contained in:
QILIN YOU
2026-05-02 22:53:06 +08:00
parent a722d897b4
commit 039cccd390
10 changed files with 243 additions and 331 deletions
+18 -4
View File
@@ -1,9 +1,9 @@
# Ant Browser
> 面向多账号隔离、代理绑定和本地环境管理的桌面浏览器工具(Windows / Linux)。
> 面向多账号隔离、代理绑定和本地环境管理的桌面浏览器工具(Windows / Linux / macOS unsigned)。
[![Release](https://img.shields.io/github/v/release/black-ant/Ant-Browser?sort=semver)](https://github.com/black-ant/Ant-Browser/releases)
[![Platform](https://img.shields.io/badge/Platform-Windows%20%7C%20Linux-blue)](https://github.com/black-ant/Ant-Browser/releases)
[![Platform](https://img.shields.io/badge/Platform-Windows%20%7C%20Linux%20%7C%20macOS-blue)](https://github.com/black-ant/Ant-Browser/releases)
[![Issues](https://img.shields.io/github/issues/black-ant/Ant-Browser)](https://github.com/black-ant/Ant-Browser/issues)
## 推荐内核项目
@@ -54,6 +54,7 @@ Ant Browser 适合以下场景:
### 1.1.0 · 2026-03-19
- 完善 Linux 支持:补齐 Linux 环境下的开发、打包、安装、启动与运行链路,并持续修复安装版启动与退出稳定性问题
- 补齐 macOS unsigned 内测构建链路:支持在原生 macOS 主机上打包 `.app` / `.zip`,并将用户状态目录放到 `~/Library/Application Support/ant-browser`
- 新增 SOCKS 代理测试支持:SOCKS 代理能力已进入测试阶段,后续会继续验证稳定性与兼容性
- 实验性支持接口触发浏览器:支持通过接口启动浏览器实例,便于后续接入自动化流程
@@ -126,6 +127,7 @@ Ant Browser 适合以下场景:
- 操作系统:
- Windows 10 / 1164 位)
- Linuxamd64 / arm64
- macOSamd64 / arm64,当前为 unsigned 内测包)
- 建议内存:8 GB 及以上
- 建议磁盘空间:2 GB 以上
@@ -135,15 +137,16 @@ Ant Browser 适合以下场景:
2. 安装版直接运行 `AntBrowser-Setup-*.exe`
3. 便携版解压后运行 `ant-chrome.exe`
4. Linux 包下载后可直接安装 `ant-browser_<version>_<arch>.deb`,或解压 `tar.gz` 后运行 `ant-chrome`
5. macOS unsigned 包解压后运行 `AntBrowser-<version>-macos-<arch>.app`;如被 Gatekeeper 拦截,请对本机测试包执行 `xattr -dr com.apple.quarantine <app路径>` 后再打开
### 从源码运行
1. 开发默认使用 `master` 分支;该分支不带测试用户数据,适合作为日常开发基线。
2. 如需带测试库的演示环境,请切换到 `user_data` 分支。
3. Windows 统一执行 `bat\dev.bat`;默认是稳定模式,如需前端 HMR 联调使用 `bat\dev.bat live`,如需受限内存复现使用 `bat\dev.bat limited`
4. Windows 运行时使用 `bin/xray.exe``bin/sing-box.exe`Linux 运行时使用 `bin/linux-<arch>/xray``bin/linux-<arch>/sing-box`
4. Windows 运行时使用 `bin/xray.exe``bin/sing-box.exe`Linux 运行时使用 `bin/linux-<arch>/xray``bin/linux-<arch>/sing-box`macOS 运行时使用 `bin/darwin-<arch>/xray``bin/darwin-<arch>/sing-box`
5. 运行时文件采用“仓库固定 + 哈希校验”,校验清单在 `publish/runtime-manifest.json`,固定来源清单在 `publish/runtime-sources.json`
6. 如需刷新 Linux 运行时,执行 `python3 tools/runtime/sync-runtime.py`(会按固定来源下载、校验归档并更新 manifest)。
6. 如需刷新 Linux / macOS 运行时,执行 `python3 tools/runtime/sync-runtime.py --target <target>`(会按固定来源下载、校验归档并更新 manifest)。
开发模式说明:
@@ -163,6 +166,17 @@ bash publish/linux/publish-linux.sh --arch arm64
详细说明见 [publish/linux/README.md](publish/linux/README.md)。
### macOS unsigned 发布打包(源码)
macOS 发布脚本位于 `publish/mac/`,必须在原生 macOS 主机上执行,且目标架构需与主机架构一致。
```bash
bash publish/mac/publish-mac.sh --arch amd64
bash publish/mac/publish-mac.sh --arch arm64
```
脚本会生成 unsigned `.app``.zip`,适合 PR 验证与内部测试。详细说明见 [publish/mac/README.md](publish/mac/README.md)。
### 准备浏览器内核
代理运行时已经随仓库提供,你只需要准备浏览器内核。