7 #include "pbd/transmitter.h"
8 #include "pbd/receiver.h"
10 #include "ardour/filesystem_paths.h"
12 #include "ardour/linux_vst_support.h"
14 #include "ardour/vst_info_file.h"
16 /* make stupid waf happy.
17 * waf cannot build multiple variants of .o object files from the same
18 * source using different wscripts.. it mingles e.g.
19 * build/libs/ardour/vst_info_file.cc.1.o for
20 * both lib/ardour/wscript and lib/fst/wscript
22 * ...but waf does track include dependencies.
24 #include "../ardour/vst_info_file.cc"
26 #include "../ardour/linux_vst_support.cc"
28 #include "../ardour/filesystem_paths.cc"
29 #include "../ardour/directory_names.cc"
34 vstfx_destroy_editor (VSTState* /*vstfx*/) { }
39 class DummyReceiver : public Receiver {
41 void receive (Transmitter::Channel chn, const char * str) {
42 const char *prefix = "";
44 case Transmitter::Error:
47 case Transmitter::Info:
50 case Transmitter::Warning:
51 prefix = "[WARNING]: ";
53 case Transmitter::Fatal:
56 case Transmitter::Throw:
60 std::cerr << prefix << str << std::endl;
62 if (chn == Transmitter::Fatal) {
68 DummyReceiver dummy_receiver;
70 int main (int argc, char **argv) {
72 if (argc == 3 && !strcmp("-f", argv[1])) {
74 if (strstr (dllpath, ".so" ) || strstr(dllpath, ".dll")) {
75 vstfx_remove_infofile(dllpath);
76 vstfx_un_blacklist(dllpath);
81 fprintf(stderr, "usage: %s [-f] <vst>\n", argv[0]);
89 dummy_receiver.listen_to (error);
90 dummy_receiver.listen_to (info);
91 dummy_receiver.listen_to (fatal);
92 dummy_receiver.listen_to (warning);
94 std::vector<VSTInfo *> *infos = 0;
98 else if (strstr (dllpath, ".so")) {
99 infos = vstfx_get_info_lx(dllpath);
103 #ifdef WINDOWS_VST_SUPPORT
104 else if (strstr (dllpath, ".dll")) {
105 infos = vstfx_get_info_fst(dllpath);
109 fprintf(stderr, "'%s' is not a supported VST plugin.\n", dllpath);
114 if (!infos || infos->empty()) {