9 #include "pbd/transmitter.h"
10 #include "pbd/receiver.h"
13 #define NO_OLDNAMES // no backwards compat _pid_t, conflict with w64 pthread/sched
16 #include "ardour/filesystem_paths.h"
18 #include "ardour/linux_vst_support.h"
20 #include "ardour/vst_info_file.h"
22 /* make stupid waf happy.
23 * waf cannot build multiple variants of .o object files from the same
24 * source using different wscripts.. it mingles e.g.
25 * build/libs/ardour/vst_info_file.cc.1.o for
26 * both lib/ardour/wscript and lib/fst/wscript
28 * ...but waf does track include dependencies.
30 #include "../ardour/vst_info_file.cc"
32 #include "../ardour/linux_vst_support.cc"
34 #include "../ardour/filesystem_paths.cc"
35 #include "../ardour/directory_names.cc"
40 vstfx_destroy_editor (VSTState* /*vstfx*/) { }
45 class DummyReceiver : public Receiver {
47 void receive (Transmitter::Channel chn, const char * str) {
48 const char *prefix = "";
50 case Transmitter::Error:
53 case Transmitter::Info:
56 case Transmitter::Warning:
57 prefix = "[WARNING]: ";
59 case Transmitter::Fatal:
62 case Transmitter::Throw:
66 std::cerr << prefix << str << std::endl;
68 if (chn == Transmitter::Fatal) {
74 DummyReceiver dummy_receiver;
76 int main (int argc, char **argv) {
78 if (argc == 3 && !strcmp("-f", argv[1])) {
80 const size_t slen = strlen (dllpath);
82 (slen > 3 && 0 == g_ascii_strcasecmp (&dllpath[slen-3], ".so"))
84 (slen > 4 && 0 == g_ascii_strcasecmp (&dllpath[slen-4], ".dll"))
86 vstfx_remove_infofile(dllpath);
87 vstfx_un_blacklist(dllpath);
92 fprintf(stderr, "usage: %s [-f] <vst>\n", argv[0]);
100 dummy_receiver.listen_to (error);
101 dummy_receiver.listen_to (info);
102 dummy_receiver.listen_to (fatal);
103 dummy_receiver.listen_to (warning);
105 std::vector<VSTInfo *> *infos = 0;
107 const size_t slen = strlen (dllpath);
110 else if (slen > 3 && 0 == g_ascii_strcasecmp (&dllpath[slen-3], ".so")) {
111 infos = vstfx_get_info_lx(dllpath);
115 #ifdef WINDOWS_VST_SUPPORT
116 else if (slen > 4 && 0 == g_ascii_strcasecmp (&dllpath[slen-4], ".dll")) {
117 infos = vstfx_get_info_fst(dllpath);
121 fprintf(stderr, "'%s' is not a supported VST plugin.\n", dllpath);
126 if (!infos || infos->empty()) {