15 #include "pbd/transmitter.h"
16 #include "pbd/receiver.h"
19 #define NO_OLDNAMES // no backwards compat _pid_t, conflict with w64 pthread/sched
22 #include "ardour/filesystem_paths.h"
24 #include "ardour/linux_vst_support.h"
26 #include "ardour/vst_info_file.h"
28 /* make stupid waf happy.
29 * waf cannot build multiple variants of .o object files from the same
30 * source using different wscripts.. it mingles e.g.
31 * build/libs/ardour/vst_info_file.cc.1.o for
32 * both lib/ardour/wscript and lib/fst/wscript
34 * ...but waf does track include dependencies.
36 #include "../ardour/vst_info_file.cc"
38 #include "../ardour/linux_vst_support.cc"
41 #include "../ardour/mac_vst_support.cc"
43 #include "../ardour/filesystem_paths.cc"
44 #include "../ardour/directory_names.cc"
46 #include "../ardour/vst_state.cc"
50 vstfx_destroy_editor (VSTState* /*vstfx*/) { }
55 class DummyReceiver : public Receiver {
57 void receive (Transmitter::Channel chn, const char * str) {
58 const char *prefix = "";
60 case Transmitter::Error:
63 case Transmitter::Info:
66 case Transmitter::Warning:
67 prefix = "[WARNING]: ";
69 case Transmitter::Fatal:
72 case Transmitter::Throw:
76 std::cerr << prefix << str << std::endl;
78 if (chn == Transmitter::Fatal) {
84 DummyReceiver dummy_receiver;
86 int main (int argc, char **argv) {
88 if (argc == 3 && !strcmp("-f", argv[1])) {
90 const size_t slen = strlen (dllpath);
92 (slen > 3 && 0 == g_ascii_strcasecmp (&dllpath[slen-3], ".so"))
94 (slen > 4 && 0 == g_ascii_strcasecmp (&dllpath[slen-4], ".dll"))
96 vstfx_remove_infofile(dllpath);
97 vstfx_un_blacklist(dllpath);
101 else if (argc != 2) {
102 fprintf(stderr, "usage: %s [-f] <vst>\n", argv[0]);
110 dummy_receiver.listen_to (error);
111 dummy_receiver.listen_to (info);
112 dummy_receiver.listen_to (fatal);
113 dummy_receiver.listen_to (warning);
115 std::vector<VSTInfo *> *infos = 0;
117 const size_t slen = strlen (dllpath);
120 else if (slen > 3 && 0 == g_ascii_strcasecmp (&dllpath[slen-3], ".so")) {
121 infos = vstfx_get_info_lx(dllpath);
125 #ifdef WINDOWS_VST_SUPPORT
126 else if (slen > 4 && 0 == g_ascii_strcasecmp (&dllpath[slen-4], ".dll")) {
127 infos = vstfx_get_info_fst(dllpath);
131 #ifdef MACVST_SUPPORT
132 else if (slen > 4 && 0 == g_ascii_strcasecmp (&dllpath[slen-4], ".vst")) {
133 infos = vstfx_get_info_mac(dllpath);
137 fprintf(stderr, "'%s' is not a supported VST plugin.\n", dllpath);
142 if (!infos || infos->empty()) {