diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-05-18 17:24:06 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-05-18 17:24:06 +0000 |
commit | 813c5f0af9d1dac32b156ef3c72b890a7cf9eab5 (patch) | |
tree | 29aa92a68feb1557c60500969d6d5aeade6a2e9b /libs/pbd | |
parent | 433b6651ee8450da8282330ac35cb7ec1abbab6f (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/pbd')
-rw-r--r-- | libs/pbd/filesystem_paths.cc | 61 | ||||
-rw-r--r-- | libs/pbd/pbd/filesystem_paths.h | 34 | ||||
-rw-r--r-- | libs/pbd/wscript | 1 |
3 files changed, 0 insertions, 96 deletions
diff --git a/libs/pbd/filesystem_paths.cc b/libs/pbd/filesystem_paths.cc deleted file mode 100644 index 7f0ac62d0f..0000000000 --- a/libs/pbd/filesystem_paths.cc +++ /dev/null @@ -1,61 +0,0 @@ -/* - 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. -*/ - -#include <glib.h> - -#include "pbd/filesystem_paths.h" - -namespace PBD { - -std::vector<sys::path> -system_data_directories () -{ - std::vector<sys::path> tmp; - const char * const * dirs; - - dirs = g_get_system_data_dirs (); - - if (dirs == NULL) return tmp; - - for (int i = 0; dirs[i] != NULL; ++i) - { - tmp.push_back(dirs[i]); - } - - return tmp; -} - -std::vector<sys::path> -system_config_directories () -{ - std::vector<sys::path> tmp; - const char * const * dirs; - - dirs = g_get_system_config_dirs (); - - if (dirs == NULL) return tmp; - - for (int i = 0; dirs[i] != NULL; ++i) - { - tmp.push_back(dirs[i]); - } - - return tmp; -} - -} // namespace PBD diff --git a/libs/pbd/pbd/filesystem_paths.h b/libs/pbd/pbd/filesystem_paths.h deleted file mode 100644 index a31de8c64e..0000000000 --- a/libs/pbd/pbd/filesystem_paths.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - 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 PBD_FILESYSTEM_PATHS_INCLUDED -#define PBD_FILESYSTEM_PATHS_INCLUDED - -#include <vector> - -#include "pbd/filesystem.h" - -namespace PBD { - - std::vector<sys::path> system_data_directories (); - - std::vector<sys::path> system_config_directories (); - -} // namespace PBD - -#endif diff --git a/libs/pbd/wscript b/libs/pbd/wscript index 8e3b435d7d..83a78f8ef0 100644 --- a/libs/pbd/wscript +++ b/libs/pbd/wscript @@ -79,7 +79,6 @@ def build(bld): epa.cc error.cc filesystem.cc - filesystem_paths.cc file_manager.cc file_utils.cc fpu.cc |