comparison deploy/osx/copy-qt.sh @ 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
parents d18c89386a71
children 675bc2e08c11
comparison
equal deleted inserted replaced
767:7831f08e8f4f 768:52717c66833b
7 exit 2 7 exit 2
8 fi 8 fi
9 9
10 frameworks="QtCore QtNetwork QtGui QtXml QtWidgets QtPrintSupport" 10 frameworks="QtCore QtNetwork QtGui QtXml QtWidgets QtPrintSupport"
11 11
12 plugins="qtaccessiblewidgets qdds qgif qicns qico qjp2 qjpeg qmng qtga qtiff qwbmp qwebp qcocoa qminimal" 12 plugins="qtaccessiblewidgets qdds qgif qicns qico qjp2 qjpeg qmng qtga qtiff qwbmp qwebp"
13
14 platplugins="qcocoa qminimal"
13 15
14 qtdir=$(grep "Command:" Makefile | head -1 | awk '{ print $3; }' | sed s,/bin/.*,,) 16 qtdir=$(grep "Command:" Makefile | head -1 | awk '{ print $3; }' | sed s,/bin/.*,,)
15 17
16 if [ ! -d "$qtdir" ]; then 18 if [ ! -d "$qtdir" ]; then
17 echo "Failed to discover Qt installation directory from Makefile, exiting" 19 echo "Failed to discover Qt installation directory from Makefile, exiting"
18 exit 2 20 exit 2
19 fi 21 fi
20 22
21 fdir="$app.app/Contents/Frameworks" 23 fdir="$app.app/Contents/Frameworks"
22 pdir="$app.app/Contents/plugins" 24 pdir="$app.app/Contents/plugins"
25 ppdir="$app.app/Contents/plugins/platforms"
23 26
24 mkdir -p "$fdir" 27 mkdir -p "$fdir"
25 mkdir -p "$pdir" 28 mkdir -p "$pdir"
29 mkdir -p "$ppdir"
26 30
27 echo 31 echo
28 echo "Copying frameworks..." 32 echo "Copying frameworks..."
29 for fwk in $frameworks; do 33 for fwk in $frameworks; do
30 cp -v "$qtdir/lib/$fwk.framework/$fwk" "$fdir" || exit 2 34 cp -v "$qtdir/lib/$fwk.framework/$fwk" "$fdir" || exit 2
43 cp -v "$pfile" "$pdir" || exit 2 47 cp -v "$pfile" "$pdir" || exit 2
44 done 48 done
45 49
46 echo "Done" 50 echo "Done"
47 51
52 echo
53 echo "Copying platform plugins..."
54 for plug in $platplugins; do
55 pfile=$(ls "$qtdir"/plugins/*/lib"$plug".dylib)
56 if [ ! -f "$pfile" ]; then
57 echo "Failed to find plugin $plug, exiting"
58 exit 2
59 fi
60 # I really cannot be bothered to figure out why Qt fails if I copy
61 # to either one of these alone
62 cp -v "$pfile" "$pdir" || exit 2
63 cp -v "$pfile" "$ppdir" || exit 2
64 done
65
66 echo "Done"
67