Files
ShadowsocksX-NG/ShadowsocksX-NG2/project.yml
T

135 lines
5.1 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: ShadowsocksX-NG2
options:
createIntermediateGroups: true
developmentLanguage: zh-Hans
deploymentTarget:
macOS: "15.0"
# Swift 包依赖:全局快捷键(spec #21 D11,issue #31)用 KeyboardShortcuts;
# 快捷键不迁移 Legacy(D12),默认键位见 App/GlobalShortcuts.swift。
packages:
KeyboardShortcuts:
url: https://github.com/sindresorhus/KeyboardShortcuts
from: 3.1.0
settings:
base:
ARCHS: arm64
SWIFT_VERSION: "5.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-NG.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
preBuildScripts:
- name: Fetch & verify external binaries
basedOnDependencyAnalysis: false
script: |
set -e
"$SRCROOT/Scripts/fetch-external-binaries.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-NG
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
# 全局快捷键(D11,issue #31):开关代理、切换模式。
- package: KeyboardShortcuts
ShadowsocksX-NG2Agent:
type: tool
platform: macOS
sources:
- path: Agent
# wrapper 与 GUI 共享的跨进程契约:路径常量、运行时文档(含读取侧校验)
# 与日志事件基线(spec #21 D5);监听建立判定复用端点探测(issue #38)。
- path: Domain/RuntimePaths.swift
- path: Domain/PACUserRules.swift
- path: Domain/SslocalRuntimeDocument.swift
- path: Domain/PACServer.swift
- path: Domain/RuntimeLog.swift
- path: Domain/EndpointHealthProbe.swift
settings:
base:
PRODUCT_NAME: ShadowsocksX-NG2Agent
PRODUCT_BUNDLE_IDENTIFIER: com.qiuyuzhou.ShadowsocksX-NG.agent
CODE_SIGN_IDENTITY: "Developer ID Application"
ShadowsocksX-NG2Tests:
type: bundle.unit-test
platform: macOS
sources:
- path: Tests
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: com.qiuyuzhou.ShadowsocksX-NG.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