diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2007-06-27 12:12:18 +0000 |
---|---|---|
committer | Tim Mayberry <mojofunk@gmail.com> | 2007-06-27 12:12:18 +0000 |
commit | 0abcfb16ba203be43fcb2d2cd0b740da85679e7a (patch) | |
tree | a3960e9ff490dab3ff5a239acc561ae21ab23a64 /libs/ardour/ardour | |
parent | 1b77a3535304c25a49686886054db148442b1032 (diff) |
Replace code for finding ControlProtocols/Surface plugins with a portable equivalent.
Remove Session::control_protocol_path and the supporting non-portable
Session::suffixed_search_path from Session.
Add ARDOUR::control_protocol_search_path which is used in place of
Session::control_protocol_path
Replace ARDOUR::get_system_module_path with ARDOUR::system_module_directory which
is used by ARDOUR::control_protocol_search_path
Export ARDOUR_SURFACES_PATH in gtk2_ardour/ardev_common.sh which is returned
by ARDOUR::control_protocol_search_path if defined. This means the control surfaces
in the libs/surfaces/* directories can now be used without installing them.
Add pbd/file_utils.h/cc containing functions for finding files matching a certain
pattern
Update documentation in SearchPath and add another constructor that takes
a sys::path
git-svn-id: svn://localhost/ardour2/trunk@2049 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r-- | libs/ardour/ardour/ardour.h | 1 | ||||
-rw-r--r-- | libs/ardour/ardour/control_protocol_manager.h | 2 | ||||
-rw-r--r-- | libs/ardour/ardour/control_protocol_search_path.h | 42 | ||||
-rw-r--r-- | libs/ardour/ardour/filesystem_paths.h | 6 | ||||
-rw-r--r-- | libs/ardour/ardour/session.h | 3 |
5 files changed, 49 insertions, 5 deletions
diff --git a/libs/ardour/ardour/ardour.h b/libs/ardour/ardour/ardour.h index c7bf7edcf8..e76c984ba4 100644 --- a/libs/ardour/ardour/ardour.h +++ b/libs/ardour/ardour/ardour.h @@ -53,7 +53,6 @@ namespace ARDOUR { std::string get_user_ardour_path (); std::string get_system_data_path (); - std::string get_system_module_path (); std::string find_config_file (std::string name); std::string find_data_file (std::string name, std::string subdir = "" ); diff --git a/libs/ardour/ardour/control_protocol_manager.h b/libs/ardour/ardour/control_protocol_manager.h index e8dc0bf22c..c61513e117 100644 --- a/libs/ardour/ardour/control_protocol_manager.h +++ b/libs/ardour/ardour/control_protocol_manager.h @@ -58,7 +58,7 @@ struct ControlProtocolInfo { static ControlProtocolManager& instance() { return *_instance; } void set_session (Session&); - void discover_control_protocols (std::string search_path); + void discover_control_protocols (); void foreach_known_protocol (sigc::slot<void,const ControlProtocolInfo*>); void load_mandatory_protocols (); diff --git a/libs/ardour/ardour/control_protocol_search_path.h b/libs/ardour/ardour/control_protocol_search_path.h new file mode 100644 index 0000000000..f9a8103c0c --- /dev/null +++ b/libs/ardour/ardour/control_protocol_search_path.h @@ -0,0 +1,42 @@ +/* + Copyright (C) 2007 Tim Mayberry + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +#ifndef ARDOUR_CONTROL_PROTOCOL_SEARCH_PATH_INCLUDED +#define ARDOUR_CONTROL_PROTOCOL_SEARCH_PATH_INCLUDED + +#include <pbd/search_path.h> + +namespace ARDOUR { + + using PBD::SearchPath; + + /** + * return a SearchPath containing directories in which to look for + * control surface plugins. + * + * If ARDOUR_SURFACES_PATH is defined then the SearchPath returned + * will contain only those directories specified in it, otherwise it will + * contain the user and system directories which may contain control + * surface plugins. + */ + SearchPath control_protocol_search_path (); + +} // namespace ARDOUR + +#endif diff --git a/libs/ardour/ardour/filesystem_paths.h b/libs/ardour/ardour/filesystem_paths.h index dc0d2576ba..0e17327fa5 100644 --- a/libs/ardour/ardour/filesystem_paths.h +++ b/libs/ardour/ardour/filesystem_paths.h @@ -32,6 +32,12 @@ namespace ARDOUR { */ sys::path user_config_directory (); + /** + * @return the path to the directory that contains the system wide ardour + * modules. + */ + sys::path system_module_directory (); + } // namespace ARDOUR #endif diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index f0a175c624..9001196b60 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -261,9 +261,6 @@ class Session : public PBD::StatefulDestructible std::string automation_dir () const; - static string suffixed_search_path (std::string suffix, bool data); - static string control_protocol_path (); - static string change_audio_path_by_name (string oldpath, string oldname, string newname, bool destructive); static string change_midi_path_by_name (string oldpath, string oldname, string newname, bool destructive); |