From 5463f2b935140136654cc01cbef43fda719d2224 Mon Sep 17 00:00:00 2001 From: Joe Mattiello Date: Fri, 10 Mar 2023 20:56:50 -0500 Subject: [PATCH] spm SideBackup builds, if we need it? --- SideStoreApp/Package.resolved | 190 +----------------- SideStoreApp/Package.swift | 18 +- .../Sources/SideBackup/BackupController.swift | 7 +- 3 files changed, 22 insertions(+), 193 deletions(-) diff --git a/SideStoreApp/Package.resolved b/SideStoreApp/Package.resolved index 98731a1d..e636bee2 100644 --- a/SideStoreApp/Package.resolved +++ b/SideStoreApp/Package.resolved @@ -1,14 +1,5 @@ { "pins" : [ - { - "identity" : "aexml", - "kind" : "remoteSourceControl", - "location" : "https://github.com/tadija/AEXML", - "state" : { - "revision" : "54bb8ea6fb693dd3f92a89e5fcc19e199fdeedd0", - "version" : "4.3.3" - } - }, { "identity" : "altsign", "kind" : "remoteSourceControl", @@ -30,21 +21,12 @@ { "identity" : "down", "kind" : "remoteSourceControl", - "location" : "https://github.com/johnxnguyen/Down", + "location" : "https://github.com/johnxnguyen/Down.git", "state" : { "branch" : "master", "revision" : "e754ab1c80920dd51a8e08290c912ac1c2ac8b58" } }, - { - "identity" : "ignore", - "kind" : "remoteSourceControl", - "location" : "https://github.com/IgorMuzyka/ignore", - "state" : { - "revision" : "49780cf3d46053eb40f4c425a46aaaf662f0665c", - "version" : "0.0.2" - } - }, { "identity" : "imobiledevice.swift", "kind" : "remoteSourceControl", @@ -54,15 +36,6 @@ "version" : "1.0.5" } }, - { - "identity" : "infomaticplugin", - "kind" : "remoteSourceControl", - "location" : "https://github.com/elegantchaos/InfomaticPlugin.git", - "state" : { - "branch" : "main", - "revision" : "735c0f1431f65977fcb3f808b74f6eeb728183ef" - } - }, { "identity" : "keychainaccess", "kind" : "remoteSourceControl", @@ -73,21 +46,12 @@ } }, { - "identity" : "logger", + "identity" : "launchatlogin", "kind" : "remoteSourceControl", - "location" : "https://github.com/f-meloni/Logger", + "location" : "https://github.com/sindresorhus/LaunchAtLogin.git", "state" : { - "revision" : "53c3ecca5abe8cf46697e33901ee774236d94cce", - "version" : "0.2.3" - } - }, - { - "identity" : "matchable", - "kind" : "remoteSourceControl", - "location" : "https://github.com/elegantchaos/Matchable.git", - "state" : { - "revision" : "d53e807009960aafbd54f6229c2542f906628b38", - "version" : "1.0.7" + "revision" : "7ad6331f9c38953eb1ce8737758e18f7607e984a", + "version" : "5.0.0" } }, { @@ -108,33 +72,6 @@ "version" : "1.1.2000" } }, - { - "identity" : "packagebuildinfo", - "kind" : "remoteSourceControl", - "location" : "https://github.com/DimaRU/PackageBuildInfo", - "state" : { - "branch" : "master", - "revision" : "7fe63ad12b50bad5d86e6abaef5a944f931ce765" - } - }, - { - "identity" : "packageconfig", - "kind" : "remoteSourceControl", - "location" : "https://github.com/orta/PackageConfig.git", - "state" : { - "revision" : "bf90dc69fa0792894b08a0b74cf34029694ae486", - "version" : "0.13.0" - } - }, - { - "identity" : "pathkit", - "kind" : "remoteSourceControl", - "location" : "https://github.com/kylef/PathKit", - "state" : { - "revision" : "e2f5be30e4c8f531c9c1e8765aa7b71c0a45d7a0", - "version" : "0.9.2" - } - }, { "identity" : "plcrashreporter", "kind" : "remoteSourceControl", @@ -153,24 +90,6 @@ "version" : "1.2.2" } }, - { - "identity" : "runner", - "kind" : "remoteSourceControl", - "location" : "https://github.com/elegantchaos/Runner.git", - "state" : { - "revision" : "65420eb4e534a58c8fb1bf18e344bc86edb42c65", - "version" : "1.3.2" - } - }, - { - "identity" : "secretsmanager", - "kind" : "remoteSourceControl", - "location" : "https://github.com/vdka/SecretsManager.git", - "state" : { - "revision" : "7e7eb0304726a2d9788432a3b90d79817ce2f6e1", - "version" : "1.1.1" - } - }, { "identity" : "semanticversion", "kind" : "remoteSourceControl", @@ -189,60 +108,6 @@ "version" : "0.1.0" } }, - { - "identity" : "spectre", - "kind" : "remoteSourceControl", - "location" : "https://github.com/kylef/Spectre.git", - "state" : { - "revision" : "f79d4ecbf8bc4e1579fbd86c3e1d652fb6876c53", - "version" : "0.9.2" - } - }, - { - "identity" : "swift-argument-parser", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-argument-parser", - "state" : { - "revision" : "fee6933f37fde9a5e12a1e4aeaa93fe60116ff2a", - "version" : "1.2.2" - } - }, - { - "identity" : "swift-docc-plugin", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-docc-plugin", - "state" : { - "revision" : "10bc670db657d11bdd561e07de30a9041311b2b1", - "version" : "1.1.0" - } - }, - { - "identity" : "swift-docc-symbolkit", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-docc-symbolkit", - "state" : { - "revision" : "b45d1f2ed151d057b54504d653e0da5552844e34", - "version" : "1.0.0" - } - }, - { - "identity" : "swift-secret-keys", - "kind" : "remoteSourceControl", - "location" : "https://github.com/simorgh3196/swift-secret-keys", - "state" : { - "revision" : "d156d039bea258466a2bbc0046936867db1a0915", - "version" : "0.1.0" - } - }, - { - "identity" : "swiftlintplugin", - "kind" : "remoteSourceControl", - "location" : "https://github.com/lukepistrol/SwiftLintPlugin", - "state" : { - "revision" : "f69b412a765396d44dc9f4788a5b79919c1ca9e3", - "version" : "0.2.2" - } - }, { "identity" : "swiftpmplugins", "kind" : "remoteSourceControl", @@ -251,51 +116,6 @@ "revision" : "2e4833a3ca65d0aaa986138b8ef350b7f549ba28", "version" : "1.0.0" } - }, - { - "identity" : "swiftshell", - "kind" : "remoteSourceControl", - "location" : "https://github.com/kareman/SwiftShell", - "state" : { - "revision" : "beebe43c986d89ea5359ac3adcb42dac94e5e08a", - "version" : "4.1.2" - } - }, - { - "identity" : "versionator", - "kind" : "remoteSourceControl", - "location" : "https://github.com/elegantchaos/Versionator.git", - "state" : { - "revision" : "d7bf7747ae277f6a5cd3193806262160d579f0cc", - "version" : "1.0.3" - } - }, - { - "identity" : "xcodeproj", - "kind" : "remoteSourceControl", - "location" : "https://github.com/tuist/xcodeproj.git", - "state" : { - "revision" : "065f348754b6155b8037dc43876a8f2ee354b95d", - "version" : "6.7.0" - } - }, - { - "identity" : "xctestextensions", - "kind" : "remoteSourceControl", - "location" : "https://github.com/elegantchaos/XCTestExtensions.git", - "state" : { - "revision" : "39694671be8bea1ab0bbd87114705b2a92567a8e", - "version" : "1.5.0" - } - }, - { - "identity" : "yams", - "kind" : "remoteSourceControl", - "location" : "https://github.com/jpsim/Yams", - "state" : { - "revision" : "f47ba4838c30dbd59998a4e4c87ab620ff959e8a", - "version" : "5.0.5" - } } ], "version" : 2 diff --git a/SideStoreApp/Package.swift b/SideStoreApp/Package.swift index 22b00449..e743557c 100644 --- a/SideStoreApp/Package.swift +++ b/SideStoreApp/Package.swift @@ -9,11 +9,11 @@ import PackageDescription typealias EnviromentBool = (var: String, default: Bool) // Possible keys for `env` and their default value -let USE_CARGO = envBool(("USE_CARGO", false)) -let USE_CXX_INTEROP = envBool(("USE_CXX_INTEROP", false)) -let USE_CXX_MODULES = envBool(("USE_CXX_MODULES", false)) -let INHIBIT_UPSTREAM_WARNINGS = envBool(("INHIBIT_UPSTREAM_WARNINGS", true)) -let STATIC_LIBRARY = envBool(("STATIC_LIBRARY", false)) +let USE_CARGO = envBool(("USE_CARGO", false)) +let USE_CXX_INTEROP = envBool(("USE_CXX_INTEROP", false)) +let USE_CXX_MODULES = envBool(("USE_CXX_MODULES", false)) +let INHIBIT_UPSTREAM_WARNINGS = envBool(("INHIBIT_UPSTREAM_WARNINGS", true)) +let STATIC_LIBRARY = envBool(("STATIC_LIBRARY", false)) let unsafe_flags: [String] = INHIBIT_UPSTREAM_WARNINGS ? ["-w"] : [String]() @@ -34,7 +34,7 @@ extension Package.Dependency { .github("SideStore/AltSign", from: "1.0.3"), .github("SideStore/iMobileDevice.swift", from: "1.0.5"), .github("SideStore/SideKit", from: "0.1.0"), - /// @JoeMatt updated fork for Riley's Roxas + /// @JoeMatt updated fork for Riley's `Roxas` .github("JoeMatt/Roxas", from: "1.2.2"), ] @@ -358,6 +358,12 @@ extension Target.SideStore { // MARK: - SideBackup static let SideBackup: Target = .executableTarget( name: "SideBackup", + dependencies: [ + "AltSign", + "Roxas", + "SideStoreCore", + "SideKit" + ], exclude: [ "Info.plist", "AltBackup.entitlements"] diff --git a/SideStoreApp/Sources/SideBackup/BackupController.swift b/SideStoreApp/Sources/SideBackup/BackupController.swift index 155268d7..36250abe 100644 --- a/SideStoreApp/Sources/SideBackup/BackupController.swift +++ b/SideStoreApp/Sources/SideBackup/BackupController.swift @@ -7,9 +7,12 @@ // import Foundation -import AltSign import os.log +import AltSign +import Roxas +import protocol SideStoreCore.ALTLocalizedError + extension ErrorUserInfoKey { static let sourceFile: String = "alt_sourceFile" static let sourceFileLine: String = "alt_sourceFileLine" @@ -146,7 +149,7 @@ class BackupController: NSObject { // Replace previous backup with new backup. _ = try FileManager.default.replaceItemAt(appBackupDirectory, withItemAt: temporaryAppBackupDirectory) - os_log("Replaced previous backup with new backup: %@", type: .info , temporaryAppBackupDirectory) + os_log("Replaced previous backup with new backup: %@", type: .info, temporaryAppBackupDirectory.absoluteString) completionHandler(.success(())) } catch {