- scripts/fetch-argyll.sh: POSIX sh port of fetch-argyll.mjs; queries
the Gitea release API for the *_macOS_universal_bin.tgz asset,
extracts Argyll_V*/bin, chmod+x, strips quarantine xattr; honors
ARGYLL_SERVER_URL / ARGYLL_REPO / ARGYLL_RELEASE_TAG / GITEA_TOKEN.
Verified end-to-end: 51 universal tools from v3.5.0-ICCery1.8.
- BinaryResolver: settings argyll_binary_dir override (existence-gated)
→ bundled Argyll/<platform>/, macos-universal preferred when instlist
marker present, else macos-arm64/macos-x86_64; constructed path
returned even when absent (spawn surfaces process:error). Mock and
reference-gamut helpers.
- Vendored tracked resources: mocks/{chartread,colprof,profcheck}.mock
+ reference_gamuts/sRGB.gam from ICCery v1, copied as a folder
reference so the Argyll/ subtree structure survives into the bundle.
- Build phase rsyncs Vendor/Argyll/ → Contents/Resources/Argyll/.
- AppDelegate: killAll via terminateLater so children are signaled
before teardown (#147/#149).
- 6 resolver tests + fetch script smoke-verified against real release.
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
44 lines
1.5 KiB
Swift
44 lines
1.5 KiB
Swift
import AppKit
|
||
import ICCeryCore
|
||
import SwiftUI
|
||
|
||
@main
|
||
struct ICCeryApp: App {
|
||
@NSApplicationDelegateAdaptor(AppDelegate.self) private var appDelegate
|
||
@State private var model = WizardViewModel()
|
||
|
||
var body: some Scene {
|
||
// Single fixed window (docs/21 §Shell: 1280×800, min 1100×700).
|
||
Window("ICCery", id: "main") {
|
||
RootView(model: model)
|
||
.frame(minWidth: 1100, minHeight: 700)
|
||
.preferredColorScheme(.dark)
|
||
}
|
||
.defaultSize(width: 1280, height: 800)
|
||
.windowResizability(.contentMinSize)
|
||
.defaultPosition(.center)
|
||
}
|
||
}
|
||
|
||
/// AppDelegate: quit when the single window closes, and `killAll` Argyll
|
||
/// children before teardown (#147/#149). Termination is deferred until
|
||
/// `killAll` has signaled every child so `chartread` can park an XY head
|
||
/// when the UI already sent `q\n`.
|
||
final class AppDelegate: NSObject, NSApplicationDelegate {
|
||
private var terminationRequested = false
|
||
|
||
func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
|
||
true
|
||
}
|
||
|
||
func applicationShouldTerminate(_ sender: NSApplication) -> NSApplication.TerminateReply {
|
||
guard !terminationRequested else { return .terminateNow }
|
||
terminationRequested = true
|
||
Task {
|
||
await ProcessManager.shared.killAll()
|
||
NSApplication.shared.reply(toApplicationShouldTerminate: true)
|
||
}
|
||
return .terminateLater
|
||
}
|
||
}
|