mirror of
https://github.com/nimbold/Firelink.git
synced 2026-07-26 12:08:27 +00:00
fix: correctly implement AppVersion equality and fix yt-dlp binary signing
This commit is contained in:
@@ -175,11 +175,6 @@ if command -v codesign &> /dev/null; then
|
||||
|
||||
sign_mach_o_file() {
|
||||
local path="$1"
|
||||
case "$path" in
|
||||
*/Python.framework/Python|*/Python.framework/Versions/Current/*)
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
||||
if file "$path" | grep -q 'Mach-O'; then
|
||||
if ! sign_path "$path"; then
|
||||
@@ -202,6 +197,10 @@ if command -v codesign &> /dev/null; then
|
||||
sign_mach_o_file "$executable_path"
|
||||
done < <(find "$RESOURCES_DIR" -type f -print0)
|
||||
|
||||
while IFS= read -r -d '' bundle_path; do
|
||||
sign_path "$bundle_path"
|
||||
done < <(find "$RESOURCES_DIR" \( -name "*.xpc" -o -name "*.framework" \) -type d -depth -print0)
|
||||
|
||||
sign_path "$MACOS_DIR/$APP_NAME"
|
||||
sign_path "$APP_DIR"
|
||||
codesign --verify --deep --verbose=2 "$APP_DIR" || true
|
||||
|
||||
@@ -299,6 +299,21 @@ struct AppVersion: Comparable, CustomStringConvertible {
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
static func == (lhs: AppVersion, rhs: AppVersion) -> Bool {
|
||||
let count = max(lhs.components.count, rhs.components.count)
|
||||
|
||||
for index in 0..<count {
|
||||
let left = index < lhs.components.count ? lhs.components[index] : 0
|
||||
let right = index < rhs.components.count ? rhs.components[index] : 0
|
||||
|
||||
if left != right {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
private extension JSONDecoder {
|
||||
|
||||
Reference in New Issue
Block a user