diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0fe08c8..a1cf7dd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,7 +28,7 @@ jobs: version: "12" - name: Build binary - run: xcodebuild archive -scheme ${PROGRAM} -archivePath build + run: swift build -c release - name: Set version id: version @@ -40,7 +40,7 @@ jobs: dir=${PROGRAM}-Release-${{ steps.version.outputs.tag }} echo ::set-output name=filename::${dir} mkdir ${dir} - cp build.xcarchive/Products/${PROGRAM} ${dir} + cp .build/release/${PROGRAM} ${dir} cp scripts/* ${dir} zip -r ${dir}.zip ${dir} diff --git a/.gitignore b/.gitignore index d286699..4cde699 100644 --- a/.gitignore +++ b/.gitignore @@ -37,14 +37,14 @@ playground.xcworkspace # Swift Package Manager # # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. -# Packages/ -# Package.pins -# Package.resolved -# *.xcodeproj +Packages/ +Package.pins +Package.resolved +*.xcodeproj # # Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata # hence it is not needed unless you have added a package configuration file to your project -# .swiftpm +.swiftpm .build/ diff --git a/MicFix.xcodeproj/project.pbxproj b/MicFix.xcodeproj/project.pbxproj deleted file mode 100644 index 91b819f..0000000 --- a/MicFix.xcodeproj/project.pbxproj +++ /dev/null @@ -1,310 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 50; - objects = { - -/* Begin PBXBuildFile section */ - 833E6D6D264E674F003CE5DD /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 833E6D6C264E674F003CE5DD /* Constants.swift */; }; - 838773F4264FA71A00964D77 /* HDAVerb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 838773F3264FA71A00964D77 /* HDAVerb.swift */; }; - 83BCA9DC264DB1DB0084B7C4 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83BCA9DB264DB1DB0084B7C4 /* main.swift */; }; - 83BCA9E4264E41B70084B7C4 /* MicFix.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83BCA9E3264E41B70084B7C4 /* MicFix.swift */; }; - 83BCA9E7264E42510084B7C4 /* Listener.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83BCA9E6264E42510084B7C4 /* Listener.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 83BCA9D6264DB1DB0084B7C4 /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = /usr/share/man/man1/; - dstSubfolderSpec = 0; - files = ( - ); - runOnlyForDeploymentPostprocessing = 1; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 833E6D6C264E674F003CE5DD /* Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = ""; }; - 838773F3264FA71A00964D77 /* HDAVerb.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HDAVerb.swift; sourceTree = ""; }; - 83BCA9D8264DB1DB0084B7C4 /* MicFix */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = MicFix; sourceTree = BUILT_PRODUCTS_DIR; }; - 83BCA9DB264DB1DB0084B7C4 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; }; - 83BCA9E3264E41B70084B7C4 /* MicFix.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MicFix.swift; sourceTree = ""; }; - 83BCA9E6264E42510084B7C4 /* Listener.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Listener.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 83BCA9D5264DB1DB0084B7C4 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 83BCA9CF264DB1DB0084B7C4 = { - isa = PBXGroup; - children = ( - 83BCA9DA264DB1DB0084B7C4 /* MicFix */, - 83BCA9D9264DB1DB0084B7C4 /* Products */, - ); - sourceTree = ""; - }; - 83BCA9D9264DB1DB0084B7C4 /* Products */ = { - isa = PBXGroup; - children = ( - 83BCA9D8264DB1DB0084B7C4 /* MicFix */, - ); - name = Products; - sourceTree = ""; - }; - 83BCA9DA264DB1DB0084B7C4 /* MicFix */ = { - isa = PBXGroup; - children = ( - 838773F3264FA71A00964D77 /* HDAVerb.swift */, - 83BCA9DB264DB1DB0084B7C4 /* main.swift */, - 83BCA9E3264E41B70084B7C4 /* MicFix.swift */, - 83BCA9E6264E42510084B7C4 /* Listener.swift */, - 833E6D6C264E674F003CE5DD /* Constants.swift */, - ); - path = MicFix; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 83BCA9D7264DB1DB0084B7C4 /* MicFix */ = { - isa = PBXNativeTarget; - buildConfigurationList = 83BCA9DF264DB1DB0084B7C4 /* Build configuration list for PBXNativeTarget "MicFix" */; - buildPhases = ( - 83BCA9D4264DB1DB0084B7C4 /* Sources */, - 83BCA9D5264DB1DB0084B7C4 /* Frameworks */, - 83BCA9D6264DB1DB0084B7C4 /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = MicFix; - productName = ComboJack; - productReference = 83BCA9D8264DB1DB0084B7C4 /* MicFix */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 83BCA9D0264DB1DB0084B7C4 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 1240; - LastUpgradeCheck = 1240; - TargetAttributes = { - 83BCA9D7264DB1DB0084B7C4 = { - CreatedOnToolsVersion = 12.4; - }; - }; - }; - buildConfigurationList = 83BCA9D3264DB1DB0084B7C4 /* Build configuration list for PBXProject "MicFix" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 83BCA9CF264DB1DB0084B7C4; - productRefGroup = 83BCA9D9264DB1DB0084B7C4 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 83BCA9D7264DB1DB0084B7C4 /* MicFix */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - 83BCA9D4264DB1DB0084B7C4 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 833E6D6D264E674F003CE5DD /* Constants.swift in Sources */, - 83BCA9DC264DB1DB0084B7C4 /* main.swift in Sources */, - 83BCA9E7264E42510084B7C4 /* Listener.swift in Sources */, - 838773F4264FA71A00964D77 /* HDAVerb.swift in Sources */, - 83BCA9E4264E41B70084B7C4 /* MicFix.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 83BCA9DD264DB1DB0084B7C4 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 11.1; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 83BCA9DE264DB1DB0084B7C4 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 11.1; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - SDKROOT = macosx; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - }; - name = Release; - }; - 83BCA9E0264DB1DB0084B7C4 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Manual; - DEVELOPMENT_TEAM = ""; - ENABLE_HARDENED_RUNTIME = YES; - INSTALL_PATH = /; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - }; - name = Debug; - }; - 83BCA9E1264DB1DB0084B7C4 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Manual; - DEVELOPMENT_TEAM = ""; - ENABLE_HARDENED_RUNTIME = YES; - INSTALL_PATH = /; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 83BCA9D3264DB1DB0084B7C4 /* Build configuration list for PBXProject "MicFix" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 83BCA9DD264DB1DB0084B7C4 /* Debug */, - 83BCA9DE264DB1DB0084B7C4 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 83BCA9DF264DB1DB0084B7C4 /* Build configuration list for PBXNativeTarget "MicFix" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 83BCA9E0264DB1DB0084B7C4 /* Debug */, - 83BCA9E1264DB1DB0084B7C4 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 83BCA9D0264DB1DB0084B7C4 /* Project object */; -} diff --git a/MicFix.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/MicFix.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index ad5c5cb..0000000 --- a/MicFix.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/MicFix.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/MicFix.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/MicFix.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..98d237a --- /dev/null +++ b/Package.swift @@ -0,0 +1,12 @@ +// swift-tools-version:5.4 + +import PackageDescription + +let package = Package( + name: "MicFix", + targets: [ + .executableTarget( + name: "MicFix" + ) + ] +) diff --git a/MicFix/Constants.swift b/Sources/MicFix/Constants.swift similarity index 100% rename from MicFix/Constants.swift rename to Sources/MicFix/Constants.swift diff --git a/MicFix/HDAVerb.swift b/Sources/MicFix/HDAVerb.swift similarity index 100% rename from MicFix/HDAVerb.swift rename to Sources/MicFix/HDAVerb.swift diff --git a/MicFix/Listener.swift b/Sources/MicFix/Listener.swift similarity index 100% rename from MicFix/Listener.swift rename to Sources/MicFix/Listener.swift diff --git a/MicFix/MicFix.swift b/Sources/MicFix/MicFix.swift similarity index 100% rename from MicFix/MicFix.swift rename to Sources/MicFix/MicFix.swift diff --git a/MicFix/main.swift b/Sources/MicFix/main.swift similarity index 100% rename from MicFix/main.swift rename to Sources/MicFix/main.swift