mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-21 19:31:54 -05:00
Optional title suffix, prefer local to bundled modules default
This commit is contained in:
parent
886425d83d
commit
6cd82ea44f
@ -11,8 +11,10 @@ SET(CPACK_PACKAGE_VERSION_MAJOR ${CUBICSDR_VERSION_MAJOR})
|
||||
SET(CPACK_PACKAGE_VERSION_MINOR ${CUBICSDR_VERSION_MINOR})
|
||||
SET(CPACK_PACKAGE_VERSION_PATCH ${CUBICSDR_VERSION_PATCH})
|
||||
|
||||
SET (VERSION_SUFFIX "" CACHE STRING "Add custom version suffix to CubicSDR application title.")
|
||||
|
||||
ADD_DEFINITIONS(
|
||||
-DCUBICSDR_VERSION="${CUBICSDR_VERSION}"
|
||||
-DCUBICSDR_VERSION="${CUBICSDR_VERSION}-${VERSION_SUFFIX}"
|
||||
)
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
|
||||
@ -427,6 +429,7 @@ IF (APPLE AND BUNDLE_APP)
|
||||
SET(MACOSX_BUNDLE_BUNDLE_NAME CubicSDR)
|
||||
|
||||
set(BUNDLE_SOAPY_MODS OFF CACHE BOOL "Bundle local SoapySDR modules")
|
||||
set(BUNDLE_MIR_SDR OFF CACHE BOOL "Bundle mir_sdr for personal use only -- do not distribute.")
|
||||
|
||||
IF (BUNDLE_SOAPY_MODS)
|
||||
ADD_DEFINITIONS(
|
||||
@ -516,13 +519,14 @@ IF (APPLE AND BUNDLE_APP)
|
||||
IF (BUNDLE_SOAPY_MODS)
|
||||
FOREACH(SOAPY_MOD_FILE ${SOAPY_MODS})
|
||||
GET_FILENAME_COMPONENT(SOAPY_MOD_NAME ${SOAPY_MOD_FILE} NAME)
|
||||
|
||||
IF(${SOAPY_MOD_NAME} STREQUAL "libsdrPlaySupport.so") # prevent inclusion of libmirsdrapi-rsp.so
|
||||
IF(NOT BUNDLE_MIR_SDR) # prevent inclusion of libmirsdrapi-rsp.so
|
||||
IF(${SOAPY_MOD_NAME} STREQUAL "libsdrPlaySupport.so")
|
||||
message(STATUS "Excluding libsdrPlaySupport.so")
|
||||
CONTINUE()
|
||||
ELSE()
|
||||
message(STATUS "Bundling ${SOAPY_MOD_NAME} from ${SOAPY_MOD_FILE}")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
INSTALL(CODE "
|
||||
fixup_bundle(\"${APPS}\" \"${APPS}/Contents/MacOS/modules/${SOAPY_MOD_NAME}\" \"/usr/local/lib\")
|
||||
" COMPONENT Runtime)
|
||||
|
@ -271,13 +271,13 @@ bool CubicSDR::OnCmdLineParsed(wxCmdLineParser& parser) {
|
||||
config.load();
|
||||
|
||||
#ifdef BUNDLE_SOAPY_MODS
|
||||
if (parser.Found("l")) {
|
||||
useLocalMod.store(true);
|
||||
} else {
|
||||
if (parser.Found("b")) {
|
||||
useLocalMod.store(false);
|
||||
} else {
|
||||
useLocalMod.store(true);
|
||||
}
|
||||
#else
|
||||
useLocalMod.store(false);
|
||||
useLocalMod.store(true);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
|
@ -161,7 +161,7 @@ static const wxCmdLineEntryDesc commandLineInfo [] =
|
||||
{
|
||||
{ wxCMD_LINE_SWITCH, "h", "help", "Command line parameter help", wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP },
|
||||
{ wxCMD_LINE_OPTION, "c", "config", "Specify a named configuration to use, i.e. '-c ham'" },
|
||||
{ wxCMD_LINE_SWITCH, "l", "localmod", "Check local SoapySDR modules instead of bundled first." },
|
||||
{ wxCMD_LINE_SWITCH, "b", "bundled", "Use bundled SoapySDR modules first instead of local." },
|
||||
{ wxCMD_LINE_NONE }
|
||||
};
|
||||
#else
|
||||
|
@ -63,8 +63,6 @@ std::vector<SDRDeviceInfo *> *SDREnumerator::enumerate_devices(std::string remot
|
||||
wxGetApp().sdrEnumThreadNotify(SDREnumerator::SDR_ENUM_MESSAGE, "Loading SoapySDR modules..");
|
||||
SoapySDR::loadModules();
|
||||
#endif
|
||||
wxGetApp().sdrEnumThreadNotify(SDREnumerator::SDR_ENUM_MESSAGE, "done.");
|
||||
std::cout << "done." << std::endl;
|
||||
|
||||
// modules = SoapySDR::listModules();
|
||||
// for (size_t i = 0; i < modules.size(); i++) {
|
||||
@ -144,6 +142,12 @@ std::vector<SDRDeviceInfo *> *SDREnumerator::enumerate_devices(std::string remot
|
||||
}
|
||||
}
|
||||
|
||||
if (isRemote) {
|
||||
wxGetApp().sdrEnumThreadNotify(SDREnumerator::SDR_ENUM_MESSAGE, "Querying remote " + remoteAddr + " device #" + std::to_string(i) + ": " + dev-> getName());
|
||||
} else {
|
||||
wxGetApp().sdrEnumThreadNotify(SDREnumerator::SDR_ENUM_MESSAGE, std::string("Querying device #") + std::to_string(i) + ": " + dev->getName());
|
||||
}
|
||||
|
||||
int numChan = device->getNumChannels(SOAPY_SDR_RX);
|
||||
for (int i = 0; i < numChan; i++) {
|
||||
SDRDeviceChannel *chan = new SDRDeviceChannel();
|
||||
@ -191,8 +195,6 @@ std::vector<SDRDeviceInfo *> *SDREnumerator::enumerate_devices(std::string remot
|
||||
SoapySDR::Kwargs streamArgs;
|
||||
|
||||
if (isRemote) {
|
||||
wxGetApp().sdrEnumThreadNotify(SDREnumerator::SDR_ENUM_MESSAGE, "Querying remote " + remoteAddr + " device #" + std::to_string(i));
|
||||
|
||||
// if (deviceArgs.count("rtl") != 0) {
|
||||
// streamArgs["remote:mtu"] = "8192";
|
||||
// streamArgs["remote:window"] = "16384000";
|
||||
@ -203,8 +205,6 @@ std::vector<SDRDeviceInfo *> *SDREnumerator::enumerate_devices(std::string remot
|
||||
if (nativeFormat.length()) {
|
||||
streamArgs["remote:format"] = nativeFormat;
|
||||
}
|
||||
} else {
|
||||
wxGetApp().sdrEnumThreadNotify(SDREnumerator::SDR_ENUM_MESSAGE, std::string("Found local device #") + std::to_string(i));
|
||||
}
|
||||
|
||||
dev->setStreamArgs(streamArgs);
|
||||
@ -217,7 +217,7 @@ std::vector<SDRDeviceInfo *> *SDREnumerator::enumerate_devices(std::string remot
|
||||
dev->setAvailable(true);
|
||||
} catch (const std::exception &ex) {
|
||||
std::cerr << "Error making device: " << ex.what() << std::endl;
|
||||
wxGetApp().sdrEnumThreadNotify(SDREnumerator::SDR_ENUM_MESSAGE, std::string("Error making device #") + std::to_string(i));
|
||||
wxGetApp().sdrEnumThreadNotify(SDREnumerator::SDR_ENUM_MESSAGE, std::string("Error querying device #") + std::to_string(i));
|
||||
dev->setAvailable(false);
|
||||
}
|
||||
std::cout << std::endl;
|
||||
|
Loading…
Reference in New Issue
Block a user