Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ xcuserdata

/.build
/.vscode
/.idea/workspace.xml
7 changes: 5 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "Sources/ldid-core"]
path = Sources/ldid-core
[submodule "Dependencies/ldid"]
path = Dependencies/ldid
url = https://github.com/rileytestut/ldid.git
[submodule "Dependencies/OpenSSL"]
path = Dependencies/OpenSSL
url = https://github.com/krzyzanowskim/OpenSSL
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions Dependencies/OpenSSL
Submodule OpenSSL added at 872961
1 change: 1 addition & 0 deletions Dependencies/ldid
Submodule ldid added at 6a6a92
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
220 changes: 132 additions & 88 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,125 +11,118 @@ let package = Package(
.macOS(.v11),
],
products: [
// MARK: - AltSign
.library(
name: "AltSign",
targets: ["AltSign"]
),

.library(
name: "AltSign-Static",
type: .static,
targets: ["AltSign"]
),

.library(
name: "AltSign-Dynamic",
type: .dynamic,
targets: ["AltSign"]
targets: ["AltSign", "CAltSign", "CoreCrypto", "CCoreCrypto", "ldid", "ldid-core", "OpenSSL"]
),

// MARK: - CoreCrypto
.library(
name: "CoreCrypto",
targets: ["CoreCrypto", "CCoreCrypto"]
),

.library(
name: "CoreCrypto-Static",
type: .static,
targets: ["CoreCrypto", "CCoreCrypto"]
),

.library(
name: "CoreCrypto-Dynamic",
type: .dynamic,
targets: ["CoreCrypto", "CCoreCrypto"]
),

// MARK: - CCoreCrypto
.library(
name: "CCoreCrypto",
targets: ["CCoreCrypto"]
),

.library(
name: "CCoreCrypto-Static",
.library(
name: "AltSign-Static",
type: .static,
targets: ["CCoreCrypto"]
),

.library(
name: "CCoreCrypto-Dynamic",
type: .dynamic,
targets: ["CCoreCrypto"]
)
targets: ["AltSign", "CAltSign", "CoreCrypto", "CCoreCrypto", "ldid", "ldid-core"]
)
],


//TODO: make targets use binaries as dependencies rather than compile from source
dependencies: [
.package(url: "https://github.com/krzyzanowskim/OpenSSL.git", .upToNextMinor(from: "1.1.180")),
.package(url: "https://github.com/SideStore/iMobileDevice.swift", .upToNextMinor(from: "1.0.4"))
// .package(url: "https://github.com/krzyzanowskim/OpenSSL.git", .upToNextMinor(from: "1.1.180")),
// .package(url: "https://github.com/SideStore/iMobileDevice.swift", .upToNextMinor(from: "1.0.4"))
],





