replace ::cast_dynamic() with relevant ActionManager::get_*_action() calls
[ardour.git] / tools / update_qm-vamp.sh
1 #!/bin/sh
2
3 if ! test -f wscript || ! test -d gtk2_ardour || ! test -d libs/qm-dsp/;then
4         echo "This script needs to run from ardour's top-level src tree"
5         exit 1
6 fi
7
8 if test -z "`which rsync`" -o -z "`which git`"; then
9         echo "this script needs rsync and git"
10         exit 1
11 fi
12
13 ASRC=`pwd`
14 set -e
15
16 TMP=`mktemp -d`
17 test -d "$TMP"
18 echo $TMP
19 trap "rm -rf $TMP" EXIT
20
21 cd $TMP
22 git clone git://github.com/c4dm/qm-vamp-plugins.git
23 VAMPPLUGS="$TMP/qm-vamp-plugins/plugins"
24
25 cd "$ASRC/libs/vamp-plugins/"
26 for src in *.cpp *.h; do
27         if test -f "$VAMPPLUGS/$src"; then
28                 cp "$VAMPPLUGS/$src" ./
29                 git add $src
30         fi
31 done
32
33 ## MSVC patch on top of qm-vamp-plugins-v1.7.1-10-g76bc879
34 patch -p3 << EOF
35 diff --git b/libs/vamp-plugins/BarBeatTrack.cpp a/libs/vamp-plugins/BarBeatTrack.cpp
36 index 8d0b887c3..a85c924c4 100644
37 --- b/libs/vamp-plugins/BarBeatTrack.cpp
38 +++ a/libs/vamp-plugins/BarBeatTrack.cpp
39 @@ -25,7 +25,7 @@ using std::vector;
40  using std::cerr;
41  using std::endl;
42  
43 -#ifndef __GNUC__
44 +#if !defined(__GNUC__) && !defined(_MSC_VER)
45  #include <alloca.h>
46  #endif
47  
48 diff --git b/libs/vamp-plugins/OnsetDetect.cpp a/libs/vamp-plugins/OnsetDetect.cpp
49 index a2c4042c0..c2b6d68db 100644
50 --- b/libs/vamp-plugins/OnsetDetect.cpp
51 +++ a/libs/vamp-plugins/OnsetDetect.cpp
52 @@ -12,6 +12,9 @@
53      COPYING included with this distribution for more information.
54  */
55  
56 +#ifdef COMPILER_MSVC
57 +#include <ardourext/float_cast.h>
58 +#endif
59  #include "OnsetDetect.h"
60  
61  #include <dsp/onsets/DetectionFunction.h>
62 EOF
63
64 git add BarBeatTrack.cpp OnsetDetect.cpp