From 4bf17a9bef2c1baea4258fe275ad8bda0dca7f74 Mon Sep 17 00:00:00 2001 From: Wibus <62133302+wibus-wee@users.noreply.github.com> Date: Mon, 9 Sep 2024 23:47:52 +0800 Subject: [PATCH] ci(build): multi-arch support (#35) --- InjectGUI.xcodeproj/project.pbxproj | 18 +----------------- InjectGUI/Backend/Cache.swift | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 31 deletions(-) diff --git a/InjectGUI.xcodeproj/project.pbxproj b/InjectGUI.xcodeproj/project.pbxproj index ee5366b..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" */, ); @@ -453,6 +449,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", @@ -547,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 */ @@ -568,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)