Kaydet (Commit) c506639c authored tarafından Tor Lillqvist's avatar Tor Lillqvist

A few improvements to macosx-codesign-app-bundle

Try harder to handle app bundles with space in name. (Not sure if this
version yet does that 100%.)

Include the directory names in the "ids" to make them unique. There
are lots of files with the same name (in different directories, of
course), especially in an app bundle that includes help in multiple
languages.

Change-Id: I424c539f6389ac6f7c9cef96aeb873ddac459f78
üst 9835fa87
...@@ -40,11 +40,14 @@ APP_BUNDLE="$1" ...@@ -40,11 +40,14 @@ APP_BUNDLE="$1"
# add some where it makes sense. Make a depth-first search to sign the contents # add some where it makes sense. Make a depth-first search to sign the contents
# of e.g. the spotlight plugin before attempting to sign the plugin itself # of e.g. the spotlight plugin before attempting to sign the plugin itself
find -d $APP_BUNDLE \( -name '*.dylib' -or -name '*.so' -or -name '*.fodt' \ find -d "$APP_BUNDLE" \( -name '*.dylib' -or -name '*.so' -or -name '*.fodt' \
-or -name 'schema.strings' -or -name 'schema.xml' -or -name '*.mdimporter' \ -or -name 'schema.strings' -or -name 'schema.xml' -or -name '*.mdimporter' \
-or -name '*.jar' -or -name '*.jnilib' -or -name 'LICENSE' -or -name 'LICENSE.html' \ -or -name '*.jar' -or -name '*.jnilib' -or -name 'LICENSE' -or -name 'LICENSE.html' \
-or -name '*.applescript' \) ! -type l | grep -v "LibreOfficePython\.framework" | \ -or -name '*.applescript' \) ! -type l | grep -v "LibreOfficePython\.framework" | \
xargs codesign --verbose --prefix=$MACOSX_BUNDLE_IDENTIFIER. --sign "$MACOSX_CODESIGNING_IDENTITY" while read file; do
id=`echo ${file#${APP_BUNDLE}/Contents/} | sed -e 's,/,.,g'`
codesign --verbose --identifier=$MACOSX_BUNDLE_IDENTIFIER.$id --sign "$MACOSX_CODESIGNING_IDENTITY" "$file"
done
find $APP_BUNDLE -name '*.dylib.*' ! -type l | \ find $APP_BUNDLE -name '*.dylib.*' ! -type l | \
while read dylib; do \ while read dylib; do \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment