mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2024-11-12 21:42:51 +01:00
Started work for older system support
This commit is contained in:
parent
dcc17cdee7
commit
9f0e050d1b
@ -7,6 +7,9 @@ else()
|
|||||||
set(CMAKE_INSTALL_PREFIX "/usr")
|
set(CMAKE_INSTALL_PREFIX "/usr")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Compatibility Options
|
||||||
|
option(OPT_OVERRIDE_STD_FILESYSTEM "Use a local version of std::filesystem on systems that don't have it yet" OFF)
|
||||||
|
|
||||||
# Sources
|
# Sources
|
||||||
option(OPT_BUILD_AIRSPY_SOURCE "Build Airspy Source Module (Depedencies: libairspy)" ON)
|
option(OPT_BUILD_AIRSPY_SOURCE "Build Airspy Source Module (Depedencies: libairspy)" ON)
|
||||||
option(OPT_BUILD_AIRSPYHF_SOURCE "Build Airspy HF+ Source Module (Depedencies: libairspyhf)" ON)
|
option(OPT_BUILD_AIRSPYHF_SOURCE "Build Airspy HF+ Source Module (Depedencies: libairspyhf)" ON)
|
||||||
|
@ -25,6 +25,9 @@ target_compile_definitions(sdrpp_core PUBLIC INSTALL_PREFIX="${CMAKE_INSTALL_PRE
|
|||||||
target_include_directories(sdrpp_core PUBLIC "src/")
|
target_include_directories(sdrpp_core PUBLIC "src/")
|
||||||
target_include_directories(sdrpp_core PUBLIC "src/imgui")
|
target_include_directories(sdrpp_core PUBLIC "src/imgui")
|
||||||
|
|
||||||
|
if (OPT_OVERRIDE_STD_FILESYSTEM)
|
||||||
|
target_include_directories(sdrpp_core PUBLIC "std_replacement")
|
||||||
|
endif (OPT_OVERRIDE_STD_FILESYSTEM)
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
# Lib path
|
# Lib path
|
||||||
|
5953
core/std_replacement/filesystem
Normal file
5953
core/std_replacement/filesystem
Normal file
File diff suppressed because it is too large
Load Diff
19
root/res/colormaps/classic_green.json
Normal file
19
root/res/colormaps/classic_green.json
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"name": "Classic Green",
|
||||||
|
"author": "Paul (PD0SWL)",
|
||||||
|
"map": [
|
||||||
|
"#000000",
|
||||||
|
"#000030",
|
||||||
|
"#002851",
|
||||||
|
"#004993",
|
||||||
|
"#009BE6",
|
||||||
|
"#80FF80",
|
||||||
|
"#80FF80",
|
||||||
|
"#FFA042",
|
||||||
|
"#FF0000",
|
||||||
|
"#C60000",
|
||||||
|
"#9F0000",
|
||||||
|
"#750000",
|
||||||
|
"#4A0000"
|
||||||
|
]
|
||||||
|
}
|
59
root/res/themes/grey.json
Normal file
59
root/res/themes/grey.json
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
{
|
||||||
|
"name": "Grey",
|
||||||
|
"author": "Paul (PD0SWL)",
|
||||||
|
"Border": "#6D6D7F7F",
|
||||||
|
"BorderShadow": "#00000000",
|
||||||
|
"Button": "#00000066",
|
||||||
|
"ButtonActive": "#00000066",
|
||||||
|
"ButtonHovered": "#4A4A4A72",
|
||||||
|
"CheckMark": "#3D84E0FF",
|
||||||
|
"ChildBg": "#FFFFFF00",
|
||||||
|
"DragDropTarget": "#0000FFE5",
|
||||||
|
"FrameBg": "#33353889",
|
||||||
|
"FrameBgActive": "#00000089",
|
||||||
|
"FrameBgHovered": "#00000089",
|
||||||
|
"Header": "#5E5E4C4F",
|
||||||
|
"HeaderActive": "#5E5E4C4F",
|
||||||
|
"HeaderHovered": "#5E5E4C66",
|
||||||
|
"MenuBarBg": "#232323FF",
|
||||||
|
"ModalWindowDimBg": "#33333359",
|
||||||
|
"NavHighlight": "#666666FF",
|
||||||
|
"NavWindowingDimBg": "#33333333",
|
||||||
|
"NavWindowingHighlight": "#000000B2",
|
||||||
|
"PlotHistogram": "#BA9926FF",
|
||||||
|
"PlotHistogramHovered": "#FF9900FF",
|
||||||
|
"PlotLines": "#E5E9EEFF",
|
||||||
|
"PlotLinesHovered": "#FF6D59FF",
|
||||||
|
"PopupBg": "#EAEAEAEF",
|
||||||
|
"ResizeGrip": "#1616163F",
|
||||||
|
"ResizeGripActive": "#898989F2",
|
||||||
|
"ResizeGripHovered": "#303030AA",
|
||||||
|
"ScrollbarBg": "#F9F9F987",
|
||||||
|
"ScrollbarGrab": "#AFAFAFFF",
|
||||||
|
"ScrollbarGrabActive": "#7C7C7CFF",
|
||||||
|
"ScrollbarGrabHovered": "#686868FF",
|
||||||
|
"Separator": "#91917F7F",
|
||||||
|
"SeparatorActive": "#7C7C7CFF",
|
||||||
|
"SeparatorHovered": "#474747C6",
|
||||||
|
"SliderGrab": "#3D84E0FF",
|
||||||
|
"SliderGrabActive": "#9d0c05FF",
|
||||||
|
"Tab": "#D1A56BDB",
|
||||||
|
"TabActive": "#CC9651FF",
|
||||||
|
"TabHovered": "#BC6805CC",
|
||||||
|
"TabUnfocused": "#EDE4D9F7",
|
||||||
|
"TabUnfocusedActive": "#DCBC92FF",
|
||||||
|
"TableBorderLight": "#C4C4BFFF",
|
||||||
|
"TableBorderStrong": "#AFAFA5FF",
|
||||||
|
"TableHeaderBg": "#CECECCFF",
|
||||||
|
"TableRowBg": "#00000000",
|
||||||
|
"TableRowBgAlt": "#0000000F",
|
||||||
|
"Text": "#000000FF",
|
||||||
|
"TextDisabled": "#7F7F7FFF",
|
||||||
|
"TextSelectedBg": "#21212159",
|
||||||
|
"TitleBg": "#F4F4F4FF",
|
||||||
|
"TitleBgActive": "#B5B5B5FF",
|
||||||
|
"TitleBgCollapsed": "#00000082",
|
||||||
|
"WindowBg": "#B6B6B6EF",
|
||||||
|
"ClearColor": "#9AA6BAFF",
|
||||||
|
"WaterfallBackground": "#4A5973FF"
|
||||||
|
}
|
21
scanner/CMakeLists.txt
Normal file
21
scanner/CMakeLists.txt
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.13)
|
||||||
|
project(scanner)
|
||||||
|
|
||||||
|
if (MSVC)
|
||||||
|
set(CMAKE_CXX_FLAGS "-O2 /std:c++17 /EHsc")
|
||||||
|
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
|
set(CMAKE_CXX_FLAGS "-O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup")
|
||||||
|
else ()
|
||||||
|
set(CMAKE_CXX_FLAGS "-O3 -std=c++17")
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
file(GLOB SRC "src/*.cpp")
|
||||||
|
|
||||||
|
include_directories("src/")
|
||||||
|
|
||||||
|
add_library(scanner SHARED ${SRC})
|
||||||
|
target_link_libraries(scanner PRIVATE sdrpp_core)
|
||||||
|
set_target_properties(scanner PROPERTIES PREFIX "")
|
||||||
|
|
||||||
|
# Install directives
|
||||||
|
install(TARGETS scanner DESTINATION lib/sdrpp/plugins)
|
63
scanner/src/main.cpp
Normal file
63
scanner/src/main.cpp
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
#include <imgui.h>
|
||||||
|
#include <module.h>
|
||||||
|
#include <gui/gui.h>
|
||||||
|
|
||||||
|
SDRPP_MOD_INFO {
|
||||||
|
/* Name: */ "scanner",
|
||||||
|
/* Description: */ "Frequency scanner for SDR++",
|
||||||
|
/* Author: */ "Ryzerth",
|
||||||
|
/* Version: */ 0, 1, 0,
|
||||||
|
/* Max instances */ -1
|
||||||
|
};
|
||||||
|
|
||||||
|
class ScannerModule : public ModuleManager::Instance {
|
||||||
|
public:
|
||||||
|
ScannerModule(std::string name) {
|
||||||
|
this->name = name;
|
||||||
|
gui::menu.registerEntry(name, menuHandler, this, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
~ScannerModule() {
|
||||||
|
gui::menu.removeEntry(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
void postInit() {}
|
||||||
|
|
||||||
|
void enable() {
|
||||||
|
enabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void disable() {
|
||||||
|
enabled = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isEnabled() {
|
||||||
|
return enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
static void menuHandler(void* ctx) {
|
||||||
|
ScannerModule* _this = (ScannerModule*)ctx;
|
||||||
|
ImGui::Text("Hello SDR++, my name is %s", _this->name.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string name;
|
||||||
|
bool enabled = true;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
MOD_EXPORT void _INIT_() {
|
||||||
|
// Nothing here
|
||||||
|
}
|
||||||
|
|
||||||
|
MOD_EXPORT ModuleManager::Instance* _CREATE_INSTANCE_(std::string name) {
|
||||||
|
return new ScannerModule(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
MOD_EXPORT void _DELETE_INSTANCE_(void* instance) {
|
||||||
|
delete (ScannerModule*)instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
MOD_EXPORT void _END_() {
|
||||||
|
// Nothing here
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user