annotate deploy/osx/copy-qt.sh @ 496:109016400b9c 2.0-integration

Update analysis stuff when recording starts (and when model is added) rather than when it ends. Not continuing to update during recording though...
author Chris Cannam
date Mon, 12 Oct 2015 17:10:43 +0100
parents 42e80bb7f1ad
children 449a0355f864
rev   line source
Chris@437 1 #!/bin/bash
Chris@437 2
Chris@437 3 set -eu
Chris@437 4
Chris@437 5 app="$1"
Chris@437 6 if [ -z "$app" ]; then
Chris@437 7 echo "Usage: $0 <appname>"
Chris@437 8 echo "Provide appname without the .app extension, please"
Chris@437 9 exit 2
Chris@437 10 fi
Chris@437 11
Chris@483 12 frameworks="QtCore QtNetwork QtGui QtXml QtSvg QtWidgets QtPrintSupport"
Chris@437 13
Chris@437 14 plugins="dds gif icns ico jp2 jpeg mng tga tiff wbmp webp cocoa minimal offscreen"
Chris@437 15
Chris@437 16 qtdir=$(grep "Command:" Makefile | head -1 | awk '{ print $3; }' | sed s,/bin/.*,,)
Chris@437 17
Chris@437 18 if [ ! -d "$qtdir" ]; then
Chris@437 19 echo "Failed to discover Qt installation directory from Makefile, exiting"
Chris@437 20 exit 2
Chris@437 21 fi
Chris@437 22
Chris@437 23 fdir="$app.app/Contents/Frameworks"
Chris@437 24 pdir="$app.app/Contents/plugins"
Chris@437 25
Chris@437 26 mkdir -p "$fdir"
Chris@437 27 mkdir -p "$pdir"
Chris@437 28
Chris@437 29 echo
Chris@437 30 echo "Copying frameworks..."
Chris@437 31 for fwk in $frameworks; do
Chris@437 32 cp -v "$qtdir/lib/$fwk.framework/$fwk" "$fdir" || exit 2
Chris@437 33 done
Chris@437 34
Chris@437 35 echo "Done"
Chris@437 36
Chris@437 37 echo
Chris@437 38 echo "Copying plugins..."
Chris@437 39 for plug in $plugins; do
Chris@437 40 pfile=$(ls "$qtdir"/plugins/*/libq"$plug".dylib)
Chris@437 41 if [ ! -f "$pfile" ]; then
Chris@437 42 echo "Failed to find plugin $plug, exiting"
Chris@437 43 exit 2
Chris@437 44 fi
Chris@437 45 target="$pdir"/${pfile##?*plugins/}
Chris@437 46 tdir=`dirname "$target"`
Chris@437 47 mkdir -p "$tdir"
Chris@437 48 cp -v "$pfile" "$target" || exit 2
Chris@437 49 done
Chris@437 50
Chris@437 51 echo "Done"
Chris@437 52
Chris@437 53