mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-20 20:23:25 +01:00
spm App target builds and links!
This commit is contained in:
15
.gitmodules
vendored
15
.gitmodules
vendored
@@ -1,21 +1,6 @@
|
|||||||
[submodule "Sources/libfragmentzip"]
|
|
||||||
path = Sources/libfragmentzip/libfragmentzip-source
|
|
||||||
url = https://github.com/SideStore/libfragmentzip.git
|
|
||||||
[submodule "Dependencies/em_proxy"]
|
[submodule "Dependencies/em_proxy"]
|
||||||
path = Dependencies/em_proxy
|
path = Dependencies/em_proxy
|
||||||
url = https://github.com/SideStore/em_proxy.git
|
url = https://github.com/SideStore/em_proxy.git
|
||||||
[submodule "Dependencies/minimuxer"]
|
[submodule "Dependencies/minimuxer"]
|
||||||
path = Dependencies/minimuxer
|
path = Dependencies/minimuxer
|
||||||
url = https://github.com/SideStore/minimuxer.git
|
url = https://github.com/SideStore/minimuxer.git
|
||||||
[submodule "Sources/libimobiledevice/dependencies/libimobiledevice-glue"]
|
|
||||||
path = Sources/libimobiledevice/dependencies/libimobiledevice-glue
|
|
||||||
url = https://github.com/libimobiledevice/libimobiledevice-glue
|
|
||||||
[submodule "Sources/libimobiledevice/dependencies/libplist"]
|
|
||||||
path = Sources/libimobiledevice/dependencies/libplist
|
|
||||||
url = https://github.com/libimobiledevice/libplist.git
|
|
||||||
[submodule "Sources/libimobiledevice/dependencies/libusbmuxd"]
|
|
||||||
path = Sources/libimobiledevice/dependencies/libusbmuxd
|
|
||||||
url = https://github.com/libimobiledevice/libusbmuxd.git
|
|
||||||
[submodule "Sources/libimobiledevice/dependencies/libimobiledevice"]
|
|
||||||
path = Sources/libimobiledevice/dependencies/libimobiledevice
|
|
||||||
url = https://github.com/libimobiledevice/libimobiledevice
|
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/SideStore/AltSign",
|
"location" : "https://github.com/SideStore/AltSign",
|
||||||
"state" : {
|
"state" : {
|
||||||
"branch" : "master",
|
"revision" : "9c63397f0fc6038c04b930dd2d10b030d508d6fa",
|
||||||
"revision" : "b94d53372c62c2ecb1949b98bae1604d68162474"
|
"version" : "1.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -27,6 +27,15 @@
|
|||||||
"revision" : "e754ab1c80920dd51a8e08290c912ac1c2ac8b58"
|
"revision" : "e754ab1c80920dd51a8e08290c912ac1c2ac8b58"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"identity" : "imobiledevice.swift",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/SideStore/iMobileDevice.swift",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "74e481106dd155c0cd21bca6795fd9fe5f751654",
|
||||||
|
"version" : "1.0.5"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"identity" : "keychainaccess",
|
"identity" : "keychainaccess",
|
||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
@@ -89,6 +98,15 @@
|
|||||||
"revision" : "7ea34a09b52c104077dea8e0b90f8dc55d43b36b",
|
"revision" : "7ea34a09b52c104077dea8e0b90f8dc55d43b36b",
|
||||||
"version" : "0.1.0"
|
"version" : "0.1.0"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "swiftpmplugins",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/JoeMatt/SwiftPMPlugins.git",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "2e4833a3ca65d0aaa986138b8ef350b7f549ba28",
|
||||||
|
"version" : "1.0.0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"version" : 2
|
"version" : 2
|
||||||
|
|||||||
266
Package.swift
266
Package.swift
@@ -28,10 +28,13 @@ let dependencies: [Package.Dependency] = [
|
|||||||
.package(url: "https://github.com/kean/Nuke", from: "7.0.0"),
|
.package(url: "https://github.com/kean/Nuke", from: "7.0.0"),
|
||||||
.package(url: "https://github.com/kishikawakatsumi/KeychainAccess", from: "4.2.0"),
|
.package(url: "https://github.com/kishikawakatsumi/KeychainAccess", from: "4.2.0"),
|
||||||
.package(url: "https://github.com/microsoft/appcenter-sdk-apple", from: "4.2.0"),
|
.package(url: "https://github.com/microsoft/appcenter-sdk-apple", from: "4.2.0"),
|
||||||
.package(url: "https://github.com/SideStore/AltSign", branch: "master"),
|
.package(url: "https://github.com/SideStore/AltSign", from: "1.0.2"),
|
||||||
|
.package(url: "https://github.com/SideStore/iMobileDevice.swift", from: "1.0.5"),
|
||||||
|
// .package(path: "../iMobileDevice.swift"),
|
||||||
.package(url: "https://github.com/SideStore/SideKit", from: "0.1.0"),
|
.package(url: "https://github.com/SideStore/SideKit", from: "0.1.0"),
|
||||||
.package(url: "https://github.com/SwiftPackageIndex/SemanticVersion", from: "0.3.5"),
|
.package(url: "https://github.com/SwiftPackageIndex/SemanticVersion", from: "0.3.5"),
|
||||||
.package(url: "https://github.com/krzyzanowskim/OpenSSL.git", .upToNextMinor(from: "1.1.1700"))
|
.package(url: "https://github.com/krzyzanowskim/OpenSSL.git", .upToNextMinor(from: "1.1.1700")),
|
||||||
|
.package(url: "https://github.com/JoeMatt/SwiftPMPlugins.git", .upToNextMinor(from: "1.0.0"))
|
||||||
] // + dependencies_cargo
|
] // + dependencies_cargo
|
||||||
|
|
||||||
let package = Package(
|
let package = Package(
|
||||||
@@ -59,9 +62,7 @@ let package = Package(
|
|||||||
name: "SideStoreAppKit",
|
name: "SideStoreAppKit",
|
||||||
targets: ["SideStoreAppKit"]),
|
targets: ["SideStoreAppKit"]),
|
||||||
|
|
||||||
.plugin(name: "IntentBuilderPlugin", targets: ["IntentBuilderPlugin"]),
|
.plugin(name: "CargoPlugin", targets: ["CargoPlugin"]),
|
||||||
.plugin(name: "LoggerPlugin", targets: ["LoggerPlugin"])
|
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
dependencies: dependencies,
|
dependencies: dependencies,
|
||||||
@@ -80,6 +81,10 @@ let package = Package(
|
|||||||
"Down",
|
"Down",
|
||||||
"AltSign",
|
"AltSign",
|
||||||
"SideKit",
|
"SideKit",
|
||||||
|
"KeychainAccess",
|
||||||
|
"SemanticVersion",
|
||||||
|
// .product(name: "CrashReporter", package: "PLCrashReporter"),
|
||||||
|
.product(name: "libimobiledevice", package: "iMobileDevice.swift"),
|
||||||
.product(name: "Roxas", package: "Roxas"),
|
.product(name: "Roxas", package: "Roxas"),
|
||||||
.product(name: "RoxasUI", package: "Roxas"),
|
.product(name: "RoxasUI", package: "Roxas"),
|
||||||
.product(name: "AppCenterAnalytics", package: "appcenter-sdk-apple"),
|
.product(name: "AppCenterAnalytics", package: "appcenter-sdk-apple"),
|
||||||
@@ -117,8 +122,8 @@ let package = Package(
|
|||||||
.linkedLibrary("AppleArchive")
|
.linkedLibrary("AppleArchive")
|
||||||
],
|
],
|
||||||
plugins: [
|
plugins: [
|
||||||
"IntentBuilderPlugin",
|
.plugin(name: "IntentBuilderPlugin", package: "SwiftPMPlugins"),
|
||||||
"LoggerPlugin"
|
.plugin(name: "LoggerPlugin", package: "SwiftPMPlugins")
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
|
|
||||||
@@ -140,8 +145,6 @@ let package = Package(
|
|||||||
.product(name: "AppCenterCrashes", package: "appcenter-sdk-apple"),
|
.product(name: "AppCenterCrashes", package: "appcenter-sdk-apple"),
|
||||||
],
|
],
|
||||||
resources: [
|
resources: [
|
||||||
// .process("Resources/Intents/Intents.intentdefinition"),
|
|
||||||
// .process("Resources/Intents/ViewApp.intentdefinition"),
|
|
||||||
],
|
],
|
||||||
linkerSettings: [
|
linkerSettings: [
|
||||||
.linkedFramework("UIKit", .when(platforms: [.iOS, .macCatalyst, .tvOS])),
|
.linkedFramework("UIKit", .when(platforms: [.iOS, .macCatalyst, .tvOS])),
|
||||||
@@ -171,8 +174,8 @@ let package = Package(
|
|||||||
.executableTarget(
|
.executableTarget(
|
||||||
name: "SideWidget",
|
name: "SideWidget",
|
||||||
plugins: [
|
plugins: [
|
||||||
"IntentBuilderPlugin",
|
.plugin(name: "IntentBuilderPlugin", package: "SwiftPMPlugins"),
|
||||||
"LoggerPlugin"
|
.plugin(name: "LoggerPlugin", package: "SwiftPMPlugins")
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
|
|
||||||
@@ -214,10 +217,10 @@ let package = Package(
|
|||||||
name: "MiniMuxerSwift",
|
name: "MiniMuxerSwift",
|
||||||
dependencies: [
|
dependencies: [
|
||||||
"minimuxer",
|
"minimuxer",
|
||||||
"libimobiledevice",
|
.product(name: "libimobiledevice", package: "iMobileDevice.swift")
|
||||||
],
|
],
|
||||||
plugins: [
|
plugins: [
|
||||||
"LoggerPlugin"
|
.plugin(name: "LoggerPlugin", package: "SwiftPMPlugins")
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
|
|
||||||
@@ -228,7 +231,10 @@ let package = Package(
|
|||||||
|
|
||||||
.testTarget(
|
.testTarget(
|
||||||
name: "MiniMuxerTests",
|
name: "MiniMuxerTests",
|
||||||
dependencies: ["MiniMuxerSwift"]
|
dependencies: [
|
||||||
|
"MiniMuxerSwift",
|
||||||
|
.product(name: "libimobiledevice", package: "iMobileDevice.swift")
|
||||||
|
]
|
||||||
),
|
),
|
||||||
|
|
||||||
// MARK: - Shared
|
// MARK: - Shared
|
||||||
@@ -270,7 +276,8 @@ let package = Package(
|
|||||||
.product(name: "Roxas", package: "Roxas"),
|
.product(name: "Roxas", package: "Roxas"),
|
||||||
],
|
],
|
||||||
plugins: [
|
plugins: [
|
||||||
"IntentBuilderPlugin",
|
.plugin(name: "IntentBuilderPlugin", package: "SwiftPMPlugins"),
|
||||||
|
.plugin(name: "LoggerPlugin", package: "SwiftPMPlugins")
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
|
|
||||||
@@ -278,233 +285,16 @@ let package = Package(
|
|||||||
name: "SideStoreCoreTests",
|
name: "SideStoreCoreTests",
|
||||||
dependencies: [
|
dependencies: [
|
||||||
"SideStoreCore",
|
"SideStoreCore",
|
||||||
]
|
"KeychainAccess",
|
||||||
),
|
"AltSign",
|
||||||
|
"SemanticVersion",
|
||||||
// MARK: - libfragmentzip
|
"SideKit"
|
||||||
|
|
||||||
.target(
|
|
||||||
name: "libfragmentzip",
|
|
||||||
dependencies: [],
|
|
||||||
sources: [
|
|
||||||
"libfragmentzip-source/libfragmentzip/libfragmentzip.c",
|
|
||||||
],
|
|
||||||
cSettings: [
|
|
||||||
.headerSearchPath("libfragmentzip-source/libfragmentzip/include"),
|
|
||||||
]
|
|
||||||
),
|
|
||||||
|
|
||||||
.testTarget(
|
|
||||||
name: "libfragmentzipTests",
|
|
||||||
dependencies: ["libfragmentzip"]
|
|
||||||
),
|
|
||||||
|
|
||||||
// MARK: - libmobiledevice
|
|
||||||
|
|
||||||
.target(
|
|
||||||
name: "libimobiledevice",
|
|
||||||
dependencies: [
|
|
||||||
"libimobiledevice-glue",
|
|
||||||
// "libplist",
|
|
||||||
"libusbmuxd",
|
|
||||||
"OpenSSL"
|
|
||||||
],
|
|
||||||
path: "Sources/libimobiledevice/libimobiledevice/",
|
|
||||||
publicHeadersPath: "include/",
|
|
||||||
cSettings: [
|
|
||||||
.headerSearchPath("include/"),
|
|
||||||
.headerSearchPath("../dependencies/libimobiledevice"),
|
|
||||||
.headerSearchPath("../dependencies/libimobiledevice/common"),
|
|
||||||
.headerSearchPath("../dependencies/libimobiledevice/include"),
|
|
||||||
.headerSearchPath("../dependencies/libimobiledevice-glue/include"),
|
|
||||||
.headerSearchPath("../dependencies/libplist/include"),
|
|
||||||
.headerSearchPath("../dependencies/libusbmuxd/include"),
|
|
||||||
.define("HAVE_OPENSSL"),
|
|
||||||
.define("HAVE_STPNCPY"),
|
|
||||||
.define("HAVE_STPCPY"),
|
|
||||||
.define("HAVE_VASPRINTF"),
|
|
||||||
.define("HAVE_ASPRINTF"),
|
|
||||||
.define("PACKAGE_STRING", to: "\"AltServer 1.0\""),
|
|
||||||
.define("HAVE_GETIFADDRS"),
|
|
||||||
.define("HAVE_STRNDUP"),
|
|
||||||
.unsafeFlags(unsafe_flags)
|
|
||||||
],
|
|
||||||
cxxSettings: [
|
|
||||||
.headerSearchPath("include/"),
|
|
||||||
.headerSearchPath("../dependencies/libimobiledevice"),
|
|
||||||
.headerSearchPath("../dependencies/libimobiledevice/common"),
|
|
||||||
.headerSearchPath("../dependencies/libimobiledevice/include"),
|
|
||||||
.headerSearchPath("../dependencies/libimobiledevice-glue/include"),
|
|
||||||
.headerSearchPath("../dependencies/libplist/include"),
|
|
||||||
.headerSearchPath("../dependencies/libusbmuxd/include"),
|
|
||||||
.define("HAVE_OPENSSL"),
|
|
||||||
.define("HAVE_STPNCPY"),
|
|
||||||
.define("HAVE_STPCPY"),
|
|
||||||
.define("HAVE_VASPRINTF"),
|
|
||||||
.define("HAVE_ASPRINTF"),
|
|
||||||
.define("PACKAGE_STRING", to: "\"AltServer 1.0\""),
|
|
||||||
.define("HAVE_GETIFADDRS"),
|
|
||||||
.define("HAVE_STRNDUP"),
|
|
||||||
.unsafeFlags(unsafe_flags_cxx)
|
|
||||||
]
|
|
||||||
),
|
|
||||||
|
|
||||||
// MARK: libmobiledevice-glue
|
|
||||||
.target(
|
|
||||||
name: "libimobiledevice-glue",
|
|
||||||
dependencies: [
|
|
||||||
"libplist"
|
|
||||||
],
|
|
||||||
path: "Sources/libimobiledevice/libimobiledevice-glue/",
|
|
||||||
exclude: [
|
|
||||||
"src/libimobiledevice-glue-1.0.pc.in",
|
|
||||||
"src/common.h"
|
|
||||||
],
|
|
||||||
publicHeadersPath: "include",
|
|
||||||
cSettings: [
|
|
||||||
.headerSearchPath("include/"),
|
|
||||||
.headerSearchPath("../dependencies/libimobiledevice-glue/include"),
|
|
||||||
.headerSearchPath("../dependencies/libplist/include"),
|
|
||||||
.define("HAVE_OPENSSL"),
|
|
||||||
.define("HAVE_STPNCPY"),
|
|
||||||
.define("HAVE_STPCPY"),
|
|
||||||
.define("HAVE_VASPRINTF"),
|
|
||||||
.define("HAVE_ASPRINTF"),
|
|
||||||
.define("PACKAGE_STRING", to: "\"AltServer 1.0\""),
|
|
||||||
.define("HAVE_GETIFADDRS"),
|
|
||||||
.define("HAVE_STRNDUP"),
|
|
||||||
.unsafeFlags(unsafe_flags)
|
|
||||||
],
|
|
||||||
cxxSettings: [
|
|
||||||
.headerSearchPath("include/"),
|
|
||||||
.headerSearchPath("../dependencies/libimobiledevice-glue/include"),
|
|
||||||
.headerSearchPath("../dependencies/libplist/include"),
|
|
||||||
.define("HAVE_OPENSSL"),
|
|
||||||
.define("HAVE_STPNCPY"),
|
|
||||||
.define("HAVE_STPCPY"),
|
|
||||||
.define("HAVE_VASPRINTF"),
|
|
||||||
.define("HAVE_ASPRINTF"),
|
|
||||||
.define("PACKAGE_STRING", to: "\"AltServer 1.0\""),
|
|
||||||
.define("HAVE_GETIFADDRS"),
|
|
||||||
.define("HAVE_STRNDUP"),
|
|
||||||
.unsafeFlags(unsafe_flags_cxx)
|
|
||||||
]
|
|
||||||
),
|
|
||||||
|
|
||||||
// MARK: libplist
|
|
||||||
|
|
||||||
.target(
|
|
||||||
name: "libplist",
|
|
||||||
dependencies: [
|
|
||||||
],
|
|
||||||
path: "Sources/libimobiledevice/libplist/",
|
|
||||||
sources: [
|
|
||||||
"src/base64.c",
|
|
||||||
"src/bplist.c",
|
|
||||||
"src/bytearray.c",
|
|
||||||
"src/hashtable.c",
|
|
||||||
"src/jplist.c",
|
|
||||||
"src/jsmn.c",
|
|
||||||
"src/oplist.c",
|
|
||||||
"src/plist.c",
|
|
||||||
"src/ptrarray.c",
|
|
||||||
"src/time64.c",
|
|
||||||
"src/xplist.c",
|
|
||||||
"src/Array.cpp",
|
|
||||||
"src/Boolean.cpp",
|
|
||||||
"src/Data.cpp",
|
|
||||||
"src/Date.cpp",
|
|
||||||
"src/Dictionary.cpp",
|
|
||||||
"src/Integer.cpp",
|
|
||||||
"src/Key.cpp",
|
|
||||||
"src/Node.cpp",
|
|
||||||
"src/Real.cpp",
|
|
||||||
"src/String.cpp",
|
|
||||||
"src/Structure.cpp",
|
|
||||||
"src/Uid.cpp",
|
|
||||||
"libcnary/node.c",
|
|
||||||
"libcnary/node_list.c",
|
|
||||||
],
|
|
||||||
publicHeadersPath: "include",
|
|
||||||
cSettings: [
|
|
||||||
.headerSearchPath("include/"),
|
|
||||||
.headerSearchPath("../dependencies/libplist/include"),
|
|
||||||
.define("HAVE_OPENSSL"),
|
|
||||||
.define("HAVE_STPNCPY"),
|
|
||||||
.define("HAVE_STPCPY"),
|
|
||||||
.define("HAVE_VASPRINTF"),
|
|
||||||
.define("HAVE_ASPRINTF"),
|
|
||||||
.define("PACKAGE_STRING", to: "\"AltServer 1.0\""),
|
|
||||||
.define("HAVE_GETIFADDRS"),
|
|
||||||
.define("HAVE_STRNDUP"),
|
|
||||||
.unsafeFlags(unsafe_flags)
|
|
||||||
],
|
|
||||||
cxxSettings: [
|
|
||||||
.headerSearchPath("include/"),
|
|
||||||
.headerSearchPath("../dependencies/libplist/include"),
|
|
||||||
.headerSearchPath("../dependencies/libplist/libcnary/include"),
|
|
||||||
.define("HAVE_OPENSSL"),
|
|
||||||
.define("HAVE_STPNCPY"),
|
|
||||||
.define("HAVE_STPCPY"),
|
|
||||||
.define("HAVE_VASPRINTF"),
|
|
||||||
.define("HAVE_ASPRINTF"),
|
|
||||||
.define("PACKAGE_STRING", to: "\"AltServer 1.0\""),
|
|
||||||
.define("HAVE_GETIFADDRS"),
|
|
||||||
.define("HAVE_STRNDUP"),
|
|
||||||
.unsafeFlags(unsafe_flags_cxx)
|
|
||||||
]
|
|
||||||
),
|
|
||||||
|
|
||||||
// MARK: libusbmuxd
|
|
||||||
|
|
||||||
.target(
|
|
||||||
name: "libusbmuxd",
|
|
||||||
dependencies: [
|
|
||||||
// "libplist",
|
|
||||||
"libimobiledevice-glue"
|
|
||||||
],
|
|
||||||
path: "Sources/libimobiledevice/libusbmuxd/",
|
|
||||||
sources: [
|
|
||||||
"src/libusbmuxd.c",
|
|
||||||
],
|
|
||||||
publicHeadersPath: "include",
|
|
||||||
cSettings: [
|
|
||||||
.headerSearchPath("../dependencies/libplist/include"),
|
|
||||||
.headerSearchPath("../dependencies/libplist/libcnary/include"),
|
|
||||||
.headerSearchPath("../dependencies/libusbmuxd/include"),
|
|
||||||
.headerSearchPath("../dependencies/libimobiledevice-glue/include/"),
|
|
||||||
.headerSearchPath("../dependencies/libimobiledevice-glue/include/libimobiledevice-glue/"),
|
|
||||||
.define("HAVE_OPENSSL"),
|
|
||||||
.define("HAVE_STPNCPY"),
|
|
||||||
.define("HAVE_STPCPY"),
|
|
||||||
.define("HAVE_VASPRINTF"),
|
|
||||||
.define("HAVE_ASPRINTF"),
|
|
||||||
.define("PACKAGE_STRING", to: "\"AltServer 1.0\""),
|
|
||||||
.define("HAVE_GETIFADDRS"),
|
|
||||||
.define("HAVE_STRNDUP"),
|
|
||||||
.unsafeFlags(unsafe_flags)
|
|
||||||
],
|
|
||||||
cxxSettings: [
|
|
||||||
.headerSearchPath("../dependencies/libplist/include"),
|
|
||||||
.headerSearchPath("../dependencies/libplist/libcnary/include"),
|
|
||||||
.headerSearchPath("../dependencies/libusbmuxd/include"),
|
|
||||||
.headerSearchPath("../dependencies/libimobiledevice-glue/include/"),
|
|
||||||
.headerSearchPath("../dependencies/libimobiledevice-glue/include/libimobiledevice-glue/"),
|
|
||||||
.define("HAVE_OPENSSL"),
|
|
||||||
.define("HAVE_STPNCPY"),
|
|
||||||
.define("HAVE_STPCPY"),
|
|
||||||
.define("HAVE_VASPRINTF"),
|
|
||||||
.define("HAVE_ASPRINTF"),
|
|
||||||
.define("PACKAGE_STRING", to: "\"AltServer 1.0\""),
|
|
||||||
.define("HAVE_GETIFADDRS"),
|
|
||||||
.define("HAVE_STRNDUP"),
|
|
||||||
.unsafeFlags(unsafe_flags_cxx)
|
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
|
|
||||||
// MARK: - Plugins
|
// MARK: - Plugins
|
||||||
.plugin(name: "IntentBuilderPlugin", capability: .buildTool()),
|
.plugin(name: "CargoPlugin", capability: .buildTool()),
|
||||||
.plugin(name: "LoggerPlugin", capability: .buildTool()),
|
// .plugin(name: "CargoPlugin-Generate", capability: .command(intent: PluginCommandIntent)),
|
||||||
|
|
||||||
],
|
],
|
||||||
swiftLanguageVersions: [.v5],
|
swiftLanguageVersions: [.v5],
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ struct CargoPlugin: BuildToolPlugin {
|
|||||||
#if canImport(XcodeProjectPlugin)
|
#if canImport(XcodeProjectPlugin)
|
||||||
import XcodeProjectPlugin
|
import XcodeProjectPlugin
|
||||||
|
|
||||||
extension SwiftLintPlugin: XcodeBuildToolPlugin {
|
extension CargoPlugin: XcodeBuildToolPlugin {
|
||||||
func createBuildCommands(context: XcodePluginContext, target: XcodeTarget) throws -> [Command] {
|
func createBuildCommands(context: XcodePluginContext, target: XcodeTarget) throws -> [Command] {
|
||||||
let inputFilePaths = target.inputFiles
|
let inputFilePaths = target.inputFiles
|
||||||
.filter { $0.type == .source && $0.path.extension == "swift" }
|
.filter { $0.type == .source && $0.path.extension == "swift" }
|
||||||
@@ -68,3 +68,43 @@ extension SwiftLintPlugin: XcodeBuildToolPlugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if os(Linux)
|
||||||
|
import Glibc
|
||||||
|
#else
|
||||||
|
import Darwin
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extension Path {
|
||||||
|
/// Scans the receiver, then all of its parents looking for a configuration file with the name ".swiftlint.yml".
|
||||||
|
///
|
||||||
|
/// - returns: Path to the configuration file, or nil if one cannot be found.
|
||||||
|
func firstConfigurationFileInParentDirectories() -> Path? {
|
||||||
|
let defaultConfigurationFileName = ".swiftlint.yml"
|
||||||
|
let proposedDirectory = sequence(
|
||||||
|
first: self,
|
||||||
|
next: { path in
|
||||||
|
guard path.stem.count > 1 else {
|
||||||
|
// Check we're not at the root of this filesystem, as `removingLastComponent()`
|
||||||
|
// will continually return the root from itself.
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
return path.removingLastComponent()
|
||||||
|
}
|
||||||
|
).first { path in
|
||||||
|
let potentialConfigurationFile = path.appending(subpath: defaultConfigurationFileName)
|
||||||
|
return potentialConfigurationFile.isAccessible()
|
||||||
|
}
|
||||||
|
return proposedDirectory?.appending(subpath: defaultConfigurationFileName)
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Safe way to check if the file is accessible from within the current process sandbox.
|
||||||
|
private func isAccessible() -> Bool {
|
||||||
|
let result = string.withCString { pointer in
|
||||||
|
access(pointer, R_OK)
|
||||||
|
}
|
||||||
|
|
||||||
|
return result == 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,34 +0,0 @@
|
|||||||
// Copyright 2022 The Brave Authors. All rights reserved.
|
|
||||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
||||||
|
|
||||||
import PackagePlugin
|
|
||||||
import Foundation
|
|
||||||
|
|
||||||
@main
|
|
||||||
struct IntentBuilderPlugin: BuildToolPlugin {
|
|
||||||
func createBuildCommands(context: PluginContext, target: Target) async throws -> [Command] {
|
|
||||||
let outputDirectory = context.pluginWorkDirectory.appending("GeneratedSources")
|
|
||||||
guard let target = target as? SourceModuleTarget else {
|
|
||||||
Diagnostics.error("Attempted to use `IntentBuilderPlugin` on an unsupported module target")
|
|
||||||
return []
|
|
||||||
}
|
|
||||||
return target.sourceFiles(withSuffix: "intentdefinition")
|
|
||||||
.map { file in
|
|
||||||
.prebuildCommand(
|
|
||||||
displayName: "Generate intents sources",
|
|
||||||
executable: Path("/usr/bin/xcrun"),
|
|
||||||
arguments: [
|
|
||||||
"intentbuilderc", "generate",
|
|
||||||
"-input", file.path.string,
|
|
||||||
"-output", outputDirectory,
|
|
||||||
"-language", "Swift",
|
|
||||||
"-swiftVersion", "5.6",
|
|
||||||
"-classPrefix", ""
|
|
||||||
],
|
|
||||||
outputFilesDirectory: outputDirectory
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
// Copyright 2022 The Brave Authors. All rights reserved.
|
|
||||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
||||||
|
|
||||||
import PackagePlugin
|
|
||||||
import Foundation
|
|
||||||
|
|
||||||
@main
|
|
||||||
struct LoggerPlugin: BuildToolPlugin {
|
|
||||||
func createBuildCommands(context: PluginContext, target: Target) async throws -> [Command] {
|
|
||||||
let outputDirectory = context.pluginWorkDirectory.appending("GeneratedSources")
|
|
||||||
guard let target = target as? SourceModuleTarget else {
|
|
||||||
Diagnostics.error("Attempted to use `LoggerPlugin` on an unsupported module target")
|
|
||||||
return []
|
|
||||||
}
|
|
||||||
|
|
||||||
try FileManager.default.createDirectory(atPath: outputDirectory.string, withIntermediateDirectories: true)
|
|
||||||
let source = """
|
|
||||||
import Foundation
|
|
||||||
import os.log
|
|
||||||
|
|
||||||
extension Logger {
|
|
||||||
static var module: Logger {
|
|
||||||
.init(subsystem: "\\(Bundle.main.bundleIdentifier ?? "com.sidestore.ios")", category: "\(target.moduleName)")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
"""
|
|
||||||
|
|
||||||
let filePath = outputDirectory.appending("logger.swift")
|
|
||||||
if !FileManager.default.fileExists(atPath: filePath.string) {
|
|
||||||
try source.write(
|
|
||||||
toFile: filePath.string,
|
|
||||||
atomically: true,
|
|
||||||
encoding: .utf8
|
|
||||||
)
|
|
||||||
}
|
|
||||||
// TODO: Generate the above file in an `executableTarget` when SPM supports building Mac tools while targetting iOS
|
|
||||||
return [
|
|
||||||
.buildCommand(
|
|
||||||
displayName: "Generate logger",
|
|
||||||
executable: Path("/bin/zsh"),
|
|
||||||
arguments: [],
|
|
||||||
outputFiles: [outputDirectory.appending("logger.swift")]
|
|
||||||
)
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
//
|
|
||||||
// fragmentzip.h
|
|
||||||
// AltStore
|
|
||||||
//
|
|
||||||
// Created by Riley Testut on 10/25/21.
|
|
||||||
// Copyright © 2021 Riley Testut. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef fragmentzip_h
|
|
||||||
#define fragmentzip_h
|
|
||||||
|
|
||||||
typedef void fragmentzip_t;
|
|
||||||
typedef void (*fragmentzip_process_callback_t)(unsigned int progress);
|
|
||||||
fragmentzip_t *fragmentzip_open(const char *url);
|
|
||||||
int fragmentzip_download_file(fragmentzip_t *info, const char *remotepath, const char *savepath, fragmentzip_process_callback_t callback);
|
|
||||||
void fragmentzip_close(fragmentzip_t *info);
|
|
||||||
|
|
||||||
#endif /* fragmentzip_h */
|
|
||||||
Submodule Sources/libfragmentzip/libfragmentzip-source deleted from 9a899fde3c
Submodule Sources/libimobiledevice/dependencies/libimobiledevice deleted from cc540a20e6
Submodule Sources/libimobiledevice/dependencies/libimobiledevice-glue deleted from 6fcb879459
Submodule Sources/libimobiledevice/dependencies/libplist deleted from bfc97788f0
Submodule Sources/libimobiledevice/dependencies/libusbmuxd deleted from 4e14ae142f
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice-glue/src/common.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../dependencies/libimobiledevice-glue/src
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/afc.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/bt_packet_logger.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/companion_proxy.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/debugserver.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/device_link_service.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/diagnostics_relay.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/file_relay.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/heartbeat.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/house_arrest.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/idevice.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/installation_proxy.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/lockdown.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/misagent.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/mobile_image_mounter.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/mobileactivation.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/mobilebackup.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/mobilebackup2.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/mobilesync.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/notification_proxy.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/preboard.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/property_list_service.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/restore.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/reverse_proxy.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/sbservices.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/screenshotr.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/service.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/syslog_relay.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/webinspector.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/afc.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/bt_packet_logger.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../../dependencies/libimobiledevice/common/debug.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../../dependencies/libimobiledevice/common/userpref.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/companion_proxy.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/debugserver.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/device_link_service.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/diagnostics_relay.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/file_relay.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/heartbeat.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/house_arrest.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/idevice.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/installation_proxy.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/lockdown-cu.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/lockdown.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/misagent.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/mobile_image_mounter.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/mobileactivation.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/mobilebackup.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/mobilebackup2.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/mobilesync.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/notification_proxy.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/preboard.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/property_list_service.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/restore.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/reverse_proxy.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/sbservices.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/screenshotr.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/service.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/syslog_relay.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libimobiledevice/src/webinspector.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libplist/src/base64.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libplist/src/bytearray.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libplist/src/hashtable.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libplist/src/jsmn.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libplist/src/plist.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libplist/src/ptrarray.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libplist/src/strbuf.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libplist/src/time64.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libplist/src/time64_limits.h
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libplist/libcnary/node.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libplist/libcnary/node_list.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libplist/src/Array.cpp
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libplist/src/Boolean.cpp
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libplist/src/Data.cpp
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libplist/src/Date.cpp
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libplist/src/Dictionary.cpp
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libplist/src/Integer.cpp
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libplist/src/Key.cpp
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libplist/src/Node.cpp
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libplist/src/Real.cpp
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libplist/src/String.cpp
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libplist/src/Structure.cpp
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libplist/src/Uid.cpp
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libplist/src/base64.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libplist/src/bplist.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libplist/src/bytearray.c
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../dependencies/libplist/src/hashtable.c
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user