8 fst_src = glob.glob('*.c')
10 Import('env install_prefix')
11 fst = env.Copy(CC="winegcc")
12 fst.Append (CPPPATH=".")
15 vst_dir = Dir ('libs/vst')
16 vst_sdk_dir = Dir ('vstsdk2.3')
18 # if it exists, try to use the Steinberg zip package
20 vst_sdk_zip = File ('vstsdk2.3.zip')
22 if os.access (vst_sdk_zip.abspath, os.F_OK):
23 print 'VST package discovered.'
24 elif os.access ('vst_sdk2_3.zip', os.F_OK):
26 # add a build target that unpacks the zip package the Steinberg "meta" zip package
28 vst_meta_zip = fst.Command (vst_sdk_zip, 'vst_sdk2_3.zip', "unzip -o -d ${TARGET.dir} $SOURCES vstsdk2.3.zip" )
29 print 'VST meta-package discovered.'
31 if os.access ('vstsdk2.3.zip', os.F_OK) != 1:
32 print 'Did not find vst_sdk2_3.zip or vstsdk2.3.zip in libs/fst.'
33 print 'Make sure the correct file is in the correct location and correctly named.'
34 print 'Please see http://ardour.org/building_vst_support for more information.'
37 vst_headers = fst.Command ([ 'vst/aeffectx.h', 'vst/AEffect.h' ], vst_sdk_zip, [
38 "unzip -qq -d ${SOURCE.dir} -o $SOURCE",
39 Delete ('$TARGET.dir'),
40 Copy ('${TARGET.dir}', 'libs/fst/vstsdk2.3/source/common'),
41 "sed -i '/struct VstFileType\|struct VstFileSelect/,/};/d' $TARGET"
44 a = fst.Object ('fst', 'fst.c')
45 b = fst.Object ('fstinfofile', 'fstinfofile.c')
46 c = fst.Object ('vstwin', 'vstwin.c')
47 d = fst.Object ('vsti', 'vsti.c')
49 Default([vst_headers,a,b,c,d])
51 env.Alias('tarball', env.Distribute (env['DISTTREE'],
52 fst_src + ['SConscript',