summaryrefslogtreecommitdiff
path: root/libs/surfaces/mackie/device_info.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-05-18 17:24:06 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-05-18 17:24:06 +0000
commit813c5f0af9d1dac32b156ef3c72b890a7cf9eab5 (patch)
tree29aa92a68feb1557c60500969d6d5aeade6a2e9b /libs/surfaces/mackie/device_info.cc
parent433b6651ee8450da8282330ac35cb7ec1abbab6f (diff)
major rationalization of use of search paths. ardour now has just 4 functions used to define how external resources are located: ardour_config_search_path() (for system or user specific configuration data), ardour_data_search_path() (for machine, user and system independent data), ardour_dll_directory() (base directory where shared libraries are found) and user_config_directory(). These are now used throughout the code. the config, data and dll paths/directories can be overridden by environment variables. the user config dir is added as the first element of the first two search paths, and use selectively when searching for a few other things.
This commit re-enabes ./waf install, and it is believed that it works fully at this point (more testing likely required) git-svn-id: svn://localhost/ardour2/branches/3.0@12326 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/surfaces/mackie/device_info.cc')
-rw-r--r--libs/surfaces/mackie/device_info.cc16
1 files changed, 3 insertions, 13 deletions
diff --git a/libs/surfaces/mackie/device_info.cc b/libs/surfaces/mackie/device_info.cc
index 5646650eeb..8d2186cf0c 100644
--- a/libs/surfaces/mackie/device_info.cc
+++ b/libs/surfaces/mackie/device_info.cc
@@ -421,7 +421,7 @@ static const char* const devinfo_dir_name = "mcp";
static const char* const devinfo_suffix = ".device";
static SearchPath
-system_devinfo_search_path ()
+devinfo_search_path ()
{
bool devinfo_path_defined = false;
sys::path spath_env (Glib::getenv (devinfo_env_variable_name, devinfo_path_defined));
@@ -430,21 +430,12 @@ system_devinfo_search_path ()
return spath_env;
}
- SearchPath spath (system_data_search_path());
+ SearchPath spath (ardour_data_search_path());
spath.add_subdirectory_to_paths(devinfo_dir_name);
return spath;
}
-static sys::path
-user_devinfo_directory ()
-{
- sys::path p(user_config_directory());
- p /= devinfo_dir_name;
-
- return p;
-}
-
static bool
devinfo_filter (const string &str, void */*arg*/)
{
@@ -459,8 +450,7 @@ DeviceInfo::reload_device_info ()
vector<string> s;
vector<string *> *devinfos;
PathScanner scanner;
- SearchPath spath (system_devinfo_search_path());
- spath += user_devinfo_directory ();
+ SearchPath spath (devinfo_search_path());
devinfos = scanner (spath.to_string(), devinfo_filter, 0, false, true);
device_info.clear ();