Skip to content

Commit 18437fc

Browse files
committed
Merge branch 'clean' into main
2 parents b684457 + c717d95 commit 18437fc

File tree

1 file changed

+11
-16
lines changed

1 file changed

+11
-16
lines changed

vice/src/arch/shared/make-bindist_osx.sh

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ WARN_CODE_SIGN=false
3636
[ -z ${DEPS_PREFIX+set} ] && (>&2 echo "ERROR: Please set DEPS_PREFIX environment variable to something like /opt/local, /usr/local, or /opt/homebrew"; exit 1)
3737

3838
if [ -z ${CODE_SIGN_ID+set} ]; then
39-
CODE_SIGN_ID=$(security find-identity -v -p codesigning | grep "Developer ID Application" | head -n1 | awk -F'"' '{ print $2 }')
39+
# Sign as ad-hoc if no identity is provided
40+
CODE_SIGN_ID="-"
4041
WARN_CODE_SIGN=true
4142
fi
4243

@@ -703,7 +704,13 @@ cp "$TOP_DIR/data/hotkeys/"*.vhk "$APP_HOTKEYS/"
703704
# --- code signing (for Apple notarisation) ------------------------------------
704705

705706
code_sign_file () {
706-
codesign -s "$CODE_SIGN_ID" --timestamp --options runtime -f "$1"
707+
if [ "$CODE_SIGN_ID" = "-" ]; then
708+
# Ad-hoc signing
709+
codesign --force --sign - -f "$1"
710+
else
711+
# Signing with provided identity
712+
codesign -s "$CODE_SIGN_ID" --timestamp --options runtime -f "$1"
713+
fi
707714
}
708715

709716
if [ -n "$CODE_SIGN_ID" ]; then
@@ -767,24 +774,12 @@ fi
767774

768775
# --- show warnings ------------------------------------------------------------
769776

770-
if [ -z "$CODE_SIGN_ID" ]; then
771-
cat <<HEREDOC | sed 's/^ *//'
772-
773-
****
774-
Bindist is not codesigned. To sign, export the CODE_SIGN_ID environment variable to
775-
something like "Developer ID Application: <NAME> (<ID>)".
776-
777-
Run 'security find-identity -v -p codesigning' to list available identities.
778-
****
779-
780-
HEREDOC
781-
fi
782-
783777
if $WARN_CODE_SIGN; then
784778
cat <<HEREDOC | sed 's/^ *//'
785779
786780
****
787-
CODE_SIGN_ID environment variable not set, using detected value: $CODE_SIGN_ID
781+
CODE_SIGN_ID environment variable not set, using ad-hoc signature. User will
782+
need to override Gatekeeper to run the apps.
788783
789784
Run 'security find-identity -v -p codesigning' to list available identities,
790785
and set CODE_SIGN_ID to something like "Developer ID Application: <NAME> (<ID>)".

0 commit comments

Comments
 (0)