From 0e5ccb49db08055cdb3f2de4beadc8de31ff31e5 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Tue, 19 Feb 2013 10:48:37 -0500 Subject: core: prefs setup looks for a local .gnuradio/config.conf to use. Order of precedence: env. vars -> .gnuradio/config.conf -> ${prefix}/etc/gnuradio/conf.d/* --- gnuradio-core/src/lib/general/gr_prefs.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'gnuradio-core/src/lib/general') diff --git a/gnuradio-core/src/lib/general/gr_prefs.cc b/gnuradio-core/src/lib/general/gr_prefs.cc index 37ca7c6f3..9fddea6d2 100644 --- a/gnuradio-core/src/lib/general/gr_prefs.cc +++ b/gnuradio-core/src/lib/general/gr_prefs.cc @@ -25,6 +25,7 @@ #endif #include +#include #include #include @@ -77,6 +78,17 @@ gr_prefs::_sys_prefs_filenames() fnames.push_back(p.string()); } std::sort(fnames.begin(), fnames.end()); + + // Find if there is a ~/.gnuradio/config file and add this to the + // beginning of the file list to override any preferences in the + // installed path config files. + fs::path homedir = fs::path(gr_appdata_path()); + homedir /= ".gnuradio/config.conf"; + std::cerr << "Checking path:" << homedir << std::endl; + if(fs::exists(homedir)) { + fnames.insert(fnames.begin(), homedir.string()); + } + return fnames; } -- cgit