summaryrefslogtreecommitdiffstats
path: root/macosx/hbsign
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2019-08-31 07:40:39 +0200
committerDamiano Galassi <[email protected]>2019-08-31 07:40:39 +0200
commitd455488a6825aa2f015e1addb802ef98f4a5d0a3 (patch)
tree2d8b611c7db7eccad88758c28b39dcaecfd995d9 /macosx/hbsign
parent547364dd2368235dcf4e32b9f12efef6624c4c4d (diff)
macosx: use the correct entitlements to sign the cli.
Diffstat (limited to 'macosx/hbsign')
-rwxr-xr-xmacosx/hbsign11
1 files changed, 6 insertions, 5 deletions
diff --git a/macosx/hbsign b/macosx/hbsign
index 12bcbba65..7813c6c80 100755
--- a/macosx/hbsign
+++ b/macosx/hbsign
@@ -103,10 +103,11 @@ ENTITLEMENTS_CLI_FLAGS=""
if [[ "${SANDBOX}" == true ]]; then
ENTITLEMENTS_MAIN_FLAGS="--entitlements $SCRIPTDIR/HandBrake.entitlements"
ENTITLEMENTS_XPC_FLAGS="--entitlements $SCRIPTDIR/HandBrakeXPCService/HandBrakeXPCService.entitlements"
+ ENTITLEMENTS_CLI_FLAGS="--entitlements $SCRIPTDIR/HandBrakeXPCService/HandBrakeXPCService-RuntimeOnly.entitlements"
elif [[ "${RUNTIME}" == true ]]; then
ENTITLEMENTS_MAIN_FLAGS="--entitlements $SCRIPTDIR/HandBrake-RuntimeOnly.entitlements"
ENTITLEMENTS_XPC_FLAGS="--entitlements $SCRIPTDIR/HandBrakeXPCService/HandBrakeXPCService-RuntimeOnly.entitlements"
- ENTITLEMENTS_CLI_FLAGS="${ENTITLEMENTS_MAIN_FLAGS}"
+ ENTITLEMENTS_CLI_FLAGS="${ENTITLEMENTS_XPC_FLAGS}"
fi
function sign { # sign flags target
@@ -124,7 +125,7 @@ function sign { # sign flags target
elif [[ "${FLAGS}" == "xpc" ]]; then
codesign --force --verbose $RUNTIME_FLAGS $ENTITLEMENTS_XPC_FLAGS -s "${IDENTITY}" "${2:-}" >>"${LOG}" 2>&1 || exit_with_error 1 "Signing failed. More info may be available in ${LOG}"
elif [[ "${FLAGS}" == "cli" ]]; then
- codesign --force --verbose $RUNTIME_FLAGS $ENTITLEMENTS_CLI_FLAGS -s "${IDENTITY}" "${2:-}" >>"${LOG}" 2>&1 || exit_with_error 1 "Signing failed. More info may be available in ${LOG}"
+ codesign --force --verbose $RUNTIME_FLAGS $ENTITLEMENTS_CLI_FLAGS --prefix fr.handbrake. -s "${IDENTITY}" "${2:-}" >>"${LOG}" 2>&1 || exit_with_error 1 "Signing failed. More info may be available in ${LOG}"
else
codesign --force --verbose $RUNTIME_FLAGS -s "${IDENTITY}" "${2:-}" >>"${LOG}" 2>&1 || exit_with_error 1 "Signing failed. More info may be available in ${LOG}"
fi
@@ -168,13 +169,13 @@ for TARGET in "${@}"; do
sign "default" "${TARGET}"/Contents/XPCServices/org.sparkle-project.InstallerStatus.xpc
fi
+ echo " Signing Executable"
if [[ "${TARGET##*/}" == 'HandBrakeCLI' ]]; then
sign "cli" "${TARGET}"
+ else
+ sign "main" "${TARGET}"
fi
- echo " Signing Executable"
- sign "main" "${TARGET}" fr.handbrake.HandBrake
-
if [[ "${TARGET##*/}" == 'HandBrake.app' ]]; then
echo " Validating Frameworks"
codesign --verify -vv "${TARGET}"/Contents/Frameworks/HandBrakeKit.framework >>"${LOG}" 2>&1 || exit_with_error 1 "Validation failed. More info may be available in ${LOG}"