mirror of
https://github.com/shadowsocks/ShadowsocksX-NG.git
synced 2026-11-22 13:34:00 +00:00
172 lines
6.4 KiB
YAML
172 lines
6.4 KiB
YAML
name: ShadowsocksX-NG2
|
||
options:
|
||
createIntermediateGroups: true
|
||
developmentLanguage: zh-Hans
|
||
deploymentTarget:
|
||
macOS: "15.0"
|
||
settings:
|
||
base:
|
||
ARCHS: arm64
|
||
SWIFT_VERSION: "6.0"
|
||
CODE_SIGN_STYLE: Manual
|
||
DEVELOPMENT_TEAM: S878RH3PA8
|
||
ENABLE_HARDENED_RUNTIME: YES
|
||
configs:
|
||
Release:
|
||
# 发布基线:签名 entitlements 必须只来自项目 entitlements 文件(保持最小)。
|
||
CODE_SIGN_INJECT_BASE_ENTITLEMENTS: NO
|
||
targets:
|
||
ShadowsocksX-NG2:
|
||
type: application
|
||
platform: macOS
|
||
sources:
|
||
- path: App
|
||
# 领域核心:配置目录树、凭据引用与持久化(spec #21 D3/D5)
|
||
- path: Domain
|
||
# LaunchAgent 注册清单:SMAppService.agent(plistName:) 从 bundle 内
|
||
# Contents/Library/LaunchAgents/ 读取;ProgramArguments 用 bundle 相对路径
|
||
# (spec #21 D2,issue #27)。
|
||
- path: LaunchAgent/com.qiuyuzhou.ShadowsocksX-NG2.agent.plist
|
||
buildPhase:
|
||
copyFiles:
|
||
destination: wrapper
|
||
subpath: Contents/Library/LaunchAgents
|
||
# 外部二进制(Vendor/<name>/manifest.json 固定 tag+URL+SHA-256)。必须先跑
|
||
# Scripts/fetch-external-binaries.sh 再 xcodegen generate:文件在生成时必须已存在,
|
||
# 否则 Copy Files 阶段会被静默丢弃。构建内的 preBuildScripts 只做增量复验,
|
||
# 哈希或清单漂移会在构建时失败。
|
||
- path: Vendor/sslocal/sslocal
|
||
buildPhase:
|
||
copyFiles:
|
||
destination: wrapper
|
||
subpath: Contents/Helpers
|
||
- path: Vendor/v2ray-plugin/v2ray-plugin
|
||
buildPhase:
|
||
copyFiles:
|
||
destination: wrapper
|
||
subpath: Contents/Helpers/Plugins
|
||
# 内置规则快照(issue #63/#64):普通构建只读本地已固定快照,离线且不重新
|
||
# 抓取或转换;缺失、损坏或版本不匹配时 verify-rule-snapshots.sh 使构建失败。
|
||
# folder reference 保留 rules/<source>/snapshot.json 结构,避免多个
|
||
# snapshot.json 在 bundle 根目录撞名。
|
||
- path: Vendor/rules
|
||
buildPhase: resources
|
||
type: folder
|
||
preBuildScripts:
|
||
- name: Fetch & verify external binaries
|
||
basedOnDependencyAnalysis: false
|
||
script: |
|
||
set -e
|
||
"$SRCROOT/Scripts/fetch-external-binaries.sh"
|
||
- name: Verify rule snapshots
|
||
basedOnDependencyAnalysis: false
|
||
script: |
|
||
set -e
|
||
"$SRCROOT/Scripts/verify-rule-snapshots.sh"
|
||
postBuildScripts:
|
||
# 必须在 app 自身签名之前逐二进制 DevID 重签;Xcode 在所有脚本阶段之后
|
||
# 完成 app 外层签名,封存重签后的嵌套代码。
|
||
- name: Sign embedded helpers
|
||
basedOnDependencyAnalysis: false
|
||
script: |
|
||
set -e
|
||
"$SRCROOT/Scripts/sign-embedded-helpers.sh"
|
||
settings:
|
||
base:
|
||
PRODUCT_BUNDLE_IDENTIFIER: com.qiuyuzhou.ShadowsocksX-NG2
|
||
PRODUCT_NAME: ShadowsocksX-NG2
|
||
CODE_SIGN_IDENTITY: "Developer ID Application"
|
||
ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon
|
||
MARKETING_VERSION: "2.0.0"
|
||
# 必须 > 旧版 1.x 已发布构建的 CFBundleVersion(始终为 1),保证 build 号严格递增。
|
||
CURRENT_PROJECT_VERSION: 2
|
||
info:
|
||
path: App/Info.plist
|
||
properties:
|
||
CFBundleShortVersionString: $(MARKETING_VERSION)
|
||
CFBundleVersion: $(CURRENT_PROJECT_VERSION)
|
||
LSMinimumSystemVersion: "15.0"
|
||
LSUIElement: true
|
||
NSPrincipalClass: NSApplication
|
||
LSApplicationCategoryType: public.app-category.utilities
|
||
entitlements:
|
||
path: App/ShadowsocksX-NG2.entitlements
|
||
properties: {}
|
||
scheme:
|
||
testTargets:
|
||
- ShadowsocksX-NG2Tests
|
||
dependencies:
|
||
# 代理运行时 wrapper(BundleProgram,spec #21 D2):以独立可执行文件装入
|
||
# Contents/MacOS,由 LaunchAgent plist 以 bundle 相对路径引用。
|
||
- target: ShadowsocksX-NG2Agent
|
||
copy:
|
||
destination: wrapper
|
||
subpath: Contents/MacOS
|
||
ShadowsocksX-NG2Agent:
|
||
type: tool
|
||
platform: macOS
|
||
sources:
|
||
- path: Agent
|
||
# wrapper 与 GUI 共享的跨进程契约:路径常量、运行时文档(含读取侧校验)
|
||
# 与日志事件基线(spec #21 D5);监听建立判定复用端点探测(issue #38)。
|
||
- path: Domain/RuntimePaths.swift
|
||
- path: Domain/AtomicFileWriter.swift
|
||
- path: Domain/ProxyACL.swift
|
||
- path: Domain/ProxyRule.swift
|
||
- path: Domain/RuleSet.swift
|
||
- path: Domain/SslocalRuntimeDocument.swift
|
||
- path: Domain/SslocalListenSettings.swift
|
||
- path: Domain/RuntimeLog.swift
|
||
- path: Domain/EndpointHealthProbe.swift
|
||
- path: Domain/RuntimeSocketOwnershipProbe.swift
|
||
settings:
|
||
base:
|
||
PRODUCT_NAME: ShadowsocksX-NG2Agent
|
||
PRODUCT_BUNDLE_IDENTIFIER: com.qiuyuzhou.ShadowsocksX-NG2.agent
|
||
CODE_SIGN_IDENTITY: "Developer ID Application"
|
||
ShadowsocksX-NG2Tests:
|
||
type: bundle.unit-test
|
||
platform: macOS
|
||
sources:
|
||
- path: Tests
|
||
# 真实进程冒烟归 SmokeTests target,不进默认 task test 快车道。
|
||
excludes:
|
||
- "Smoke"
|
||
settings:
|
||
base:
|
||
PRODUCT_BUNDLE_IDENTIFIER: com.qiuyuzhou.ShadowsocksX-NG2.Tests
|
||
# 必须与宿主 app 同 Team 签名:Hardened Runtime 的 library validation 拒绝
|
||
# 加载不同 Team ID 的非平台库,ad-hoc("-")签名的 xctest 包无法注入。
|
||
CODE_SIGN_IDENTITY: "Apple Development"
|
||
info:
|
||
path: Tests/Info.plist
|
||
properties: {}
|
||
dependencies:
|
||
- target: ShadowsocksX-NG2
|
||
ShadowsocksX-NG2SmokeTests:
|
||
type: bundle.unit-test
|
||
platform: macOS
|
||
sources:
|
||
- path: Tests/Smoke
|
||
settings:
|
||
base:
|
||
PRODUCT_BUNDLE_IDENTIFIER: com.qiuyuzhou.ShadowsocksX-NG2.SmokeTests
|
||
# 同 Team 签名理由同 ShadowsocksX-NG2Tests。
|
||
CODE_SIGN_IDENTITY: "Apple Development"
|
||
info:
|
||
path: Tests/Smoke/Info.plist
|
||
properties: {}
|
||
dependencies:
|
||
- target: ShadowsocksX-NG2
|
||
schemes:
|
||
# 真实进程冒烟独立 scheme(task test:smoke):拉起真实 sslocal,按需执行;
|
||
# 发布门槛要求与 packaging-gate 一起全绿。
|
||
ShadowsocksX-NG2Smoke:
|
||
build:
|
||
targets:
|
||
ShadowsocksX-NG2: [run, test]
|
||
ShadowsocksX-NG2SmokeTests: [test]
|
||
test:
|
||
targets:
|
||
- ShadowsocksX-NG2SmokeTests
|