comparison deploy/osx/sign.sh @ 699:646e48a0d3a5

Some work on macOS packaging
author Chris Cannam
date Tue, 11 Dec 2018 16:40:57 +0000
parents
children c59c17665162
comparison
equal deleted inserted replaced
698:52b8a499f379 699:646e48a0d3a5
1 #!/bin/bash
2
3 set -eu
4
5 # Execute this from the top-level directory of the project (the one
6 # that contains the .app bundle). Supply the name of the .app bundle
7 # as argument
8 dir="$1"
9 if [ -z "$dir" ] || [ ! -d "$dir" ]; then
10 echo "Usage: $0 <pkgdir>"
11 echo "Where pkgdir is the directory containing <MyApplication>.app"
12 echo "All .app bundles in pkgdir will be signed"
13 exit 2
14 fi
15
16 for app in "$dir"/*.app; do
17 find "$app" -name Qt\* -print | while read fr; do
18 codesign -s "Developer ID Application: Chris Cannam" -fv --deep "$fr"
19 done
20 find "$app" -name \*.dylib -print | while read fr; do
21 codesign -s "Developer ID Application: Chris Cannam" -fv --deep "$fr"
22 done
23 find "$app" -name \*.so -print | while read fr; do
24 codesign -s "Developer ID Application: Chris Cannam" -fv --deep "$fr"
25 done
26 codesign -s "Developer ID Application: Chris Cannam" -fv --deep "$app"
27 # codesign -s "Developer ID Application: Chris Cannam" -fv \
28 # --requirements '=designated => identifier "org.easymercurial.EasyMercurial" and ( (anchor apple generic and certificate leaf[field.1.2.840.113635.100.6.1.9] ) or (anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] and certificate leaf[field.1.2.840.113635.100.6.1.13] and certificate leaf[subject.OU] = "M2H8666U82"))' \
29 # "$app"
30 done
31