Mercurial > hg > sonic-visualiser
comparison deploy/osx/copy-qt.sh @ 745:d18c89386a71
OS/X build: copy frameworks and plugins automatically
author | Chris Cannam |
---|---|
date | Mon, 07 Jul 2014 08:14:08 +0100 |
parents | |
children | 52717c66833b f8264ad5737a |
comparison
equal
deleted
inserted
replaced
744:ccf3749cbaea | 745:d18c89386a71 |
---|---|
1 #!/bin/bash | |
2 | |
3 app="$1" | |
4 if [ -z "$app" ]; then | |
5 echo "Usage: $0 <appname>" | |
6 echo "Provide appname without the .app extension, please" | |
7 exit 2 | |
8 fi | |
9 | |
10 frameworks="QtCore QtNetwork QtGui QtXml QtWidgets QtPrintSupport" | |
11 | |
12 plugins="qtaccessiblewidgets qdds qgif qicns qico qjp2 qjpeg qmng qtga qtiff qwbmp qwebp qcocoa qminimal" | |
13 | |
14 qtdir=$(grep "Command:" Makefile | head -1 | awk '{ print $3; }' | sed s,/bin/.*,,) | |
15 | |
16 if [ ! -d "$qtdir" ]; then | |
17 echo "Failed to discover Qt installation directory from Makefile, exiting" | |
18 exit 2 | |
19 fi | |
20 | |
21 fdir="$app.app/Contents/Frameworks" | |
22 pdir="$app.app/Contents/plugins" | |
23 | |
24 mkdir -p "$fdir" | |
25 mkdir -p "$pdir" | |
26 | |
27 echo | |
28 echo "Copying frameworks..." | |
29 for fwk in $frameworks; do | |
30 cp -v "$qtdir/lib/$fwk.framework/$fwk" "$fdir" || exit 2 | |
31 done | |
32 | |
33 echo "Done" | |
34 | |
35 echo | |
36 echo "Copying plugins..." | |
37 for plug in $plugins; do | |
38 pfile=$(ls "$qtdir"/plugins/*/lib"$plug".dylib) | |
39 if [ ! -f "$pfile" ]; then | |
40 echo "Failed to find plugin $plug, exiting" | |
41 exit 2 | |
42 fi | |
43 cp -v "$pfile" "$pdir" || exit 2 | |
44 done | |
45 | |
46 echo "Done" | |
47 |