replace ::cast_dynamic() with relevant ActionManager::get_*_action() calls
[ardour.git] / tools / update_fluidsynth.sh
1 #!/bin/sh
2
3 if ! test -f wscript || ! test -d gtk2_ardour || ! test -d libs/fluidsynth/;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
20 trap "rm -rf $TMP" EXIT
21
22 cd $TMP
23 #git clone git://git.code.sf.net/p/fluidsynth/code-git fs-git
24 git clone git://github.com/FluidSynth/fluidsynth.git fs-git
25
26 FSR=fs-git/
27
28 rsync -auc --info=progress2 \
29         ${FSR}src/midi/fluid_midi.c \
30         ${FSR}src/midi/fluid_midi.h \
31         ${FSR}src/rvoice/fluid_adsr_env.c \
32         ${FSR}src/rvoice/fluid_adsr_env.h \
33         ${FSR}src/rvoice/fluid_chorus.c \
34         ${FSR}src/rvoice/fluid_chorus.h \
35         ${FSR}src/rvoice/fluid_iir_filter.c \
36         ${FSR}src/rvoice/fluid_iir_filter.h \
37         ${FSR}src/rvoice/fluid_lfo.c \
38         ${FSR}src/rvoice/fluid_lfo.h \
39         ${FSR}src/rvoice/fluid_phase.h \
40         ${FSR}src/rvoice/fluid_rev.c \
41         ${FSR}src/rvoice/fluid_rev.h \
42         ${FSR}src/rvoice/fluid_rvoice.c \
43         ${FSR}src/rvoice/fluid_rvoice_dsp.c \
44         ${FSR}src/rvoice/fluid_rvoice_event.c \
45         ${FSR}src/rvoice/fluid_rvoice_event.h \
46         ${FSR}src/rvoice/fluid_rvoice.h \
47         ${FSR}src/rvoice/fluid_rvoice_mixer.c \
48         ${FSR}src/rvoice/fluid_rvoice_mixer.h \
49         ${FSR}src/sfloader/fluid_defsfont.c \
50         ${FSR}src/sfloader/fluid_defsfont.h \
51         ${FSR}src/sfloader/fluid_samplecache.c \
52         ${FSR}src/sfloader/fluid_samplecache.h \
53         ${FSR}src/sfloader/fluid_sffile.c \
54         ${FSR}src/sfloader/fluid_sffile.h \
55         ${FSR}src/sfloader/fluid_sfont.c \
56         ${FSR}src/sfloader/fluid_sfont.h \
57         ${FSR}src/synth/fluid_chan.c \
58         ${FSR}src/synth/fluid_chan.h \
59         ${FSR}src/synth/fluid_event.c \
60         ${FSR}src/synth/fluid_event.h \
61         ${FSR}src/synth/fluid_gen.c \
62         ${FSR}src/synth/fluid_gen.h \
63         ${FSR}src/synth/fluid_mod.c \
64         ${FSR}src/synth/fluid_mod.h \
65         ${FSR}src/synth/fluid_synth.c \
66         ${FSR}src/synth/fluid_synth.h \
67         ${FSR}src/synth/fluid_synth_monopoly.c \
68         ${FSR}src/synth/fluid_tuning.c \
69         ${FSR}src/synth/fluid_tuning.h \
70         ${FSR}src/synth/fluid_voice.c \
71         ${FSR}src/synth/fluid_voice.h \
72         ${FSR}src/utils/fluid_conv.c \
73         ${FSR}src/utils/fluid_conv.h \
74         ${FSR}src/utils/fluid_conv_tables.h \
75         ${FSR}src/utils/fluid_hash.c \
76         ${FSR}src/utils/fluid_hash.h \
77         ${FSR}src/utils/fluid_list.c \
78         ${FSR}src/utils/fluid_list.h \
79         ${FSR}src/utils/fluid_ringbuffer.c \
80         ${FSR}src/utils/fluid_ringbuffer.h \
81         ${FSR}src/utils/fluid_settings.c \
82         ${FSR}src/utils/fluid_settings.h \
83         ${FSR}src/utils/fluidsynth_priv.h \
84         ${FSR}src/utils/fluid_sys.c \
85         ${FSR}src/utils/fluid_sys.h \
86         \
87         "$ASRC/libs/fluidsynth/src/"
88
89 rsync -auc --info=progress2 \
90         --exclude fluidsynth.h \
91         ${FSR}include/fluidsynth/event.h  \
92         ${FSR}include/fluidsynth/gen.h  \
93         ${FSR}include/fluidsynth/log.h \
94         ${FSR}include/fluidsynth/midi.h \
95         ${FSR}include/fluidsynth/misc.h  \
96         ${FSR}include/fluidsynth/mod.h \
97         ${FSR}include/fluidsynth/settings.h \
98         ${FSR}include/fluidsynth/sfont.h \
99         ${FSR}include/fluidsynth/synth.h \
100         ${FSR}include/fluidsynth/types.h \
101         ${FSR}include/fluidsynth/voice.h \
102         \
103         "$ASRC/libs/fluidsynth/fluidsynth/"
104
105 cd "$ASRC"
106 patch -p1 < tools/fluid-patches/ardour_fluidsynth.diff
107
108 cp tools/fluid-patches/fluid_conv_tables.c  libs/fluidsynth/src/
109 cp tools/fluid-patches/fluid_rvoice_dsp_tables.c  libs/fluidsynth/src/