Skip to content

Run Windows games on Apple Silicon — free, open source, with an open compatibility database that tells you what actually works.

chore: retire leftover 'gin' naming from the pre-rename era

Gauthier Piarrettecb531e8c0434
diff --git a/Package.swift b/Package.swift
index 42fade4..c56b331 100644
--- a/Package.swift
+++ b/Package.swift
@@ -24,6 +24,6 @@ let package = Package(
dependencies: ["HighballKit", .product(name: "Sparkle", package: "Sparkle")],
path: "Sources/HighballApp",
linkerSettings: [.unsafeFlags(["-Xlinker", "-rpath", "-Xlinker", "@executable_path/../Frameworks"])]),
- .testTarget(name: "HighballKitTests", dependencies: ["HighballKit"], path: "Tests/GinKitTests"),
+ .testTarget(name: "HighballKitTests", dependencies: ["HighballKit"], path: "Tests/HighballKitTests"),
]
)
diff --git a/Sources/HighballKit/Bottle.swift b/Sources/HighballKit/Bottle.swift
index 9cf0369..e8a65c9 100644
--- a/Sources/HighballKit/Bottle.swift
+++ b/Sources/HighballKit/Bottle.swift
@@ -4,7 +4,7 @@ import Foundation
public enum Renderer: String, Codable, CaseIterable, Sendable {
/// Wine's own D3D-on-OpenGL. Slow; last resort.
case wined3d
- /// D3D10/11 → Metal. Gin's default.
+ /// D3D10/11 → Metal. Highball's default.
case dxmt
/// Apple's D3D11/12 → Metal. Only D3D12 path. Apple-licensed, optional download.
case d3dmetal
@@ -114,7 +114,7 @@ public enum ArgumentLine {
}
}
-/// Persisted as `<bottle>/gin.json`.
+/// Persisted as `<bottle>/bottle.json` (older bottles: `gin.json`, still read as a fallback).
public struct BottleSettings: Codable, Sendable {
public var formatVersion: Int = 1
public var name: String
@@ -182,12 +182,12 @@ public struct Bottle: Sendable {
let legacy = url.appending(path: "gin.json")
let file = FileManager.default.fileExists(atPath: modern.path) ? modern : legacy
let data = try Data(contentsOf: file)
- let settings = try JSONDecoder.gin.decode(BottleSettings.self, from: data)
+ let settings = try JSONDecoder.highball.decode(BottleSettings.self, from: data)
return Bottle(url: url, settings: settings)
}
public func save() throws {
- try JSONEncoder.gin.encode(settings).write(to: settingsURL, options: .atomic)
+ try JSONEncoder.highball.encode(settings).write(to: settingsURL, options: .atomic)
}
/// Environment for running something in this bottle: engine base + bottle settings + renderer + extras.
@@ -243,7 +243,7 @@ public struct Bottle: Sendable {
}
extension JSONEncoder {
- static var gin: JSONEncoder {
+ static var highball: JSONEncoder {
let e = JSONEncoder()
e.outputFormatting = [.prettyPrinted, .sortedKeys, .withoutEscapingSlashes]
e.dateEncodingStrategy = .iso8601
@@ -252,7 +252,7 @@ extension JSONEncoder {
}
extension JSONDecoder {
- static var gin: JSONDecoder {
+ static var highball: JSONDecoder {
let d = JSONDecoder()
d.dateDecodingStrategy = .iso8601
return d
diff --git a/Sources/HighballKit/BottleStore.swift b/Sources/HighballKit/BottleStore.swift
index fc8c477..9e9a717 100644
--- a/Sources/HighballKit/BottleStore.swift
+++ b/Sources/HighballKit/BottleStore.swift
@@ -44,7 +44,7 @@ public struct BottleStore: Sendable {
return nil
}
- /// Creates the directory + gin.json, then runs `wineboot -u` to populate the prefix.
+ /// Creates the directory + bottle.json, then runs `wineboot -u` to populate the prefix.
public func create(name rawName: String, engine: InstalledEngine, renderer: Renderer = .dxmt, windowsVersion: WindowsVersion = .win10) async throws -> Bottle {
let name = rawName.trimmingCharacters(in: .whitespaces)
if let problem = Self.nameProblem(name) { throw HighballError.invalid(problem) }
diff --git a/Sources/HighballKit/Recipe.swift b/Sources/HighballKit/Recipe.swift
index 50fcd81..6aeaa29 100644
--- a/Sources/HighballKit/Recipe.swift
+++ b/Sources/HighballKit/Recipe.swift
@@ -93,7 +93,7 @@ public struct Recipe: Codable, Sendable, Identifiable {
public var lastVerified: Verification?
public static func load(from url: URL) throws -> Recipe {
- try JSONDecoder.gin.decode(Recipe.self, from: Data(contentsOf: url))
+ try JSONDecoder.highball.decode(Recipe.self, from: Data(contentsOf: url))
}
}
diff --git a/Sources/highball/main.swift b/Sources/highball/main.swift
index 0f065c4..7a306fb 100644
--- a/Sources/highball/main.swift
+++ b/Sources/highball/main.swift
@@ -17,7 +17,7 @@ func fail(_ message: String) -> Never {
exit(1)
}
-// MARK: - gin engine
+// MARK: - highball engine
struct Engine: AsyncParsableCommand {
static let configuration = CommandConfiguration(abstract: "Manage engines (Wine + renderers).", subcommands: [List.self, Install.self, Accept.self])
@@ -67,7 +67,7 @@ struct Engine: AsyncParsableCommand {
}
}
-// MARK: - gin bottle
+// MARK: - highball bottle
struct Bottle: AsyncParsableCommand {
static let configuration = CommandConfiguration(abstract: "Manage bottles (Wine prefixes).", subcommands: [List.self, Create.self, Delete.self, Set.self, Kill.self, Duplicate.self, Repair.self])
@@ -186,9 +186,9 @@ struct Bottle: AsyncParsableCommand {
}
}
-// MARK: - gin run
+// MARK: - highball run
-// MARK: - gin pin
+// MARK: - highball pin
struct PinCommand: AsyncParsableCommand {
static let configuration = CommandConfiguration(
@@ -288,7 +288,7 @@ struct Run: AsyncParsableCommand {
}
}
-// MARK: - gin recipe
+// MARK: - highball recipe
struct Recipe: AsyncParsableCommand {
static let configuration = CommandConfiguration(abstract: "Apply a recipe to a bottle.", subcommands: [Apply.self, Show.self])
@@ -316,7 +316,7 @@ struct Recipe: AsyncParsableCommand {
}
}
-// MARK: - gin env
+// MARK: - highball env
struct Env: AsyncParsableCommand {
static let configuration = CommandConfiguration(abstract: "Print the environment Gin would use for a bottle (for debugging or a terminal session).")
diff --git a/SteamLibrary.swiftdeps~ b/SteamLibrary.swiftdeps~
new file mode 100644
index 0000000..3e38a1e
Binary files /dev/null and b/SteamLibrary.swiftdeps~ differ
diff --git a/Tests/GinKitTests/ArgumentLineTests.swift b/Tests/HighballKitTests/ArgumentLineTests.swift
similarity index 100%
rename from Tests/GinKitTests/ArgumentLineTests.swift
rename to Tests/HighballKitTests/ArgumentLineTests.swift
diff --git a/Tests/GinKitTests/BottleTests.swift b/Tests/HighballKitTests/BottleTests.swift
similarity index 92%
rename from Tests/GinKitTests/BottleTests.swift
rename to Tests/HighballKitTests/BottleTests.swift
index 242bde7..1d867cc 100644
--- a/Tests/GinKitTests/BottleTests.swift
+++ b/Tests/HighballKitTests/BottleTests.swift
@@ -12,8 +12,8 @@ final class BottleTests: XCTestCase {
var s = BottleSettings(name: "play", engineID: "x64-test")
s.pins = [Pin(name: "Steam", path: "Program Files (x86)/Steam/steam.exe", renderer: .dxmt)]
s.environment["FOO"] = "bar"
- let data = try JSONEncoder.gin.encode(s)
- let back = try JSONDecoder.gin.decode(BottleSettings.self, from: data)
+ let data = try JSONEncoder.highball.encode(s)
+ let back = try JSONDecoder.highball.decode(BottleSettings.self, from: data)
XCTAssertEqual(back.pins.first?.name, "Steam")
XCTAssertEqual(back.environment["FOO"], "bar")
XCTAssertEqual(back.renderer, .dxmt)
@@ -26,7 +26,7 @@ final class BottleTests: XCTestCase {
{"type":"note","text":"hello"},
{"type":"renderer","renderer":"d3dmetal"}]}
"""
- let r = try JSONDecoder.gin.decode(Recipe.self, from: Data(json.utf8))
+ let r = try JSONDecoder.highball.decode(Recipe.self, from: Data(json.utf8))
XCTAssertEqual(r.steps.count, 3)
if case let .registry(key, _, _, _) = r.steps[0] { XCTAssertEqual(key, "HKCU\\Software\\X") } else { XCTFail() }
}
diff --git a/Tests/GinKitTests/EnvironmentTests.swift b/Tests/HighballKitTests/EnvironmentTests.swift
similarity index 100%
rename from Tests/GinKitTests/EnvironmentTests.swift
rename to Tests/HighballKitTests/EnvironmentTests.swift
diff --git a/Tests/GinKitTests/RecipeDBTests.swift b/Tests/HighballKitTests/RecipeDBTests.swift
similarity index 92%
rename from Tests/GinKitTests/RecipeDBTests.swift
rename to Tests/HighballKitTests/RecipeDBTests.swift
index 676ffe5..b391c3d 100644
--- a/Tests/GinKitTests/RecipeDBTests.swift
+++ b/Tests/HighballKitTests/RecipeDBTests.swift
@@ -23,7 +23,7 @@ final class RecipeDBTests: XCTestCase {
guard let files = try? FileManager.default.contentsOfDirectory(at: dir, includingPropertiesForKeys: nil) else { continue }
for f in files where f.pathExtension == "json" {
let r: Recipe
- do { r = try JSONDecoder.gin.decode(Recipe.self, from: Data(contentsOf: f)) }
+ do { r = try JSONDecoder.highball.decode(Recipe.self, from: Data(contentsOf: f)) }
catch { XCTFail("\(f.lastPathComponent) failed to decode: \(error)"); continue }
XCTAssertFalse(r.id.isEmpty, f.lastPathComponent)
XCTAssertFalse(r.title.isEmpty, f.lastPathComponent)
@@ -47,7 +47,7 @@ final class RecipeDBTests: XCTestCase {
for f in try FileManager.default.contentsOfDirectory(at: dir, includingPropertiesForKeys: nil)
where f.pathExtension == "json" {
do {
- let e = try JSONDecoder.gin.decode(GameDBEntry.self, from: Data(contentsOf: f))
+ let e = try JSONDecoder.highball.decode(GameDBEntry.self, from: Data(contentsOf: f))
XCTAssertFalse(e.id.isEmpty, f.lastPathComponent)
XCTAssertTrue(["verified-local", "reported-upstream", "community", "blocked-anticheat"].contains(e.status),
"\(f.lastPathComponent): unknown status '\(e.status)'")
@@ -66,7 +66,7 @@ final class RecipeDBTests: XCTestCase {
guard FileManager.default.fileExists(atPath: f.path) else {
throw XCTSkip("highball-db checkout not found next to the repo")
}
- let r = try JSONDecoder.gin.decode(Recipe.self, from: Data(contentsOf: f))
+ let r = try JSONDecoder.highball.decode(Recipe.self, from: Data(contentsOf: f))
let installers = r.steps.compactMap { step -> URL? in
if case let .installer(url, _, _, _) = step { return url } else { return nil }
}
diff --git a/Tests/GinKitTests/RegressionTests.swift b/Tests/HighballKitTests/RegressionTests.swift
similarity index 96%
rename from Tests/GinKitTests/RegressionTests.swift
rename to Tests/HighballKitTests/RegressionTests.swift
index 3dd0871..2eace2e 100644
--- a/Tests/GinKitTests/RegressionTests.swift
+++ b/Tests/HighballKitTests/RegressionTests.swift
@@ -42,7 +42,7 @@ final class RegressionTests: XCTestCase {
// Decoding must fill defaults, never throw (an early 0.5.x crashed on this class).
func testSettingsDecodeFromOldVersion() throws {
let old = #"{"formatVersion":1,"name":"aged","engineID":"x64-test","renderer":"dxmt","windowsVersion":"win10","sync":"msync","metalHUD":false,"advertiseAVX":false,"pins":[{"id":"6B1F0D2A-0000-4000-8000-000000000001","name":"Steam","path":"Program Files (x86)/Steam/steam.exe"}],"environment":{},"recipes":[]}"#
- let s = try JSONDecoder.gin.decode(BottleSettings.self, from: Data(old.utf8))
+ let s = try JSONDecoder.highball.decode(BottleSettings.self, from: Data(old.utf8))
XCTAssertEqual(s.name, "aged")
XCTAssertEqual(s.retinaMode, false, "field added in 0.7.x must default off")
XCTAssertEqual(s.dllOverrides, "", "field added in 0.7.2 must default empty")
@@ -85,7 +85,7 @@ final class RegressionTests: XCTestCase {
p.arguments = ["-dx11", #"C:\a b\cfg"#]
p.environment = ["WINE_SIMULATE_WRITECOPY": "1"]
p.renderer = .dxvk
- let back = try JSONDecoder.gin.decode(Pin.self, from: JSONEncoder.gin.encode(p))
+ let back = try JSONDecoder.highball.decode(Pin.self, from: JSONEncoder.highball.encode(p))
XCTAssertEqual(back, p)
}
}
diff --git a/Verifier.swiftdeps~ b/Verifier.swiftdeps~
new file mode 100644
index 0000000..d418057
Binary files /dev/null and b/Verifier.swiftdeps~ differ
diff --git a/spike/engine-manifest.json b/spike/engine-manifest.json
index 72f8ac0..9716311 100644
--- a/spike/engine-manifest.json
+++ b/spike/engine-manifest.json
@@ -1,5 +1,5 @@
{
- "$schema": "https://gin.app/schemas/engine-manifest/v0",
+ "$schema": "https://highball.app/schemas/engine-manifest/v0",
"id": "x64-sikarugir10.0_6-r0",
"displayName": "Wine 10.0 (Sikarugir) + DXMT 0.80 + D3DMetal 3.0",
"arch": "x86_64",