targets: [
// MARK: - AltSign
// exposing OpenSSL as target
.binaryTarget(
name: "OpenSSL",
path: "Dependencies/OpenSSL/Frameworks/OpenSSL.xcframework"
),

.target(
name: "AltSign",
dependencies: [
"CAltSign"
],
path: "AltSign/Sources",
cSettings: [
.headerSearchPath("../minizip/include"),
.define("CORECRYPTO_DONOT_USE_TRANSPARENT_UNION=1")
.headerSearchPath("Dependencies/minizip"),
.define("CORECRYPTO_DONOT_USE_TRANSPARENT_UNION=1"),
]
// swiftSettings: [
// .define("MARKETPLACE")
// ]
),

.testTarget(
name: "AltSignTests",
dependencies: ["AltSign"]
),
// .testTarget(
// name: "AltSignTests",
// dependencies: ["AltSign"]
// ),


.target(
name: "CAltSign",
dependencies: [
"CoreCrypto",
"ldid",
"minizip"
// "minizip"
],
publicHeadersPath: "include",
path: "",
exclude: [
"AltSign/ldid/alt_ldid.cpp",
"AltSign/ldid/alt_ldid.hpp",
"AltSign/Sources",
"AltSign/include/module.modulemap",
"Dependencies/corecrypto",
"Dependencies/ldid",
"Dependencies/OpenSSL",
"Dependencies/minizip/iowin32.c",
"Dependencies/minizip/Makefile",
"Dependencies/minizip/minizip.c",
"Dependencies/minizip/miniunz.c",
],
publicHeadersPath: "AltSign/include",
cSettings: [
.headerSearchPath("include/"),
.headerSearchPath("include/AltSign"),
.headerSearchPath("Capabilities"),
.headerSearchPath("../ldid"),
.headerSearchPath("../ldid/include"),
.headerSearchPath("../minizip/include"),
.headerSearchPath("../ldid"),
.define("unix", to: "1"),
// Recursive wildcard paths no longer work as of Xcode 16 :(
// .headerSearchPath("AltSign/**"),
.headerSearchPath("AltSign/include"),
.headerSearchPath("AltSign/include/AltSign"),
.headerSearchPath("AltSign/Capabilities"),
.headerSearchPath("Dependencies/ldid"),
.headerSearchPath("Dependencies/ldid/libplist/include"),
.headerSearchPath("Dependencies/minizip"),
.headerSearchPath("Dependencies/OpenSSL/ios/include"),
.define("unix=1"),
],
// multiple language targets are unsupported by xcode 16 ?!
cxxSettings: [
.headerSearchPath("include/"),
.headerSearchPath("include/AltSign"),
.headerSearchPath("Capabilities"),
.headerSearchPath("../ldid"),
.headerSearchPath("../ldid/include"),
.headerSearchPath("../minizip/include"),
.headerSearchPath("../ldid"),
.define("unix", to: "1"),
.headerSearchPath("AltSign/include"),
.headerSearchPath("AltSign/include/AltSign"),
.headerSearchPath("AltSign/Capabilities"),
.headerSearchPath("Dependencies/ldid"),
.headerSearchPath("Dependencies/ldid/libplist/include"),
.headerSearchPath("Dependencies/minizip"),
.headerSearchPath("Dependencies/OpenSSL/ios/include"),
.define("unix=1"),
],
linkerSettings: [
.linkedFramework("UIKit", .when(platforms: [.iOS])),
.linkedFramework("Security")
.linkedFramework("Security"),
]
),

// MARK: - ldid



.target(
name: "ldid-core",
dependencies: [
"OpenSSL",
.product(name: "libplist", package: "iMobileDevice.swift")
],
// dependencies: [
// "OpenSSL",
// .product(name: "libplist", package: "iMobileDevice.swift")
// ],
path: "Dependencies/ldid",
exclude: [
"ldid.hpp",
"ldid.cpp",
Expand All @@ -141,31 +134,77 @@ let package = Package(
"make.sh",
"deb.sh",
"plist.sh",

// if lib plist is included as dependency, then no need for source
"libplist/include",
"libplist/include/Makefile.am",
"libplist/fuzz",
"libplist/cython",
"libplist/m4",
"libplist/test",
"libplist/tools",
"libplist/AUTHORS",
"libplist/autogen.sh",
"libplist/configure.ac",
"libplist/COPYING",
"libplist/COPYING.LESSER",
"libplist/doxygen.cfg.in",
"libplist/Makefile.am",
"libplist/NEWS",
"libplist/README.md",
"libplist/src/Makefile.am",
"libplist/src/libplist++.pc.in",
"libplist/src/libplist.pc.in",
"libplist/libcnary/cnary.c",
"libplist/libcnary/COPYING",
"libplist/libcnary/Makefile.am",
"libplist/libcnary/README"
],
sources: [
"lookup2.c",
"libplist/src",
"libplist/libcnary"
],
publicHeadersPath: "",
cSettings: [
.headerSearchPath("libplist/include"),
.headerSearchPath("libplist/src"),
.headerSearchPath("libplist/libcnary/include"),
// .headerSearchPath("../OpenSSL/ios/include"),

.unsafeFlags(["-w"])
],
cxxSettings: [
.unsafeFlags(["-w"])
]
),

.target(
name: "ldid",
dependencies: ["ldid-core"],
path: "AltSign/ldid",
exclude: [
"alt_ldid.hpp"
],
sources: [
"alt_ldid.cpp"
],
publicHeadersPath: "include",
publicHeadersPath: "",
cSettings: [
.headerSearchPath("../ldid-core"),
.headerSearchPath("../../Dependencies/ldid"),
.headerSearchPath("../../Dependencies/ldid/libplist/include"),
.headerSearchPath("../../Dependencies/ldid/libplist/src"),
.headerSearchPath("../../Dependencies/ldid/libplist/libcnary/include"),
// .headerSearchPath("../../Dependencies/OpenSSL/ios/include"),
],
cxxSettings: [
.unsafeFlags(["-w"])
]
),

// MARK: - CoreCrypto

.target(
name: "CCoreCrypto",
path: "Dependencies/corecrypto",
exclude: [
"Sources/CoreCryptoMacros.swift"
],
Expand All @@ -178,8 +217,12 @@ let package = Package(
.target(
name: "CoreCrypto",
dependencies: ["CCoreCrypto"],
path: "Dependencies/corecrypto/Sources",
exclude: [
"Sources/ccsrp.m"
"ccsrp.m"
],
sources: [
"CoreCryptoMacros.swift"
],
cSettings: [
.define("CORECRYPTO_DONOT_USE_TRANSPARENT_UNION=1")
Expand All @@ -190,13 +233,14 @@ let package = Package(

.target(
name: "minizip",
path : "Dependencies/minizip"
sources: [
"minizip/zip.c",
"minizip/unzip.c",
"minizip/ioapi.c"
],
publicHeadersPath: "include"
)
publicHeadersPath: ""
)
],

cLanguageStandard: CLanguageStandard.gnu11,
Expand Down
45 changes: 0 additions & 45 deletions Sources/CoreCrypto/Sources/CoreCryptoMacros.swift

This file was deleted.

Loading
Loading