annotate deploy/osx/paths.sh @ 1231:b4fd38b40712 spectrogram-minor-refactor

Fix threshold in spectrogram -- it wasn't working in the last release. There is a new protocol for this. Formerly the threshold parameter had a range from -50dB to 0 with the default at -50, and -50 treated internally as "no threshold". However, there was a hardcoded, hidden internal threshold for spectrogram colour mapping at -80dB with anything below this being rounded to zero. Now the threshold parameter has range -81 to -1 with the default at -80, -81 is treated internally as "no threshold", and there is no hidden internal threshold. So the default behaviour is the same as before, an effective -80dB threshold, but it is now possible to change this in both directions. Sessions reloaded from prior versions may look slightly different because, if the session says there should be no threshold, there will now actually be no threshold instead of having the hidden internal one. Still need to do something in the UI to make it apparent that the -81dB setting removes the threshold entirely. This is at least no worse than the previous, also obscured, magic -50dB setting.
author Chris Cannam
date Mon, 01 Aug 2016 16:21:01 +0100
parents b2c45b831ea8
children 2d48532a074b
rev   line source
Chris@409 1 #!/bin/bash
Chris@409 2
Chris@1077 3 set -e
Chris@1077 4
Chris@409 5 app="$1"
Chris@409 6 if [ -z "$app" ]; then
Chris@409 7 echo "Usage: $0 <appname>"
Chris@409 8 echo "Provide appname without the .app extension, please"
Chris@409 9 exit 2
Chris@409 10 fi
Chris@409 11
Chris@1077 12 set -u
Chris@1077 13
Chris@1082 14 frameworks="QtCore QtNetwork QtGui QtXml QtSvg QtWidgets QtPrintSupport QtDBus"
Chris@742 15
Chris@409 16 echo
Chris@742 17 echo "I expect you to have already copied these frameworks from the Qt installation to"
Chris@742 18 echo "$app.app/Contents/Frameworks -- expect errors to follow if they're missing:"
Chris@742 19 echo "$frameworks"
Chris@409 20 echo
Chris@409 21
Chris@409 22 echo "Fixing up loader paths in binaries..."
Chris@409 23
Chris@742 24 for fwk in $frameworks; do
Chris@742 25 install_name_tool -id $fwk "$app.app/Contents/Frameworks/$fwk"
Chris@742 26 done
Chris@409 27
Chris@509 28 find "$app.app" -name \*.dylib -print | while read x; do
Chris@509 29 install_name_tool -id "`basename \"$x\"`" "$x"
Chris@509 30 done
Chris@509 31
Chris@742 32 for fwk in $frameworks; do
Chris@409 33 find "$app.app" -type f -print | while read x; do
Chris@1077 34 current=$(otool -L "$x" | grep "$fwk" | grep amework | grep -v ':$' | awk '{ print $1; }')
Chris@409 35 [ -z "$current" ] && continue
Chris@409 36 echo "$x has $current"
Chris@409 37 relative=$(echo "$x" | sed -e "s,$app.app/Contents/,," \
Chris@409 38 -e 's,[^/]*/,../,g' -e 's,/[^/]*$,/Frameworks/'"$fwk"',' )
Chris@409 39 echo "replacing with relative path $relative"
Chris@409 40 install_name_tool -change "$current" "@loader_path/$relative" "$x"
Chris@409 41 done
Chris@409 42 done
Chris@409 43
Chris@1077 44 find "$app.app" -type f -print | while read x; do
Chris@1077 45 qtdep=$(otool -L "$x" | grep Qt | grep amework | grep -v ':$' | grep -v '@loader_path' | awk '{ print $1; }')
Chris@1077 46 if [ -n "$qtdep" ]; then
Chris@1077 47 echo
Chris@1077 48 echo "ERROR: File $x depends on Qt framework(s) not apparently present in the bundle:"
Chris@1077 49 echo $qtdep
Chris@1077 50 exit 1
Chris@1077 51 fi
Chris@1077 52 done
Chris@1077 53
Chris@409 54 echo "Done: be sure to run the app and see that it works!"
Chris@409 55
Chris@409 56