mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-28 19:58:56 +03:00
Ensure we sign the app bundle's main executable last
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
d4b9405870
commit
07d6456d5b
1 changed files with 10 additions and 1 deletions
|
@ -145,6 +145,15 @@ func codesignClientAppBundle(
|
|||
}
|
||||
|
||||
// Now we do the final codesign bit
|
||||
let binariesDir = "\(clientContentsDir)/MacOS"
|
||||
print("Code-signing Nextcloud Desktop Client binaries...")
|
||||
try recursivelyCodesign(path: "\(clientContentsDir)/MacOS/", identity: codeSignIdentity)
|
||||
try recursivelyCodesign(path: binariesDir, identity: codeSignIdentity)
|
||||
|
||||
guard let appName = clientAppDir.components(separatedBy: "/").last, clientAppDir.hasSuffix(".app") else {
|
||||
throw AppBundleSigningError.couldNotEnumerate("Failed to determine main executable name.")
|
||||
}
|
||||
|
||||
// Sign the main executable last
|
||||
let mainExecutableName = String(appName.dropLast(".app".count))
|
||||
try codesign(identity: codeSignIdentity, path: "\(binariesDir)/\(mainExecutableName)")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue