Skip to content

Commit 29b0d22

Browse files
Merge pull request #662 from migueldeicaza/kitty2
Kitty2
2 parents 5fa368e + 2b2cf9d commit 29b0d22

42 files changed

Lines changed: 4456 additions & 1470 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Package.resolved

Lines changed: 20 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,19 @@ let buildInfoTargets: [Target] = [
2828
)
2929
]
3030

31+
let portableGraphicsDependencies: [Target.Dependency] = [
32+
.product(
33+
name: "PNG",
34+
package: "swift-png",
35+
condition: .when(platforms: [.linux, .windows])
36+
),
37+
.product(
38+
name: "LZ77",
39+
package: "swift-png",
40+
condition: .when(platforms: [.linux, .windows])
41+
),
42+
]
43+
3144
#if os(Windows)
3245
let products: [Product] = [
3346
.executable(name: "SwiftTermFuzz", targets: ["SwiftTermFuzz"]),
@@ -40,7 +53,7 @@ let products: [Product] = [
4053
let targets: [Target] = [
4154
.target(
4255
name: "SwiftTerm",
43-
dependencies: [],
56+
dependencies: portableGraphicsDependencies,
4457
path: "Sources/SwiftTerm",
4558
exclude: platformExcludes + ["Mac/README.md"],
4659
plugins: [
@@ -61,7 +74,8 @@ let targets: [Target] = [
6174
path: "Tests/SwiftTermTests",
6275
resources: [
6376
.copy("Fixtures/xterm-ghostty.infocmp"),
64-
.copy("Fixtures/swifterm-terminfo.infocmp")
77+
.copy("Fixtures/swifterm-terminfo.infocmp"),
78+
.copy("KittyGraphics/Fixtures")
6579
]
6680
)
6781
] + buildInfoTargets
@@ -79,6 +93,7 @@ let targets: [Target] = [
7993
.target(
8094
name: "SwiftTerm",
8195
//
96+
dependencies: portableGraphicsDependencies,
8297
// We can not use Swift Subprocess, because there is no way of configuring the child process to
8398
// be a controlling terminal, as it is posix-spawn based.
8499
// dependencies: [
@@ -117,7 +132,8 @@ let targets: [Target] = [
117132
path: "Tests/SwiftTermTests",
118133
resources: [
119134
.copy("Fixtures/xterm-ghostty.infocmp"),
120-
.copy("Fixtures/swifterm-terminfo.infocmp")
135+
.copy("Fixtures/swifterm-terminfo.infocmp"),
136+
.copy("KittyGraphics/Fixtures")
121137
]
122138
)
123139
] + buildInfoTargets
@@ -135,6 +151,7 @@ let package = Package(
135151
dependencies: [
136152
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.0.0"),
137153
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.4.3"),
154+
.package(url: "https://github.com/tayloraswift/swift-png", from: "4.5.0"),
138155
],
139156
// .package(url: "https://github.com/swiftlang/swift-subprocess", revision: "426790f3f24afa60b418450da0afaa20a8b3bdd4")
140157
targets: targets,

0 commit comments

Comments
 (0)