changeset 768:52717c66833b 2.4beta1

Attempt to make Qt plugin loading work. But it isn't.
author Chris Cannam
date Wed, 13 Aug 2014 22:30:41 +0100 (2014-08-13)
parents 7831f08e8f4f
children 675bc2e08c11
files deploy/osx/copy-qt.sh
diffstat 1 files changed, 21 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/deploy/osx/copy-qt.sh	Wed Aug 13 22:15:31 2014 +0100
+++ b/deploy/osx/copy-qt.sh	Wed Aug 13 22:30:41 2014 +0100
@@ -9,7 +9,9 @@
 
 frameworks="QtCore QtNetwork QtGui QtXml QtWidgets QtPrintSupport"
 
-plugins="qtaccessiblewidgets qdds qgif qicns qico qjp2 qjpeg qmng qtga qtiff qwbmp qwebp qcocoa qminimal"
+plugins="qtaccessiblewidgets qdds qgif qicns qico qjp2 qjpeg qmng qtga qtiff qwbmp qwebp"
+
+platplugins="qcocoa qminimal"
 
 qtdir=$(grep "Command:" Makefile | head -1 | awk '{ print $3; }' | sed s,/bin/.*,,)
 
@@ -20,9 +22,11 @@
 
 fdir="$app.app/Contents/Frameworks"
 pdir="$app.app/Contents/plugins"
+ppdir="$app.app/Contents/plugins/platforms"
 
 mkdir -p "$fdir"
 mkdir -p "$pdir"
+mkdir -p "$ppdir"
 
 echo
 echo "Copying frameworks..."
@@ -45,3 +49,19 @@
 
 echo "Done"
 
+echo
+echo "Copying platform plugins..."
+for plug in $platplugins; do
+    pfile=$(ls "$qtdir"/plugins/*/lib"$plug".dylib)
+    if [ ! -f "$pfile" ]; then
+	echo "Failed to find plugin $plug, exiting"
+	exit 2
+    fi
+    # I really cannot be bothered to figure out why Qt fails if I copy
+    # to either one of these alone
+    cp -v "$pfile" "$pdir" || exit 2
+    cp -v "$pfile" "$ppdir" || exit 2
+done
+
+echo "Done"
+