Mercurial > hg > sonic-visualiser
comparison deploy/osx/copy-qt.sh @ 769:675bc2e08c11 2.4beta1
Fix plugin copying (correct target directories)
author | Chris Cannam |
---|---|
date | Thu, 14 Aug 2014 09:11:36 +0100 |
parents | 52717c66833b |
children | 4a7c62938a13 |
comparison
equal
deleted
inserted
replaced
768:52717c66833b | 769:675bc2e08c11 |
---|---|
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" | 12 plugins="taccessiblewidgets dds gif icns ico jp2 jpeg mng tga tiff wbmp webp cocoa minimal offscreen" |
13 | |
14 platplugins="qcocoa qminimal" | |
15 | 13 |
16 qtdir=$(grep "Command:" Makefile | head -1 | awk '{ print $3; }' | sed s,/bin/.*,,) | 14 qtdir=$(grep "Command:" Makefile | head -1 | awk '{ print $3; }' | sed s,/bin/.*,,) |
17 | 15 |
18 if [ ! -d "$qtdir" ]; then | 16 if [ ! -d "$qtdir" ]; then |
19 echo "Failed to discover Qt installation directory from Makefile, exiting" | 17 echo "Failed to discover Qt installation directory from Makefile, exiting" |
20 exit 2 | 18 exit 2 |
21 fi | 19 fi |
22 | 20 |
23 fdir="$app.app/Contents/Frameworks" | 21 fdir="$app.app/Contents/Frameworks" |
24 pdir="$app.app/Contents/plugins" | 22 pdir="$app.app/Contents/plugins" |
25 ppdir="$app.app/Contents/plugins/platforms" | |
26 | 23 |
27 mkdir -p "$fdir" | 24 mkdir -p "$fdir" |
28 mkdir -p "$pdir" | 25 mkdir -p "$pdir" |
29 mkdir -p "$ppdir" | |
30 | 26 |
31 echo | 27 echo |
32 echo "Copying frameworks..." | 28 echo "Copying frameworks..." |
33 for fwk in $frameworks; do | 29 for fwk in $frameworks; do |
34 cp -v "$qtdir/lib/$fwk.framework/$fwk" "$fdir" || exit 2 | 30 cp -v "$qtdir/lib/$fwk.framework/$fwk" "$fdir" || exit 2 |
37 echo "Done" | 33 echo "Done" |
38 | 34 |
39 echo | 35 echo |
40 echo "Copying plugins..." | 36 echo "Copying plugins..." |
41 for plug in $plugins; do | 37 for plug in $plugins; do |
42 pfile=$(ls "$qtdir"/plugins/*/lib"$plug".dylib) | 38 pfile=$(ls "$qtdir"/plugins/*/libq"$plug".dylib) |
43 if [ ! -f "$pfile" ]; then | 39 if [ ! -f "$pfile" ]; then |
44 echo "Failed to find plugin $plug, exiting" | 40 echo "Failed to find plugin $plug, exiting" |
45 exit 2 | 41 exit 2 |
46 fi | 42 fi |
47 cp -v "$pfile" "$pdir" || exit 2 | 43 target="$pdir"/${pfile##?*plugins/} |
44 tdir=`dirname "$target"` | |
45 mkdir -p "$tdir" | |
46 cp -v "$pfile" "$target" || exit 2 | |
48 done | 47 done |
49 | 48 |
50 echo "Done" | 49 echo "Done" |
51 | 50 |
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 | 51 |
66 echo "Done" | |
67 |