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"
35 #include "../ardour/mac_vst_support.cc"
37 #include "../ardour/filesystem_paths.cc"
38 #include "../ardour/directory_names.cc"
43 vstfx_destroy_editor (VSTState* /*vstfx*/) { }
48 class DummyReceiver : public Receiver {
50 void receive (Transmitter::Channel chn, const char * str) {
51 const char *prefix = "";
53 case Transmitter::Error:
56 case Transmitter::Info:
59 case Transmitter::Warning:
60 prefix = "[WARNING]: ";
62 case Transmitter::Fatal:
65 case Transmitter::Throw:
69 std::cerr << prefix << str << std::endl;
71 if (chn == Transmitter::Fatal) {
77 DummyReceiver dummy_receiver;
79 int main (int argc, char **argv) {
81 if (argc == 3 && !strcmp("-f", argv[1])) {
83 const size_t slen = strlen (dllpath);
85 (slen > 3 && 0 == g_ascii_strcasecmp (&dllpath[slen-3], ".so"))
87 (slen > 4 && 0 == g_ascii_strcasecmp (&dllpath[slen-4], ".dll"))
89 vstfx_remove_infofile(dllpath);
90 vstfx_un_blacklist(dllpath);
95 fprintf(stderr, "usage: %s [-f] <vst>\n", argv[0]);
103 dummy_receiver.listen_to (error);
104 dummy_receiver.listen_to (info);
105 dummy_receiver.listen_to (fatal);
106 dummy_receiver.listen_to (warning);
108 std::vector<VSTInfo *> *infos = 0;
110 const size_t slen = strlen (dllpath);
113 else if (slen > 3 && 0 == g_ascii_strcasecmp (&dllpath[slen-3], ".so")) {
114 infos = vstfx_get_info_lx(dllpath);
118 #ifdef WINDOWS_VST_SUPPORT
119 else if (slen > 4 && 0 == g_ascii_strcasecmp (&dllpath[slen-4], ".dll")) {
120 infos = vstfx_get_info_fst(dllpath);
124 #ifdef MACVST_SUPPORT
125 else if (slen > 4 && 0 == g_ascii_strcasecmp (&dllpath[slen-4], ".vst")) {
126 infos = vstfx_get_info_mac(dllpath);
130 fprintf(stderr, "'%s' is not a supported VST plugin.\n", dllpath);
135 if (!infos || infos->empty()) {