mirror of
https://github.com/jlengrand/5GUIs-1.git
synced 2026-03-10 08:01:25 +00:00
44 lines
990 B
Swift
44 lines
990 B
Swift
//
|
|
// ExecutableFileTechnologyInfo.swift
|
|
// 5 GUIs
|
|
//
|
|
// Copyright © 2020 ZeeZide GmbH. All rights reserved.
|
|
//
|
|
|
|
import struct Foundation.URL
|
|
import struct SwiftUI.Image
|
|
|
|
struct ExecutableFileTechnologyInfo: Equatable {
|
|
|
|
let fileURL : URL
|
|
|
|
var infoDictionary : InfoDict?
|
|
var executableURL : URL?
|
|
var receiptURL : URL?
|
|
var appImage : Image?
|
|
var dependencies = [ String ]()
|
|
|
|
var embeddedExecutables = [ ExecutableFileTechnologyInfo ]()
|
|
|
|
var detectedTechnologies : DetectedTechnologies = []
|
|
}
|
|
|
|
extension ExecutableFileTechnologyInfo {
|
|
// View layer stuff, doesn't really belong here
|
|
|
|
var appName : String {
|
|
infoDictionary?.displayName
|
|
?? infoDictionary?.name
|
|
?? executableURL?.lastPathComponent
|
|
?? "???"
|
|
}
|
|
|
|
var embeddedTechnologies : DetectedTechnologies {
|
|
var techs = DetectedTechnologies()
|
|
for info in embeddedExecutables {
|
|
techs.formUnion(info.detectedTechnologies)
|
|
}
|
|
return techs
|
|
}
|
|
}
|