From 3e6feb62ae37cbf98364ccb36e9be47a52ceb8bf Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 26 Sep 2006 21:54:51 +0000 Subject: VST support now builds a useful script and installs correctly; fix leftovers for solo_latch and solo_model in configuration changes git-svn-id: svn://localhost/ardour2/trunk@932 d708f5d6-7413-0410-9779-e7cbd77b26cf --- vst/SConscript | 29 ++++++++++++++++++++++++++--- vst/ardevst | 4 ++++ vst/ardourvst.in | 8 ++++++++ 3 files changed, 38 insertions(+), 3 deletions(-) create mode 100755 vst/ardevst create mode 100644 vst/ardourvst.in (limited to 'vst') diff --git a/vst/SConscript b/vst/SConscript index a711a1386d..0e3055e4ce 100644 --- a/vst/SConscript +++ b/vst/SConscript @@ -4,7 +4,9 @@ import os import os.path import glob -Import('env install_prefix final_prefix config_prefix libraries') +from stat import * + +Import('env install_prefix final_prefix config_prefix subst_dict libraries') ardour_vst = env.Copy() @@ -49,6 +51,27 @@ ardour_vst.Merge ([ libraries['jack'] ]) -wine_executable = ardour_vst.Program (target = 'ardour_vst', source = sources) +# +# 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]) -Default(wine_executable) +# 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')) diff --git a/vst/ardevst b/vst/ardevst new file mode 100755 index 0000000000..286f951b00 --- /dev/null +++ b/vst/ardevst @@ -0,0 +1,4 @@ +#!/bin/sh +export ARDOUR_PATH=../gtk2_ardour/glade:../gtk2_ardour/pixmaps:../gtk2_ardour +export LD_LIBRARY_PATH=../gtk2_ardour:../libs/surfaces/control_protocol:../libs/ardour:../libs/midi++2:../libs/pbd:../libs/soundtouch:../libs/gtkmm2ext:../libs/sigc++2:../libs/glibmm2:../libs/gtkmm2/atk:../libs/gtkmm2/pango:../libs/gtkmm2/gdk:../libs/gtkmm2/gtk:../libs/libgnomecanvasmm:../libs/libsndfile:../libs/appleutility:$$LD_LIBRARY_PATH +exec wine ./ardour_vst.exe.so "$@" diff --git a/vst/ardourvst.in b/vst/ardourvst.in new file mode 100644 index 0000000000..8297e1870b --- /dev/null +++ b/vst/ardourvst.in @@ -0,0 +1,8 @@ +#!/bin/sh + +# NOTE: the use of PREFIX is incorrect - it should be INSTALL_PREFIX, +# but somehow scons puts leading /'s on INSTALL_PREFIX and that causes +# wine to be unable to find the .exe.so file + +LD_LIBRARY_PATH=%PREFIX%/lib/ardour2:$LD_LIBRARY_PATH exec wine %PREFIX%/lib/ardour2/ardour_vst.exe.so "$@" + -- cgit v1.2.3