From 21d4312822a670d6454684b1a822cf2dfbbf3eb1 Mon Sep 17 00:00:00 2001 From: wibus-wee <1596355173@qq.com> Date: Mon, 9 Sep 2024 23:24:56 +0800 Subject: [PATCH 1/3] ci(build): multi-arch support --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c9498fb..29fa72f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,7 @@ permissions: jobs: build-mac: name: Build for macOS (Universal) - runs-on: macOS-latest + runs-on: macOS-13 steps: - name: Checkout uses: actions/checkout@v4 From ac3455f1825e0fd79173259051a849f5a977bf7c Mon Sep 17 00:00:00 2001 From: wibus-wee <1596355173@qq.com> Date: Mon, 9 Sep 2024 23:38:07 +0800 Subject: [PATCH 2/3] fix: add no only active arch --- .github/workflows/build.yml | 2 +- InjectGUI.xcodeproj/project.pbxproj | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 29fa72f..c9498fb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,7 @@ permissions: jobs: build-mac: name: Build for macOS (Universal) - runs-on: macOS-13 + runs-on: macOS-latest steps: - name: Checkout uses: actions/checkout@v4 diff --git a/InjectGUI.xcodeproj/project.pbxproj b/InjectGUI.xcodeproj/project.pbxproj index ee5366b..77be54f 100644 --- a/InjectGUI.xcodeproj/project.pbxproj +++ b/InjectGUI.xcodeproj/project.pbxproj @@ -453,6 +453,7 @@ "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 12.0; MARKETING_VERSION = 1.2.2; + ONLY_ACTIVE_ARCH = NO; OTHER_LDFLAGS = ( "-Xlinker", "-interposable", From 7a8cfc5d21e0f630ea22e7ff8551f5dd41c0f088 Mon Sep 17 00:00:00 2001 From: wibus-wee <1596355173@qq.com> Date: Mon, 9 Sep 2024 23:44:21 +0800 Subject: [PATCH 3/3] chore: remove cache module --- InjectGUI.xcodeproj/project.pbxproj | 17 ----------------- InjectGUI/Backend/Cache.swift | 28 ++++++++++++++-------------- 2 files changed, 14 insertions(+), 31 deletions(-) diff --git a/InjectGUI.xcodeproj/project.pbxproj b/InjectGUI.xcodeproj/project.pbxproj index 77be54f..933c700 100644 --- a/InjectGUI.xcodeproj/project.pbxproj +++ b/InjectGUI.xcodeproj/project.pbxproj @@ -33,7 +33,6 @@ 38BC1F5A2C4B98A300C3B60E /* AppDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38BC1F592C4B98A300C3B60E /* AppDetailView.swift */; }; 38BC1F5C2C4BB02200C3B60E /* SettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38BC1F5B2C4BB02200C3B60E /* SettingsView.swift */; }; 38E944F22C5A761B00B252A3 /* Executor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38E944F12C5A761B00B252A3 /* Executor.swift */; }; - 38E944F52C5A7F6A00B252A3 /* Cache in Frameworks */ = {isa = PBXBuildFile; productRef = 38E944F42C5A7F6A00B252A3 /* Cache */; }; 38E944F72C5A85E200B252A3 /* Cache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38E944F62C5A85E200B252A3 /* Cache.swift */; }; 96BC7ED02C65C5E200149818 /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = 96BC7ECF2C65C5E200149818 /* Localizable.xcstrings */; }; 96BC7ED62C65E7B100149818 /* AboutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96BC7ED52C65E7B100149818 /* AboutView.swift */; }; @@ -79,7 +78,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 38E944F52C5A7F6A00B252A3 /* Cache in Frameworks */, 380D777B2C61EA56005F3150 /* Sparkle in Frameworks */, 383943792C68458F00E5984E /* Inject in Frameworks */, ); @@ -214,7 +212,6 @@ ); name = InjectGUI; packageProductDependencies = ( - 38E944F42C5A7F6A00B252A3 /* Cache */, 380D777A2C61EA56005F3150 /* Sparkle */, 383943782C68458F00E5984E /* Inject */, ); @@ -248,7 +245,6 @@ ); mainGroup = 38877A102C4A6F83009F5910; packageReferences = ( - 38E944F32C5A7F6A00B252A3 /* XCRemoteSwiftPackageReference "Cache" */, 380D77792C61EA56005F3150 /* XCRemoteSwiftPackageReference "Sparkle" */, 383943772C68458F00E5984E /* XCRemoteSwiftPackageReference "Inject" */, ); @@ -548,14 +544,6 @@ minimumVersion = 1.5.2; }; }; - 38E944F32C5A7F6A00B252A3 /* XCRemoteSwiftPackageReference "Cache" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/hyperoslo/Cache"; - requirement = { - kind = exactVersion; - version = 7.2.0; - }; - }; /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ @@ -569,11 +557,6 @@ package = 383943772C68458F00E5984E /* XCRemoteSwiftPackageReference "Inject" */; productName = Inject; }; - 38E944F42C5A7F6A00B252A3 /* Cache */ = { - isa = XCSwiftPackageProductDependency; - package = 38E944F32C5A7F6A00B252A3 /* XCRemoteSwiftPackageReference "Cache" */; - productName = Cache; - }; /* End XCSwiftPackageProductDependency section */ }; rootObject = 38877A112C4A6F83009F5910 /* Project object */; diff --git a/InjectGUI/Backend/Cache.swift b/InjectGUI/Backend/Cache.swift index 884ea61..d5af300 100644 --- a/InjectGUI/Backend/Cache.swift +++ b/InjectGUI/Backend/Cache.swift @@ -4,17 +4,17 @@ // // Created by wibus on 2024/7/31. // - -import Cache - -enum CacheKey { - static let latestCommitHash = "latestCommitHash" -} - -// MARK: - Cache Configuration - -// 存一个有关 main/latest commit hash 的缓存 -let diskConfig = DiskConfig(name: "InjectLib") -let memoryConfig = MemoryConfig(expiry: .never, countLimit: 10, totalCostLimit: 10) -let transformer = TransformerFactory.forCodable(ofType: String.self) -let storage = try! Storage(diskConfig: diskConfig, memoryConfig: memoryConfig, transformer: transformer) +// +//import Cache +// +//enum CacheKey { +// static let latestCommitHash = "latestCommitHash" +//} +// +//// MARK: - Cache Configuration +// +//// 存一个有关 main/latest commit hash 的缓存 +//let diskConfig = DiskConfig(name: "InjectLib") +//let memoryConfig = MemoryConfig(expiry: .never, countLimit: 10, totalCostLimit: 10) +//let transformer = TransformerFactory.forCodable(ofType: String.self) +//let storage = try! Storage(diskConfig: diskConfig, memoryConfig: memoryConfig, transformer: transformer)