Mercurial > hg > sonic-visualiser
annotate deploy/osx/copy-qt.sh @ 1303:409ee88107e8 project-file-rework
Numerous Windows fixes in subrepos
author | Chris Cannam |
---|---|
date | Fri, 28 Oct 2016 14:32:45 +0100 |
parents | 1e63105fc82d |
children | 2451e7bb90af |
rev | line source |
---|---|
Chris@745 | 1 #!/bin/bash |
Chris@745 | 2 |
Chris@1055 | 3 set -eu |
Chris@1055 | 4 |
Chris@745 | 5 app="$1" |
Chris@745 | 6 if [ -z "$app" ]; then |
Chris@745 | 7 echo "Usage: $0 <appname>" |
Chris@745 | 8 echo "Provide appname without the .app extension, please" |
Chris@745 | 9 exit 2 |
Chris@745 | 10 fi |
Chris@745 | 11 |
Chris@1082 | 12 frameworks="QtCore QtNetwork QtGui QtXml QtSvg QtWidgets QtPrintSupport QtDBus" |
Chris@745 | 13 |
Chris@1153 | 14 plugins="dds gif icns ico jpeg tga tiff wbmp webp cocoa minimal offscreen" |
Chris@745 | 15 |
Chris@745 | 16 qtdir=$(grep "Command:" Makefile | head -1 | awk '{ print $3; }' | sed s,/bin/.*,,) |
Chris@745 | 17 |
Chris@745 | 18 if [ ! -d "$qtdir" ]; then |
Chris@745 | 19 echo "Failed to discover Qt installation directory from Makefile, exiting" |
Chris@745 | 20 exit 2 |
Chris@745 | 21 fi |
Chris@745 | 22 |
Chris@745 | 23 fdir="$app.app/Contents/Frameworks" |
Chris@745 | 24 pdir="$app.app/Contents/plugins" |
Chris@745 | 25 |
Chris@745 | 26 mkdir -p "$fdir" |
Chris@745 | 27 mkdir -p "$pdir" |
Chris@745 | 28 |
Chris@745 | 29 echo |
Chris@745 | 30 echo "Copying frameworks..." |
Chris@745 | 31 for fwk in $frameworks; do |
Chris@745 | 32 cp -v "$qtdir/lib/$fwk.framework/$fwk" "$fdir" || exit 2 |
Chris@745 | 33 done |
Chris@745 | 34 |
Chris@745 | 35 echo "Done" |
Chris@745 | 36 |
Chris@745 | 37 echo |
Chris@745 | 38 echo "Copying plugins..." |
Chris@745 | 39 for plug in $plugins; do |
Chris@772 | 40 pfile=$(ls "$qtdir"/plugins/*/libq"$plug".dylib) |
Chris@745 | 41 if [ ! -f "$pfile" ]; then |
Chris@745 | 42 echo "Failed to find plugin $plug, exiting" |
Chris@745 | 43 exit 2 |
Chris@745 | 44 fi |
Chris@772 | 45 target="$pdir"/${pfile##?*plugins/} |
Chris@772 | 46 tdir=`dirname "$target"` |
Chris@772 | 47 mkdir -p "$tdir" |
Chris@772 | 48 cp -v "$pfile" "$target" || exit 2 |
Chris@745 | 49 done |
Chris@745 | 50 |
Chris@745 | 51 echo "Done" |
Chris@745 | 52 |
Chris@772 | 53 |