Three things were wrong with the host-card OS icons. The Windows mark was Font Awesome 5's, which is still the Windows 8/10 flag with the perspective skew — dated next to the flat four-pane mark Microsoft has shipped since Windows 11. No icon set has the current one (Simple Icons carries no windows/microsoft slug at all), so it is drawn here: four equal squares at the authentic 11.377 + 1.246 proportion. The Decky plugin was pulling FaWindows straight from react-icons, so it now inlines the masters like the web console does, or it would have kept the old flag regardless. Bazzite, CachyOS and Nobara collapsed onto their family's mark. The host already advertises the full chain, so this is purely missing art: all three now ship a leaf mark, because "a Bazzite box" and "a Fedora box" are different machines to the person reading the card. CachyOS and Nobara come from Simple Icons; Bazzite has no icon anywhere, so its "b" is lifted out of the project's own badge (Apache-2.0, attributed). On Android every non-square mark was stretched. A VectorPainter maps the viewport onto the ImageVector's default size with independent x and y scales, so declaring a 448x512 Tux as 24x24 dp squashed it — silently, no crash, no warning. The longest viewport edge now sets the 24 dp box and the other follows the ratio, which is what Icon()'s ContentScale.Fit expects. A unit test pins the invariant; every other client was already correct. Also: scripts/gen-os-icons.sh replaces the undocumented hand-run pipeline that turns a master into the GTK symbolic SVG, the Windows PNG and the Apple template PDF. It reproduces the committed artifacts byte-identically. Verified: web and Decky typecheck, Decky bundles, Android compiles and its tests pass, PunktfunkKit builds, osinfo's tests pass. Not verified on glass, and the GTK/Windows client crates do not build on macOS. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
68 lines
3.8 KiB
Swift
68 lines
3.8 KiB
Swift
// swift-tools-version: 5.9
|
|
// PunktfunkKit — Swift wrapper around the punktfunk-core C ABI (punktfunk/1 client connector) plus the
|
|
// SwiftUI/VideoToolbox presentation layer. Build PunktfunkCore.xcframework first:
|
|
// bash ../../scripts/build-xcframework.sh (on a Mac; see README.md)
|
|
import PackageDescription
|
|
|
|
let package = Package(
|
|
name: "PunktfunkKit",
|
|
platforms: [.macOS(.v14), .iOS(.v17), .tvOS(.v17)],
|
|
products: [
|
|
.library(name: "PunktfunkKit", targets: ["PunktfunkKit"]),
|
|
// Dependency-free foundation (stored-host model + JSON codec, settings keys, App-Group
|
|
// constant, deep-link grammar, Live Activity attributes). A separate PRODUCT so the widget
|
|
// extension — which must never link PunktfunkKit (Rust staticlib + presentation layer) —
|
|
// can link this and nothing else. PunktfunkKit re-exports it (see SharedReexport.swift).
|
|
.library(name: "PunktfunkShared", targets: ["PunktfunkShared"]),
|
|
.executable(name: "PunktfunkClient", targets: ["PunktfunkClient"]),
|
|
],
|
|
targets: [
|
|
.binaryTarget(name: "PunktfunkCore", path: "PunktfunkCore.xcframework"),
|
|
// No dependencies by design — an extension process links this alone.
|
|
.target(name: "PunktfunkShared"),
|
|
.target(
|
|
name: "PunktfunkKit",
|
|
dependencies: ["PunktfunkCore", "PunktfunkShared"],
|
|
// OSS attribution shown by the app's Acknowledgements screen. Bundled here (not in the
|
|
// app target) so it rides along via Bundle.module in both `swift build` and the Xcode
|
|
// app, which links the PunktfunkKit product. Refresh with
|
|
// scripts/gen-third-party-notices.sh (it copies the generated file into Resources/).
|
|
resources: [
|
|
.copy("Resources/THIRD-PARTY-NOTICES.txt"),
|
|
.copy("Resources/LICENSE-MIT.txt"),
|
|
.copy("Resources/LICENSE-APACHE.txt"),
|
|
// Geist (SIL OFL 1.1) — the brand typeface, shared with punktfunk-website.
|
|
// Registered with Core Text at first use; see BrandFont.swift.
|
|
.copy("Resources/Fonts"),
|
|
// The host cards' OS marks (template vector imagesets generated from the
|
|
// assets/os-icons masters by scripts/gen-os-icons.sh — per-mark provenance and
|
|
// licensing in that README). `.process` compiles the catalog; loaded via
|
|
// OsIcon.swift.
|
|
.process("Resources/OsIcons.xcassets"),
|
|
],
|
|
linkerSettings: [
|
|
// Rust staticlib system deps.
|
|
.linkedFramework("Security"),
|
|
.linkedFramework("SystemConfiguration"),
|
|
.linkedLibrary("resolv"),
|
|
]
|
|
),
|
|
// Development app shell (swift run PunktfunkClient): connect form → stream + input.
|
|
// (The tvOS slide-transition package is referenced by the Xcode PROJECT only —
|
|
// its manifest breaks SwiftPM whole-graph validation on macOS, and only the
|
|
// Punktfunk-tvOS target links it; the #if os(tvOS) import never compiles here.)
|
|
.executableTarget(name: "PunktfunkClient", dependencies: ["PunktfunkKit"]),
|
|
// PunktfunkCore is a direct dep too so the wire tests can name the C ABI's
|
|
// `PunktfunkInputEvent` / `PUNKTFUNK_INPUT_KIND_*` when asserting the gamepad byte layout.
|
|
.testTarget(
|
|
name: "PunktfunkKitTests",
|
|
dependencies: ["PunktfunkKit", "PunktfunkShared", "PunktfunkCore"],
|
|
resources: [
|
|
// PyroWave golden fixtures: host-encoded AUs + upstream-decoded reference
|
|
// planes (regenerate with punktfunk-host's `pyrowave_dump_golden` on a
|
|
// Vulkan box — see PyroWaveDecoderTests.swift).
|
|
.copy("PyroWaveFixtures")
|
|
]),
|
|
]
|
|
)
|