VST support now builds a useful script and installs correctly; fix leftovers for...
authorPaul Davis <paul@linuxaudiosystems.com>
Tue, 26 Sep 2006 21:54:51 +0000 (21:54 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 26 Sep 2006 21:54:51 +0000 (21:54 +0000)
git-svn-id: svn://localhost/ardour2/trunk@932 d708f5d6-7413-0410-9779-e7cbd77b26cf

SConstruct
gtk2_ardour/ardour_ui.h
gtk2_ardour/ardour_ui_options.cc
libs/ardour/ardour/ardour.h
libs/ardour/ardour/configuration_vars.h
libs/ardour/ardour/session.h
libs/ardour/session.cc
vst/SConscript
vst/ardevst [new file with mode: 0755]
vst/ardourvst.in [new file with mode: 0644]

index c717019d3b0ecd512bc27d42272495efcc301ec2..b12b803121654dddb45e7821cb371da942656f38 100644 (file)
@@ -15,7 +15,7 @@ import SCons.Node.FS
 SConsignFile()
 EnsureSConsVersion(0, 96)
 
-version = '2.0beta2'
+version = '2.0beta3'
 
 subst_dict = { }
 
@@ -365,8 +365,8 @@ if env['VST']:
     answer = sys.stdin.readline ()
     answer = answer.rstrip().strip()
     if answer != "yes" and answer != "y":
-        print 'You cannot build Ardour with VST support for distribution to others.\nIt is a violation of several different licenses. VST support disabled.'
-        env['VST'] = 0;
+        print 'You cannot build Ardour with VST support for distribution to others.\nIt is a violation of several different licenses. Build with VST=false.'
+        sys.exit (-1);
     else:
         print "OK, VST support will be enabled"
 
@@ -680,9 +680,15 @@ if os.environ.has_key('DISTCC_HOSTS'):
     env['ENV']['HOME'] = os.environ['HOME']
 
 final_prefix = '$PREFIX'
-install_prefix = '$DESTDIR/$PREFIX'
 
-subst_dict['INSTALL_PREFIX'] = install_prefix;
+if env['DESTDIR'] :
+    install_prefix = '$DESTDIR/$PREFIX'
+else:
+    install_prefix = env['PREFIX']
+
+subst_dict['%INSTALL_PREFIX%'] = install_prefix;
+subst_dict['%FINAL_PREFIX%'] = final_prefix;
+subst_dict['%PREFIX%'] = final_prefix;
 
 if env['PREFIX'] == '/usr':
     final_config_prefix = '/etc'
@@ -691,7 +697,6 @@ else:
 
 config_prefix = '$DESTDIR' + final_config_prefix
 
-
 # SCons should really do this for us
 
 conf = Configure (env)
index 9dcfece76069c52c3b9bd61db17e0384267ab193..cb2b0148fdb9236e0c96972f6c1e24d88cd95a6c 100644 (file)
@@ -402,8 +402,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
        bool   shuttle_grabbed;
        double shuttle_fract;
 
-       static const double SHUTTLE_FRACT_SPEED1=0.48412291827; /* derived from A1,A2 */
-
        Gtk::ToggleButton punch_in_button;
        Gtk::ToggleButton punch_out_button;
        Gtk::ToggleButton auto_return_button;
index c77273f3ea95df4ac9fef39d4f04dbbcd5a5ce65..0e9f193653d6306ab174aa768156c3f640cbad06 100644 (file)
@@ -420,7 +420,7 @@ ARDOUR_UI::parameter_changed (const char* parameter_name)
                map_some_state ("options", "CrossfadesActive", &Configuration::get_crossfades_active);
        } else if (PARAM_IS ("latched-record-enable")) {
                map_some_state ("options", "LatchedRecordEnable", &Configuration::get_latched_record_enable);
-       } else if (PARAM_IS ("solo-latch")) {
+       } else if (PARAM_IS ("solo-latched")) {
                map_some_state ("options", "LatchedSolo", &Configuration::get_solo_latched);
        } else if (PARAM_IS ("solo-model")) {
        } else if (PARAM_IS ("layer-model")) {
index e3b7cf2313ebac18012588801d8bcddd84bdc405..668907ea8cc6fa7bd0d5d3a08f5fe9725858857a 100644 (file)
@@ -74,6 +74,7 @@ namespace ARDOUR {
            const char* old;
        };
 
+       static const double SHUTTLE_FRACT_SPEED1=0.48412291827; /* derived from A1,A2 */
 }
 
 /* how do we make these be within the Ardour namespace? */
index 124a500d9ffff7c23496b6bb9aa78269eefd045a..a3898feef6f2d1c9eb8ba3e0680df1f6b784f105 100644 (file)
@@ -16,7 +16,6 @@ CONFIG_VARIABLE (bool, mute_affects_pre_fader, "mute-affects-pre-fader", true)
 CONFIG_VARIABLE (bool, mute_affects_post_fader, "mute-affects-post-fader", true)
 CONFIG_VARIABLE (bool, mute_affects_control_outs, "mute-affects-control-outs", true)
 CONFIG_VARIABLE (bool, mute_affects_main_outs, "mute-affects-main-outs", true)
-CONFIG_VARIABLE (bool, solo_latch, "solo-latch", true)
 CONFIG_VARIABLE (bool, use_hardware_monitoring, "use-hardware-monitoring", false)
 CONFIG_VARIABLE (bool, use_sw_monitoring, "use-sw-monitoring", false)
 CONFIG_VARIABLE (bool, use_external_monitoring, "use-external-monitoring", true)
index 36a8393ccdffcf0c4ee58a08c7c87c944b2cd42e..3d70520c49c05987d0e275f0db6042c44e15eb0a 100644 (file)
@@ -1418,8 +1418,6 @@ class Session : public sigc::trackable, public PBD::StatefulDestructible
 
        /* mixer stuff */
 
-       bool      _solo_latched;
-       SoloModel _solo_model;
        bool       solo_update_disabled;
        bool       currently_soloing;
        
@@ -1630,8 +1628,6 @@ class Session : public sigc::trackable, public PBD::StatefulDestructible
 
        vector<Route*> master_outs;
        
-       EditMode pending_edit_mode;
-
        /* range playback */
 
        list<AudioRange> current_audio_range;
index b2b36c9df5502984271adebc01ab2c0b7509c25b..ea1cea84f99018fb7c5d242efdd709eea5582435 100644 (file)
@@ -1986,7 +1986,7 @@ Session::route_solo_changed (void* src, shared_ptr<Route> route)
                                   then leave it as it is.
                                */
                                
-                               if (_solo_latched) {
+                               if (Config->get_solo_latched()) {
                                        continue;
                                } 
                        }
index a711a1386dee187e2ff15291905d79e9b1a30413..0e3055e4ce41204db37964e2aa2cfc958a8c9086 100644 (file)
@@ -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 (executable)
index 0000000..286f951
--- /dev/null
@@ -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 (file)
index 0000000..8297e18
--- /dev/null
@@ -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 "$@"
+