diff deploy/osx/paths.sh @ 1082:b2c45b831ea8 3.0-integration

Merge from default branch
author Chris Cannam
date Wed, 18 Nov 2015 12:08:33 +0000
parents 9fbd599b4e3a bd3728701e1e
children 2d48532a074b
line wrap: on
line diff
--- a/deploy/osx/paths.sh	Tue Oct 20 09:14:24 2015 +0100
+++ b/deploy/osx/paths.sh	Wed Nov 18 12:08:33 2015 +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 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"
@@ -27,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/,," \
@@ -37,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!"