Option to build using bundled mods only

This commit is contained in:
Charles J. Cliffe
2016-04-05 18:16:51 -04:00
parent 3c51f1af97
commit 4a64104050
2 changed files with 23 additions and 0 deletions
+10
View File
@@ -106,6 +106,15 @@ std::vector<SDRDeviceInfo *> *SDREnumerator::enumerate_devices(std::string remot
}
} else {
#ifdef BUNDLE_SOAPY_MODS
#ifdef BUNDLED_MODS_ONLY
wxFileName exePath = wxFileName(wxStandardPaths::Get().GetExecutablePath());
std::vector<std::string> localMods = SoapySDR::listModules(exePath.GetPath().ToStdString() + "/modules/");
for (std::vector<std::string>::iterator mods_i = localMods.begin(); mods_i != localMods.end(); mods_i++) {
wxGetApp().sdrEnumThreadNotify(SDREnumerator::SDR_ENUM_MESSAGE, "Initializing bundled SoapySDR module " + (*mods_i) + "..");
std::cout << "Loading bundled SoapySDR module " << (*mods_i) << ".." << std::endl;
SoapySDR::loadModule(*mods_i);
}
#else
bool localModPref = wxGetApp().getUseLocalMod();
if (localModPref) {
wxGetApp().sdrEnumThreadNotify(SDREnumerator::SDR_ENUM_MESSAGE, "Loading SoapySDR modules..");
@@ -126,6 +135,7 @@ std::vector<SDRDeviceInfo *> *SDREnumerator::enumerate_devices(std::string remot
std::cout << "Checking system SoapySDR modules.." << std::flush;
SoapySDR::loadModules();
}
#endif
#else
wxGetApp().sdrEnumThreadNotify(SDREnumerator::SDR_ENUM_MESSAGE, "Loading SoapySDR modules..");
SoapySDR::loadModules();