plugin manager: filter-by-type really is filter-by-category, so fix the naming and...
[ardour2.git] / vst / SConscript
blobf3492b89c7811f8350b3da973952933b9fc3df9f
1 # -*- python -*-
3 import os
4 import os.path
5 import glob
7 from stat import *
9 Import('env install_prefix final_prefix config_prefix subst_dict libraries')
11 ardour_vst = env.Clone()
13 sources = Split ("""
14 winmain.c
15 #libs/fst/fst.o
16 #libs/fst/fstinfofile.o
17 #libs/fst/vstwin.o
18 #libs/fst/vsti.o
19 #libs/fst/thread.o
20 """
23 ardour_vst.Append (CCFLAGS="-DVST_SUPPORT", CPPPATH="#libs/fst", LIBPATH='#gtk2_ardour', LIBS="ardourgtk")
24 ardour_vst.Append (LINKFLAGS='-L/usr/X11R6/lib -lasound -lX11 -lpthread') 
25 ardour_vst["CC"] ="winegcc"
26 ardour_vst["LINK"] ="wineg++ -mwindows"
28 ardour_vst.Merge ([
29     libraries['ardour'],
30     libraries['ardour_cp'],
31     libraries['gtkmm2ext'],
32     libraries['midi++2'],
33     libraries['pbd'],
34     libraries['gtkmm2'],
35     libraries['glib2'],
36     libraries['libgnomecanvas2'],
37     libraries['libgnomecanvasmm'],
38     libraries['sysmidi'],
39     libraries['sndfile-ardour'],
40     libraries['flac'],
41     libraries['lrdf'],
42     libraries['glibmm2'],
43     libraries['pangomm'],
44     libraries['atkmm'],
45     libraries['gdkmm2'],
46     libraries['sigc2'],
47     libraries['gtk2'],
48     libraries['xml'],
49     libraries['xslt'],
50     libraries['soundtouch'],
51     libraries['samplerate'],
52     libraries['jack']
56 # run winegcc to build a mini-win32 executable that wine can run. note: this also
57 # generates a script called 'ardour_vst' which we don't use
60 wine_generated_executable = ardour_vst.Program (target = 'ardour_vst', source = sources)
63 # generate a shell script that will run the .exe file correctly
64
66 wine_executable = ardour_vst.SubstInFile ('ardourvst', 'ardourvst.in', SUBST_DICT = subst_dict)
68 # make sure the scripts are executable
70 if ardour_vst['VST']:
71     ardour_vst.AddPostAction (wine_executable, ardour_vst.Action (Chmod ('vst/ardevst', 0755)))
72     ardour_vst.AddPostAction (wine_executable, ardour_vst.Action (Chmod ("vst/" + str(wine_executable[0]), 0755)))
73     Default([wine_generated_executable, wine_executable])
74     
75     # the wine script - into the bin dir
76     env.Alias('install', env.Install(os.path.join(install_prefix, 'bin'), wine_executable))
77     # the win32 executable - into the lib dir since the wine script will look for it there
78     env.Alias('install', env.Install(os.path.join(install_prefix, env['LIBDIR'], 'ardour2'), 'ardour_vst.exe.so'))
80 env.Alias ('tarball', env.Distribute (env['DISTTREE'],
81                                       [ 'SConscript',
82                                         'winmain.c',
83                                         'ardourvst.in',
84                                         'ardevst'
85                                         ]))