changeset 1078:e206741df37d sv_v2.5_osx_deploy

Merge
author Chris Cannam
date Fri, 23 Oct 2015 08:44:56 +0100
parents bd3728701e1e (diff) d99060cebe0c (current diff)
children 7e1dbbff314f
files
diffstat 3 files changed, 36 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/deploy/osx/copy-qt.sh	Thu Oct 22 12:36:15 2015 +0100
+++ b/deploy/osx/copy-qt.sh	Fri Oct 23 08:44:56 2015 +0100
@@ -7,7 +7,7 @@
 	exit 2
 fi
 
-frameworks="QtCore QtNetwork QtGui QtXml QtWidgets QtPrintSupport"
+frameworks="QtCore QtNetwork QtGui QtXml QtWidgets QtPrintSupport QtDBus"
 
 plugins="dds gif icns ico jp2 jpeg mng tga tiff wbmp webp cocoa minimal offscreen"
 
--- a/deploy/osx/deploy.sh	Thu Oct 22 12:36:15 2015 +0100
+++ b/deploy/osx/deploy.sh	Fri Oct 23 08:44:56 2015 +0100
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+set -e
+
 # Execute this from the top-level directory of the project (the one
 # that contains the .app bundle).  Supply the name of the .app bundle
 # as argument (the target will use $app.app regardless, but we need
@@ -16,6 +18,8 @@
 fi
 app=`basename "$source" .app`
 
+set -u
+
 version=`perl -p -e 's/^[^"]*"([^"]*)".*$/$1/' version.h`
 case "$version" in
     [0-9].[0-9]) bundleVersion="$version".0 ;;
@@ -34,6 +38,21 @@
 deploy/osx/paths.sh "$app"
 
 echo
+echo "Copying in qt.conf to set local-only plugin paths."
+echo "Make sure all necessary Qt plugins are in $source/Contents/plugins/*"
+echo "You probably want platforms/, accessible/ and imageformats/ subdirectories."
+cp deploy/osx/qt.conf "$source"/Contents/Resources/qt.conf
+
+echo
+echo "Writing version $bundleVersion in to bundle."
+echo "(This should be a three-part number: major.minor.point)"
+
+perl -p -e "s/SV_VERSION/$bundleVersion/" deploy/osx/Info.plist \
+    > "$source"/Contents/Info.plist
+
+echo "Done: check $source/Contents/Info.plist for sanity please"
+
+echo
 echo "Making target tree."
 
 volume="$app"-"$version"
@@ -48,21 +67,6 @@
 
 echo "Done"
 
-echo
-echo "Copying in qt.conf to set local-only plugin paths."
-echo "Make sure all necessary Qt plugins are in $target/Contents/plugins/*"
-echo "You probably want platforms/, accessible/ and imageformats/ subdirectories."
-cp deploy/osx/qt.conf "$target"/Contents/Resources/qt.conf
-
-echo
-echo "Writing version $bundleVersion in to bundle."
-echo "(This should be a three-part number: major.minor.point)"
-
-perl -p -e "s/SV_VERSION/$bundleVersion/" deploy/osx/Info.plist \
-    > "$target"/Contents/Info.plist
-
-echo "Done: check $target/Contents/Info.plist for sanity please"
-
 deploy/osx/sign.sh "$volume" || exit 1
 
 echo
--- a/deploy/osx/paths.sh	Thu Oct 22 12:36:15 2015 +0100
+++ b/deploy/osx/paths.sh	Fri Oct 23 08:44:56 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!"