fix handling of automation recording when stopping and restarting from the exact...
[ardour2.git] / vst / SConscript
bloba3d0fb01af7a7ab0bbd5082c9f096940a736227d
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'],
40     libraries['lrdf'],
41     libraries['glibmm2'],
42     libraries['pangomm'],
43     libraries['atkmm'],
44     libraries['gdkmm2'],
45     libraries['sigc2'],
46     libraries['gtk2'],
47     libraries['xml'],
48     libraries['xslt'],
49     libraries['soundtouch'],
50     libraries['samplerate'],
51     libraries['jack']
55 # run winegcc to build a mini-win32 executable that wine can run. note: this also
56 # generates a script called 'ardour_vst' which we don't use
59 wine_generated_executable = ardour_vst.Program (target = 'ardour_vst', source = sources)
62 # generate a shell script that will run the .exe file correctly
63
65 wine_executable = ardour_vst.SubstInFile ('ardourvst', 'ardourvst.in', SUBST_DICT = subst_dict)
67 # make sure the scripts are executable
69 if ardour_vst['VST']:
70     ardour_vst.AddPostAction (wine_executable, ardour_vst.Action (Chmod ('vst/ardevst', 0755)))
71     ardour_vst.AddPostAction (wine_executable, ardour_vst.Action (Chmod ("vst/" + str(wine_executable[0]), 0755)))
72     Default([wine_generated_executable, wine_executable])
73     
74     # the wine script - into the bin dir
75     env.Alias('install', env.Install(os.path.join(install_prefix, 'bin'), wine_executable))
76     # the win32 executable - into the lib dir since the wine script will look for it there
77     env.Alias('install', env.Install(os.path.join(install_prefix, env['LIBDIR'], 'ardour2'), 'ardour_vst.exe.so'))
79 env.Alias ('tarball', env.Distribute (env['DISTTREE'],
80                                       [ 'SConscript',
81                                         'winmain.c',
82                                         'ardourvst.in',
83                                         'ardevst'
84                                         ]))