Mercurial > hg > sonic-visualiser
diff deploy/osx/paths.sh @ 1398:6f5a40419b00 bqaudioio
Merge from branch bqresample
author | Chris Cannam |
---|---|
date | Wed, 07 Dec 2016 11:53:44 +0000 |
parents | 2d48532a074b |
children |
line wrap: on
line diff
--- a/deploy/osx/paths.sh Mon Aug 17 16:19:01 2015 +0100 +++ b/deploy/osx/paths.sh Wed Dec 07 11:53:44 2016 +0000 @@ -1,5 +1,7 @@ #!/bin/bash +set -e + app="$1" if [ -z "$app" ]; then echo "Usage: $0 <appname>" @@ -7,7 +9,9 @@ exit 2 fi -frameworks="QtCore QtNetwork QtGui QtXml QtWidgets QtPrintSupport" +set -u + +frameworks="QtCore QtNetwork QtGui QtXml QtSvg QtWidgets QtPrintSupport QtDBus" echo echo "I expect you to have already copied these frameworks from the Qt installation to" @@ -26,15 +30,30 @@ done for fwk in $frameworks; do - find "$app.app" -type f -print | while read x; do - current=$(otool -L "$x" | grep "$fwk" | grep amework | awk '{ print $1; }') - [ -z "$current" ] && continue - echo "$x has $current" - relative=$(echo "$x" | sed -e "s,$app.app/Contents/,," \ - -e 's,[^/]*/,../,g' -e 's,/[^/]*$,/Frameworks/'"$fwk"',' ) - echo "replacing with relative path $relative" - install_name_tool -change "$current" "@loader_path/$relative" "$x" - done + find "$app.app" -type f -print | while read x; do + if [ -x "$x" ]; then + current=$(otool -L "$x" | grep "$fwk" | grep amework | grep -v ':$' | awk '{ print $1; }') + [ -z "$current" ] && continue + echo "$x has $current" + relative=$(echo "$x" | sed -e "s,$app.app/Contents/,," \ + -e 's,[^/]*/,../,g' \ + -e 's,/[^/]*$,/Frameworks/'"$fwk"',' ) + echo "replacing with relative path $relative" + install_name_tool -change "$current" "@loader_path/$relative" "$x" + fi + done +done + +find "$app.app" -type f -print | while read x; do + if [ -x "$x" ]; then + qtdep=$(otool -L "$x" | grep Qt | grep amework | grep -v ':$' | grep -v '@loader_path' | awk '{ print $1; }') + if [ -n "$qtdep" ]; then + echo + echo "ERROR: File $x depends on Qt framework(s) not apparently present in the bundle:" + echo $qtdep + exit 1 + fi + fi done echo "Done: be sure to run the app and see that it works!"