7 #include "pbd/transmitter.h"
8 #include "pbd/receiver.h"
11 #define NO_OLDNAMES // no backwards compat _pid_t, conflict with w64 pthread/sched
14 #include "ardour/filesystem_paths.h"
16 #include "ardour/linux_vst_support.h"
18 #include "ardour/vst_info_file.h"
20 /* make stupid waf happy.
21 * waf cannot build multiple variants of .o object files from the same
22 * source using different wscripts.. it mingles e.g.
23 * build/libs/ardour/vst_info_file.cc.1.o for
24 * both lib/ardour/wscript and lib/fst/wscript
26 * ...but waf does track include dependencies.
28 #include "../ardour/vst_info_file.cc"
30 #include "../ardour/linux_vst_support.cc"
32 #include "../ardour/filesystem_paths.cc"
33 #include "../ardour/directory_names.cc"
38 vstfx_destroy_editor (VSTState* /*vstfx*/) { }
43 class DummyReceiver : public Receiver {
45 void receive (Transmitter::Channel chn, const char * str) {
46 const char *prefix = "";
48 case Transmitter::Error:
51 case Transmitter::Info:
54 case Transmitter::Warning:
55 prefix = "[WARNING]: ";
57 case Transmitter::Fatal:
60 case Transmitter::Throw:
64 std::cerr << prefix << str << std::endl;
66 if (chn == Transmitter::Fatal) {
72 DummyReceiver dummy_receiver;
74 int main (int argc, char **argv) {
76 if (argc == 3 && !strcmp("-f", argv[1])) {
78 if (strstr (dllpath, ".so" ) || strstr(dllpath, ".dll")) {
79 vstfx_remove_infofile(dllpath);
80 vstfx_un_blacklist(dllpath);
85 fprintf(stderr, "usage: %s [-f] <vst>\n", argv[0]);
93 dummy_receiver.listen_to (error);
94 dummy_receiver.listen_to (info);
95 dummy_receiver.listen_to (fatal);
96 dummy_receiver.listen_to (warning);
98 std::vector<VSTInfo *> *infos = 0;
102 else if (strstr (dllpath, ".so")) {
103 infos = vstfx_get_info_lx(dllpath);
107 #ifdef WINDOWS_VST_SUPPORT
108 else if (strstr (dllpath, ".dll")) {
109 infos = vstfx_get_info_fst(dllpath);
113 fprintf(stderr, "'%s' is not a supported VST plugin.\n", dllpath);
118 if (!infos || infos->empty()) {