Mercurial > hg > tony
annotate deploy/osx/sign.sh @ 567:dd344309667f
Some work on macOS deployment - trying to get this one working with sandboxing. File saving is currently not working (temporary file write failing perhaps?)
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Tue, 19 Feb 2019 17:46:01 +0000 |
parents | 1dddd90cb84e |
children | e37d76c3242f |
rev | line source |
---|---|
Chris@100 | 1 #!/bin/bash |
Chris@62 | 2 |
Chris@437 | 3 set -eu |
Chris@437 | 4 |
Chris@62 | 5 # Execute this from the top-level directory of the project (the one |
Chris@62 | 6 # that contains the .app bundle). Supply the name of the .app bundle |
Chris@62 | 7 # as argument |
Chris@62 | 8 dir="$1" |
Chris@62 | 9 if [ -z "$dir" ] || [ ! -d "$dir" ]; then |
Chris@62 | 10 echo "Usage: $0 <pkgdir>" |
Chris@62 | 11 echo "Where pkgdir is the directory containing <MyApplication>.app" |
Chris@62 | 12 echo "All .app bundles in pkgdir will be signed" |
Chris@62 | 13 exit 2 |
Chris@62 | 14 fi |
Chris@544 | 15 |
cannam@567 | 16 entitlements=deploy/osx/Entitlements.plist |
cannam@567 | 17 |
Chris@62 | 18 for app in "$dir"/*.app; do |
Chris@544 | 19 find "$app" -name \*.dylib -print | while read fr; do |
Chris@544 | 20 codesign -s "Developer ID Application: Chris Cannam" -fv --deep --options runtime "$fr" |
Chris@100 | 21 done |
cannam@567 | 22 codesign -s "Developer ID Application: Chris Cannam" -fv --deep --options runtime --entitlements "$entitlements" "$app/Contents/MacOS/Tony" |
cannam@567 | 23 codesign -s "Developer ID Application: Chris Cannam" -fv --deep --options runtime --entitlements "$entitlements" "$app" |
Chris@62 | 24 done |
Chris@62 | 25 |