2006-06-21 20:23:11 -04:00
|
|
|
# -*- python -*-
|
|
|
|
|
|
|
|
import os
|
|
|
|
import os.path
|
|
|
|
import glob
|
|
|
|
|
2006-09-26 17:54:51 -04:00
|
|
|
from stat import *
|
|
|
|
|
|
|
|
Import('env install_prefix final_prefix config_prefix subst_dict libraries')
|
2006-06-21 20:23:11 -04:00
|
|
|
|
|
|
|
ardour_vst = env.Copy()
|
|
|
|
|
|
|
|
sources = Split ("""
|
|
|
|
winmain.c
|
|
|
|
#libs/fst/fst.o
|
|
|
|
#libs/fst/fstinfofile.o
|
|
|
|
#libs/fst/vstwin.o
|
|
|
|
#libs/fst/vsti.o
|
|
|
|
"""
|
|
|
|
)
|
|
|
|
|
2006-07-07 19:51:30 -04:00
|
|
|
ardour_vst.Append (CCFLAGS="-DVST_SUPPORT", CPPPATH="#libs/fst", LIBPATH='#gtk2_ardour', LIBS="ardourgtk")
|
|
|
|
ardour_vst.Append (LINKFLAGS='-L/usr/X11R6/lib -lasound -lX11 -lpthread')
|
2006-06-21 20:23:11 -04:00
|
|
|
ardour_vst["CC"] ="winegcc"
|
|
|
|
ardour_vst["LINK"] ="wineg++ -mwindows"
|
|
|
|
|
|
|
|
ardour_vst.Merge ([
|
|
|
|
libraries['ardour'],
|
|
|
|
libraries['ardour_cp'],
|
|
|
|
libraries['gtkmm2ext'],
|
|
|
|
libraries['midi++2'],
|
2006-07-02 05:19:24 -04:00
|
|
|
libraries['pbd'],
|
2006-06-21 20:23:11 -04:00
|
|
|
libraries['gtkmm2'],
|
|
|
|
libraries['glib2'],
|
|
|
|
libraries['libgnomecanvas2'],
|
|
|
|
libraries['libgnomecanvasmm'],
|
|
|
|
libraries['sysmidi'],
|
|
|
|
libraries['sndfile'],
|
|
|
|
libraries['flac'],
|
|
|
|
libraries['lrdf'],
|
|
|
|
libraries['glibmm2'],
|
|
|
|
libraries['pangomm'],
|
|
|
|
libraries['atkmm'],
|
|
|
|
libraries['gdkmm2'],
|
|
|
|
libraries['sigc2'],
|
|
|
|
libraries['gtk2'],
|
|
|
|
libraries['xml'],
|
|
|
|
libraries['xslt'],
|
|
|
|
libraries['soundtouch'],
|
|
|
|
libraries['samplerate'],
|
|
|
|
libraries['jack']
|
|
|
|
])
|
|
|
|
|
2006-09-26 17:54:51 -04:00
|
|
|
#
|
|
|
|
# run winegcc to build a mini-win32 executable that wine can run. note: this also
|
|
|
|
# generates a script called 'ardour_vst' which we don't use
|
|
|
|
#
|
|
|
|
|
|
|
|
wine_generated_executable = ardour_vst.Program (target = 'ardour_vst', source = sources)
|
|
|
|
|
|
|
|
#
|
|
|
|
# generate a shell script that will run the .exe file correctly
|
|
|
|
#
|
|
|
|
|
|
|
|
wine_executable = ardour_vst.SubstInFile ('ardourvst', 'ardourvst.in', SUBST_DICT = subst_dict)
|
|
|
|
|
|
|
|
# make sure the scripts are executable
|
|
|
|
|
|
|
|
ardour_vst.AddPostAction (wine_executable, ardour_vst.Action (os.chmod ('ardevst', S_IRUSR|S_IROTH|S_IRGRP|S_IWUSR|S_IXUSR|S_IXOTH|S_IXGRP)))
|
|
|
|
ardour_vst.AddPostAction (wine_executable, ardour_vst.Action (os.chmod ('ardourvst', S_IRUSR|S_IROTH|S_IRGRP|S_IWUSR|S_IXUSR|S_IXOTH|S_IXGRP)))
|
|
|
|
|
|
|
|
Default([wine_generated_executable, wine_executable])
|
2006-06-21 20:23:11 -04:00
|
|
|
|
2006-09-26 17:54:51 -04:00
|
|
|
# the wine script - into the bin dir
|
|
|
|
env.Alias('install', env.Install(os.path.join(install_prefix, 'bin'), wine_executable))
|
|
|
|
# the win32 executable - into the lib dir since the wine script will look for it there
|
|
|
|
env.Alias('install', env.Install(os.path.join(install_prefix, 'lib/ardour2'), 'ardour_vst.exe.so'))
|
2006-09-28 13:23:52 -04:00
|
|
|
|
|
|
|
env.Alias ('tarball', env.Distribute (env['DISTTREE'],
|
|
|
|
[ 'SConscript',
|
|
|
|
'winmain.c',
|
|
|
|
'ardourvst.in',
|
|
|
|
'ardevst'
|
|
|
|
]))
|
|
|
|
|