-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathPackage.swift
More file actions
40 lines (37 loc) · 1.36 KB
/
Copy pathPackage.swift
File metadata and controls
40 lines (37 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// swift-tools-version: 5.9
//
// RaTeX — Native Apple LaTeX rendering via CoreGraphics + CoreText.
//
// Development (local):
// 1. Run `bash scripts/build-apple-xcframework.sh` to produce an iOS + macOS RaTeX.xcframework
// 2. Add this package locally in Xcode via File → Add Package Dependencies → Add Local…
//
// Published releases use a remote binaryTarget (url + checksum).
// The CI workflow substitutes the path: target below before tagging a release.
import PackageDescription
let package = Package(
name: "RaTeX",
platforms: [.iOS(.v14), .macOS(.v14)],
products: [
.library(name: "RaTeX", targets: ["RaTeX"]),
],
targets: [
// Pre-built XCFramework - iOS + macOS build entry:
// `bash scripts/build-apple-xcframework.sh`.
// In published releases this is replaced with a remote url + checksum target.
.binaryTarget(
name: "RaTeXFFI",
path: "platforms/ios/RaTeX.xcframework"
),
// Swift wrapper: rendering, font loading, UIKit/AppKit/SwiftUI views.
.target(
name: "RaTeX",
dependencies: ["RaTeXFFI"],
path: "platforms/ios/Sources/Ratex",
resources: [
// KaTeX 字体随包内置,ensureLoaded()/loadFromPackageBundle() 开箱即用
.copy("Fonts"),
]
),
]
)