Skip to content

Instantly share code, notes, and snippets.

@informationsea
Created September 21, 2014 06:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save informationsea/f5d3e8993822310790c4 to your computer and use it in GitHub Desktop.
Save informationsea/f5d3e8993822310790c4 to your computer and use it in GitHub Desktop.
Code sign script for Qt based application
#!/bin/sh
QTPATH=/usr/local/Qt-5.3.2-systemsqlite
CODE_SIGN_IDENTITY="Developer ID Application: YOURID"
APPNAME=APP.app
for i in `find ${APPNAME}/Contents/Frameworks -name '*.framework'`; do
BASENAME="${i##*/}"
pushd $i
rmdir Resources
mkdir -p Versions/5/Resources
ln -s Versions/5/Resources .
pushd Versions
ln -s 5 Current
popd
cp ${QTPATH}/lib/$BASENAME/Contents/Info.plist Versions/5/Resources
popd
done
find ${APPNAME} -type f -perm 755 -exec codesign --force --verify --verbose -s "$CODE_SIGN_IDENTITY" '{}' ';'
find ${APPNAME} -name '*.framework' -exec codesign --force --verify --verbose -s "$CODE_SIGN_IDENTITY" '{}' ';'
codesign --force --verify --verbose -s "$CODE_SIGN_IDENTITY" ${APPNAME}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment