Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions FIPSDPackage/Sources/FIPSDFeature/EngineClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ struct EngineClient: Sendable {
let executableURL: URL

static func bundled() throws -> Self {
// SwiftPM's `.process(...)` resource rule preserves the `Resources/bin`
// and `bin` subdirectories when building via `swift build`/`swift test`,
// but Xcode's resource-processing build phase flattens the same
// resource straight into the bundle's Resources root when building the
// .app target — so the lookup falls back to a subdirectory-less search.
guard let url = Bundle.module.url(
forResource: "fips-wind-tunnel",
withExtension: nil,
Expand All @@ -29,6 +34,9 @@ struct EngineClient: Sendable {
forResource: "fips-wind-tunnel",
withExtension: nil,
subdirectory: "bin"
) ?? Bundle.module.url(
forResource: "fips-wind-tunnel",
withExtension: nil
) else { throw EngineClientError.executableMissing }
return Self(executableURL: url)
}
Expand Down
Loading