diff options
Diffstat (limited to 'macosx')
-rwxr-xr-x | macosx/hbsign | 11 | ||||
-rw-r--r-- | macosx/module.defs | 4 |
2 files changed, 8 insertions, 7 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}" diff --git a/macosx/module.defs b/macosx/module.defs index 47a13ead4..ce0a5e0ac 100644 --- a/macosx/module.defs +++ b/macosx/module.defs @@ -100,7 +100,7 @@ MACOSX.XCODE_ARCHIVE = $(strip \ -archivePath '$(MACOSX.xarchive/)' ) ifeq (1,$(SECURITY.sandbox)) -MACOSX.SIGN = $(strip $(MACOSX.src/)hbsign -sr '$(ID)' $(MACOSX.xroot/)HandBrake.app $(MACOSX.xroot/)HandBrakeCLI) + MACOSX.SIGN = $(strip $(MACOSX.src/)hbsign -sr '$(ID)' $(MACOSX.xroot/)HandBrake.app $(MACOSX.xroot/)HandBrakeCLI) else -MACOSX.SIGN = $(strip $(MACOSX.src/)hbsign -r '$(ID)' $(MACOSX.xroot/)HandBrake.app $(MACOSX.xroot/)HandBrakeCLI) + MACOSX.SIGN = $(strip $(MACOSX.src/)hbsign -r '$(ID)' $(MACOSX.xroot/)HandBrake.app $(MACOSX.xroot/)HandBrakeCLI) endif |