mirror of
https://github.com/XcodesOrg/XcodesApp.git
synced 2026-03-25 08:55:46 +00:00
24 lines
513 B
Swift
24 lines
513 B
Swift
import AppKit
|
|
import Foundation
|
|
import Version
|
|
|
|
struct Xcode: Identifiable, CustomStringConvertible {
|
|
let version: Version
|
|
let installState: XcodeInstallState
|
|
let selected: Bool
|
|
let path: String?
|
|
let icon: NSImage?
|
|
|
|
var id: Version { version }
|
|
var installed: Bool { installState == .installed }
|
|
|
|
var description: String {
|
|
version.xcodeDescription
|
|
}
|
|
}
|
|
|
|
enum XcodeInstallState: Equatable {
|
|
case notInstalled
|
|
case installing(Progress)
|
|
case installed
|
|
}
|