Mercurial > hg > tony
changeset 516:449a0355f864 v2.0_osx_deploy
Deployment fixes. Qt on OSX now seems to depend on QtDBus, so copy that in, and also fail if anything is found to depend on an absent Qt framework.
author | Chris Cannam |
---|---|
date | Fri, 23 Oct 2015 08:50:39 +0100 |
parents | b575e0890efb |
children | 3fd18a6dc761 |
files | deploy/osx/copy-qt.sh deploy/osx/paths.sh tonyapp.pro |
diffstat | 3 files changed, 18 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/deploy/osx/copy-qt.sh Tue Oct 20 12:55:26 2015 +0100 +++ b/deploy/osx/copy-qt.sh Fri Oct 23 08:50:39 2015 +0100 @@ -9,7 +9,7 @@ exit 2 fi -frameworks="QtCore QtNetwork QtGui QtXml QtSvg QtWidgets QtPrintSupport" +frameworks="QtCore QtNetwork QtGui QtXml QtSvg QtWidgets QtPrintSupport QtDBus" plugins="dds gif icns ico jp2 jpeg mng tga tiff wbmp webp cocoa minimal offscreen"
--- a/deploy/osx/paths.sh Tue Oct 20 12:55:26 2015 +0100 +++ b/deploy/osx/paths.sh Fri Oct 23 08:50:39 2015 +0100 @@ -1,6 +1,6 @@ #!/bin/bash -set -eu +set -e app="$1" if [ -z "$app" ]; then @@ -9,7 +9,9 @@ exit 2 fi -frameworks="QtCore QtNetwork QtGui QtXml QtSvg 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" @@ -29,7 +31,7 @@ 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; }') + 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/,," \ @@ -39,6 +41,16 @@ done done +find "$app.app" -type f -print | while read x; do + 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 +done + echo "Done: be sure to run the app and see that it works!"