annotate deploy/osx/copy-qt.sh @ 1418:2dd0bc9f8fd4 3.0-integration

Open record container folder instead of record folder (so you can see all existing recordings, no matter when they were made)
author Chris Cannam
date Mon, 12 Dec 2016 17:07:53 +0000
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