mirror of
https://github.com/jlengrand/5GUIs-1.git
synced 2026-03-10 08:01:25 +00:00
QtCore.framework is a reasonable heuristic for detecting Qt
This commit is contained in:
@@ -30,6 +30,7 @@ struct ExecutableFileTechnologyInfo: Equatable {
|
||||
static let swiftui = DetectedTechnologies(rawValue: 1 << 3)
|
||||
static let uikit = DetectedTechnologies(rawValue: 1 << 4)
|
||||
static let appkit = DetectedTechnologies(rawValue: 1 << 5)
|
||||
static let qt = DetectedTechnologies(rawValue: 1 << 6)
|
||||
|
||||
static let objc = DetectedTechnologies(rawValue: 1 << 10)
|
||||
static let swift = DetectedTechnologies(rawValue: 1 << 11)
|
||||
@@ -57,6 +58,7 @@ extension ExecutableFileTechnologyInfo.DetectedTechnologies {
|
||||
if check(.appkit, "AppKit.framework") { continue }
|
||||
if check(.swiftui, "SwiftUI.framework") { continue }
|
||||
if check(.uikit, "UIKit.framework") { continue }
|
||||
if check(.qt, "QtCore.framework") { continue }
|
||||
|
||||
if check(.cplusplus, "libc++") { continue }
|
||||
if check(.objc, "libobjc") { continue }
|
||||
|
||||
@@ -59,6 +59,9 @@ fileprivate struct Texts {
|
||||
|
||||
static let java =
|
||||
"Java. An actual app built using Java. Charles, is this you?"
|
||||
|
||||
static let qt =
|
||||
"Qt. Anything can happen. Run."
|
||||
}
|
||||
|
||||
fileprivate extension ExecutableFileTechnologyInfo {
|
||||
@@ -94,6 +97,10 @@ fileprivate extension ExecutableFileTechnologyInfo {
|
||||
return Texts.swiftui
|
||||
}
|
||||
|
||||
if features(.qt) {
|
||||
return Texts.qt
|
||||
}
|
||||
|
||||
if features(.appkit) {
|
||||
if features(.swift) { return Texts.appKitSwift }
|
||||
return Texts.appKitObjC
|
||||
|
||||
Reference in New Issue
Block a user