summaryrefslogtreecommitdiff
path: root/libs/fst/scanner.cc
blob: 12a20080b6d8fc4851d373a2fa5c2fb79c8df929 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <vector>

#include "ardour/filesystem_paths.h"
#ifdef LXVST_SUPPORT
#include "ardour/linux_vst_support.h"
#endif
#include "ardour/vst_info_file.h"

/* make stupid waf happy.
 * waf cannot build multiple variants of .o object files from the same
 * source using different wscripts.. it mingles e.g.
 * build/libs/ardour/vst_info_file.cc.1.o for
 * both lib/ardour/wscript and lib/fst/wscript
 *
 * ...but waf does track include dependencies.
 */
#include "../ardour/vst_info_file.cc"
#ifdef LXVST_SUPPORT
#include "../ardour/linux_vst_support.cc"
#endif
#include "../ardour/filesystem_paths.cc"
#include "../ardour/directory_names.cc"
#include "../pbd/error.cc"
#include "../pbd/basename.cc"
#include "../pbd/search_path.cc"
#include "../pbd/transmitter.cc"
#include "../pbd/whitespace.cc"

#ifdef LXVST_SUPPORT
void
vstfx_destroy_editor (VSTState* /*vstfx*/) { }
#endif

int main (int argc, char **argv) {
	if (argc != 2) {
		fprintf(stderr, "usage: %s <vst>\n", argv[0]);
		return EXIT_FAILURE;
	}

	char *dllpath = argv[1];
	std::vector<VSTInfo *> *infos = 0;
#ifdef LXVST_SUPPORT
	if (strstr (dllpath, ".so")) {
		infos = vstfx_get_info_lx(dllpath);
	}
#endif

#ifdef WINDOWS_VST_SUPPORT
	if (strstr (dllpath, ".dll")) {
		infos = vstfx_get_info_fst(dllpath);
	}
#endif

	if (!infos || infos->empty()) {
		return EXIT_FAILURE;
	} else {
		return EXIT_SUCCESS;
	}
}