diff deploy/osx/paths.sh @ 1077:bd3728701e1e

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:44:37 +0100
parents 5462ac97d28f
children b2c45b831ea8
line wrap: on
line diff
--- a/deploy/osx/paths.sh	Thu Oct 22 12:26:02 2015 +0100
+++ b/deploy/osx/paths.sh	Fri Oct 23 08:44:37 2015 +0100
@@ -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 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!"