From 40a8155de252ecfcd6bea31d612ad2b38e4014ba Mon Sep 17 00:00:00 2001 From: Benzi Date: Wed, 22 Mar 2023 17:38:43 +0000 Subject: [PATCH] added notarization setup --- menu/Package.swift | 10 +++++++++- menu/Sources/menu/AX.swift | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/menu/Package.swift b/menu/Package.swift index 0187309..3dee3d2 100644 --- a/menu/Package.swift +++ b/menu/Package.swift @@ -15,7 +15,15 @@ let package = Package( // Targets can depend on other targets in this package, and on products in packages this package depends on. .executableTarget( name: "menu", - dependencies: ["SwiftProtobuf"]), + dependencies: ["SwiftProtobuf"], + linkerSettings: [ + .unsafeFlags([ + "-Xlinker", "-sectcreate", + "-Xlinker", "__TEXT", + "-Xlinker", "__info_plist", + "-Xlinker", "Sources/Info.plist" + ]) + ]), .testTarget( name: "menuTests", dependencies: ["menu"]), diff --git a/menu/Sources/menu/AX.swift b/menu/Sources/menu/AX.swift index 8a96b84..fd74ff5 100644 --- a/menu/Sources/menu/AX.swift +++ b/menu/Sources/menu/AX.swift @@ -160,10 +160,10 @@ func getMenuItems( var modifiers = 0 var virtualKey = 0 if let m = getAttribute(element: child, name: kAXMenuItemCmdModifiersAttribute) { - CFNumberGetValue(m as! CFNumber, CFNumberType.longType, &modifiers) + CFNumberGetValue((m as! CFNumber), CFNumberType.longType, &modifiers) } if let v = getAttribute(element: child, name: kAXMenuItemCmdVirtualKeyAttribute) { - CFNumberGetValue(v as! CFNumber, CFNumberType.longType, &virtualKey) + CFNumberGetValue((v as! CFNumber), CFNumberType.longType, &virtualKey) } var menuItem = MenuItem()