- Package.swift: 重构为 MiniPlayerCore(共享库) + MiniPlayer(macOS) + MiniPlayeriOS(iOS) 三 target - 所有源文件添加 #if os(macOS) / #if os(iOS) 条件编译 - HLSRecorder.swift: iOS 纯 Swift HLS 录制器(下载TS+合并+AVAssetExportSession转MP4) - scripts/build-macos.sh: macOS 打包脚本 (.app + .dmg) - scripts/build-ios.sh: iOS 打包脚本 (xcodegen + xcodebuild archive → .ipa) - .gitignore: 排除构建产物
37 lines
1001 B
Swift
37 lines
1001 B
Swift
// swift-tools-version:5.9
|
|
import PackageDescription
|
|
|
|
let package = Package(
|
|
name: "MiniPlayer",
|
|
defaultLocalization: "en",
|
|
platforms: [
|
|
.iOS(.v17),
|
|
.macOS(.v14)
|
|
],
|
|
dependencies: [
|
|
.package(path: "../swiftbricks"),
|
|
.package(path: "../StreamRecorder")
|
|
],
|
|
targets: [
|
|
.target(
|
|
name: "MiniPlayerCore",
|
|
dependencies: [
|
|
.product(name: "SwiftBricks", package: "swiftbricks"),
|
|
.product(name: "StreamRecorderKit", package: "StreamRecorder", condition: .when(platforms: [.macOS]))
|
|
],
|
|
path: "Sources",
|
|
resources: [.process("Resources")]
|
|
),
|
|
.executableTarget(
|
|
name: "MiniPlayer",
|
|
dependencies: ["MiniPlayerCore"],
|
|
path: "SourcesMac"
|
|
),
|
|
.executableTarget(
|
|
name: "MiniPlayeriOS",
|
|
dependencies: ["MiniPlayerCore"],
|
|
path: "SourcesiOS"
|
|
)
|
|
]
|
|
)
|