mirror of
				https://github.com/AlexandreRouma/SDRPlusPlus.git
				synced 2025-10-31 00:48:11 +01:00 
			
		
		
		
	Compare commits
	
		
			6 Commits
		
	
	
		
			fobos_test
			...
			better_ins
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | eb19f193bc | ||
|  | 7336b19bee | ||
|  | f9feec0abf | ||
|  | 4113e92759 | ||
|  | d905d19020 | ||
|  | d5bc0fa3c3 | 
| @@ -97,13 +97,56 @@ set(SDRPP_MODULE_COMPILER_FLAGS ${SDRPP_COMPILER_FLAGS}) | ||||
|  | ||||
| # Set a default install prefix | ||||
| if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) | ||||
|     if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") | ||||
|     if (MSVC) | ||||
|         set(CMAKE_INSTALL_PREFIX "C:/Program Files/SDR++/" CACHE PATH "..." FORCE) | ||||
|     elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") | ||||
|         set(CMAKE_INSTALL_PREFIX "/usr/local" CACHE PATH "..." FORCE) | ||||
|     else() | ||||
|         set(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "..." FORCE) | ||||
|     endif() | ||||
| endif() | ||||
|  | ||||
| # Include standard install directory definitions | ||||
| include(GNUInstallDirs) | ||||
|  | ||||
| # Set up SDR++ directory load paths | ||||
| if (MSVC) | ||||
|     set(SDRPP_MODULES_LOAD_DIR "./modules") | ||||
|     set(SDRPP_RES_LOAD_DIR "./res") | ||||
| elseif (USE_BUNDLE_DEFAULTS) | ||||
|     set(SDRPP_MODULES_LOAD_DIR "../Plugins") | ||||
|     set(SDRPP_RES_LOAD_DIR "../Resources") | ||||
| elseif (ANDROID) | ||||
|     set(SDRPP_MODULES_LOAD_DIR "/modules") | ||||
|     set(SDRPP_RES_LOAD_DIR "/res") | ||||
| else() | ||||
|     set(SDRPP_MODULES_LOAD_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/sdrpp/plugins") | ||||
|     set(SDRPP_RES_LOAD_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/sdrpp") | ||||
| endif() | ||||
|  | ||||
| # Set up SDR++ directory install paths | ||||
| if (MSVC) | ||||
|     set(SDRPP_BIN_INSTALL_DIR "/") | ||||
|     set(SDRPP_LIB_INSTALL_DIR "/") | ||||
|     set(SDRPP_MODULES_INSTALL_DIR "modules") | ||||
|     set(SDRPP_RES_INSTALL_DIR "res") | ||||
| elseif (USE_BUNDLE_DEFAULTS) | ||||
|     set(SDRPP_BIN_INSTALL_DIR "Contents/MacOS") | ||||
|     set(SDRPP_LIB_INSTALL_DIR "Contents/Frameworks") | ||||
|     set(SDRPP_MODULES_INSTALL_DIR "Contents/Plugins") | ||||
|     set(SDRPP_RES_INSTALL_DIR "Contents/Resources") | ||||
| elseif (ANDROID) | ||||
|     set(SDRPP_BIN_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}") | ||||
|     set(SDRPP_LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}") | ||||
|     set(SDRPP_MODULES_INSTALL_DIR "/modules") | ||||
|     set(SDRPP_RES_INSTALL_DIR "/res") | ||||
| else() | ||||
|     set(SDRPP_BIN_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}") | ||||
|     set(SDRPP_LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}") | ||||
|     set(SDRPP_MODULES_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/sdrpp/plugins") | ||||
|     set(SDRPP_RES_INSTALL_DIR "${CMAKE_INSTALL_DATAROOTDIR}/sdrpp") | ||||
| endif() | ||||
|  | ||||
| # Configure toolchain for android | ||||
| if (ANDROID) | ||||
|     set(CMAKE_SHARED_LINKER_FLAGS | ||||
| @@ -363,17 +406,18 @@ endif () | ||||
| # Create module cmake file | ||||
| configure_file(${CMAKE_SOURCE_DIR}/sdrpp_module.cmake ${CMAKE_CURRENT_BINARY_DIR}/sdrpp_module.cmake @ONLY) | ||||
|  | ||||
| # Install directives | ||||
| install(TARGETS sdrpp DESTINATION bin) | ||||
| install(DIRECTORY ${CMAKE_SOURCE_DIR}/root/res/bandplans DESTINATION share/sdrpp) | ||||
| install(DIRECTORY ${CMAKE_SOURCE_DIR}/root/res/colormaps DESTINATION share/sdrpp) | ||||
| install(DIRECTORY ${CMAKE_SOURCE_DIR}/root/res/fonts DESTINATION share/sdrpp) | ||||
| install(DIRECTORY ${CMAKE_SOURCE_DIR}/root/res/icons DESTINATION share/sdrpp) | ||||
| install(DIRECTORY ${CMAKE_SOURCE_DIR}/root/res/themes DESTINATION share/sdrpp) | ||||
| # Create desktop entry file | ||||
| configure_file(${CMAKE_SOURCE_DIR}/sdrpp.desktop ${CMAKE_CURRENT_BINARY_DIR}/sdrpp.desktop @ONLY) | ||||
|  | ||||
| # Install directives | ||||
| install(TARGETS sdrpp DESTINATION ${SDRPP_BIN_INSTALL_DIR}) | ||||
| install(DIRECTORY ${CMAKE_SOURCE_DIR}/root/res/bandplans DESTINATION ${SDRPP_RES_INSTALL_DIR}) | ||||
| install(DIRECTORY ${CMAKE_SOURCE_DIR}/root/res/colormaps DESTINATION ${SDRPP_RES_INSTALL_DIR}) | ||||
| install(DIRECTORY ${CMAKE_SOURCE_DIR}/root/res/fonts DESTINATION ${SDRPP_RES_INSTALL_DIR}) | ||||
| install(DIRECTORY ${CMAKE_SOURCE_DIR}/root/res/icons DESTINATION ${SDRPP_RES_INSTALL_DIR}) | ||||
| install(DIRECTORY ${CMAKE_SOURCE_DIR}/root/res/themes DESTINATION ${SDRPP_RES_INSTALL_DIR}) | ||||
| if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") | ||||
|     install(FILES ${CMAKE_CURRENT_BINARY_DIR}/sdrpp.desktop DESTINATION share/applications) | ||||
|     install(FILES ${CMAKE_CURRENT_BINARY_DIR}/sdrpp.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications) | ||||
| endif () | ||||
|  | ||||
| # Create uninstall target | ||||
|   | ||||
| @@ -18,6 +18,10 @@ if (MSVC) | ||||
|     set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) | ||||
| endif () | ||||
|  | ||||
| # Add compiler definitions for the directories | ||||
| add_definitions(-DSDRPP_MODULES_LOAD_DIR="${SDRPP_MODULES_LOAD_DIR}") | ||||
| add_definitions(-DSDRPP_RES_LOAD_DIR="${SDRPP_RES_LOAD_DIR}") | ||||
|  | ||||
| # Configure backend sources | ||||
| if (OPT_BACKEND_GLFW) | ||||
|     file(GLOB_RECURSE BACKEND_SRC "backends/glfw/*.cpp" "backends/glfw/*.c") | ||||
| @@ -33,9 +37,6 @@ add_library(sdrpp_core SHARED ${SRC} ${BACKEND_SRC}) | ||||
| # Set compiler options | ||||
| target_compile_options(sdrpp_core PRIVATE ${SDRPP_COMPILER_FLAGS}) | ||||
|  | ||||
| # Set the install prefix | ||||
| target_compile_definitions(sdrpp_core PUBLIC INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}") | ||||
|  | ||||
| # Include core headers | ||||
| target_include_directories(sdrpp_core PUBLIC "src/") | ||||
| target_include_directories(sdrpp_core PUBLIC "src/imgui") | ||||
| @@ -167,4 +168,4 @@ set(CORE_FILES ${RUNTIME_OUTPUT_DIRECTORY} PARENT_SCOPE) | ||||
| # cmake .. "-DCMAKE_TOOLCHAIN_FILE=C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake" | ||||
|  | ||||
| # Install directives | ||||
| install(TARGETS sdrpp_core DESTINATION lib) | ||||
| install(TARGETS sdrpp_core DESTINATION ${SDRPP_LIB_INSTALL_DIR}) | ||||
| @@ -24,14 +24,16 @@ | ||||
| #include <Windows.h> | ||||
| #endif | ||||
|  | ||||
| #ifndef INSTALL_PREFIX | ||||
| #ifdef __APPLE__ | ||||
| #define INSTALL_PREFIX "/usr/local" | ||||
| #else | ||||
| #define INSTALL_PREFIX "/usr" | ||||
|  | ||||
| // Default install dirs to make the IDE happy | ||||
| #ifndef SDRPP_MODULES_LOAD_DIR | ||||
| #define SDRPP_MODULES_LOAD_DIR "" | ||||
| #endif | ||||
| #ifndef SDRPP_RES_LOAD_DIR | ||||
| #define SDRPP_RES_LOAD_DIR "" | ||||
| #endif | ||||
|  | ||||
|  | ||||
| namespace core { | ||||
|     ConfigManager configManager; | ||||
|     ModuleManager moduleManager; | ||||
| @@ -248,19 +250,14 @@ int sdrpp_main(int argc, char* argv[]) { | ||||
|     defConfig["lockMenuOrder"] = false; | ||||
| #endif | ||||
|  | ||||
| #if defined(_WIN32) | ||||
|     defConfig["modulesDirectory"] = "./modules"; | ||||
|     defConfig["resourcesDirectory"] = "./res"; | ||||
| #elif defined(IS_MACOS_BUNDLE) | ||||
|     defConfig["modulesDirectory"] = "../Plugins"; | ||||
|     defConfig["resourcesDirectory"] = "../Resources"; | ||||
| #elif defined(__ANDROID__) | ||||
|     defConfig["modulesDirectory"] = root + "/modules"; | ||||
|     defConfig["resourcesDirectory"] = root + "/res"; | ||||
| #ifdef __ANDROID__ | ||||
|     defConfig["modulesDirectory"] = root + SDRPP_MODULES_LOAD_DIR; | ||||
|     defConfig["resourcesDirectory"] = root + SDRPP_RES_LOAD_DIR; | ||||
| #else | ||||
|     defConfig["modulesDirectory"] = INSTALL_PREFIX "/lib/sdrpp/plugins"; | ||||
|     defConfig["resourcesDirectory"] = INSTALL_PREFIX "/share/sdrpp"; | ||||
|     defConfig["modulesDirectory"] = SDRPP_MODULES_LOAD_DIR; | ||||
|     defConfig["resourcesDirectory"] = SDRPP_RES_LOAD_DIR; | ||||
| #endif | ||||
|      | ||||
|  | ||||
|     // Load config | ||||
|     flog::info("Loading config"); | ||||
|   | ||||
							
								
								
									
										4
									
								
								docker_builds/fedora_40/Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								docker_builds/fedora_40/Dockerfile
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | ||||
| FROM fedora:40 | ||||
| ENV DEBIAN_FRONTEND=noninteractive  | ||||
| COPY do_build.sh /root | ||||
| RUN chmod +x /root/do_build.sh | ||||
							
								
								
									
										31
									
								
								docker_builds/fedora_40/do_build.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								docker_builds/fedora_40/do_build.sh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,31 @@ | ||||
| #!/bin/bash | ||||
| set -e | ||||
| cd /root | ||||
|  | ||||
| # Install dependencies and tools | ||||
| dnf update -y | ||||
| dnf install -y make gcc g++ cmake git wget p7zip fftw-devel glfw-devel volk-devel libzstd-devel codec2-devel airspyone_host-devel rtaudio-devel \ | ||||
|             hackrf-devel rtl-sdr-devel portaudio-devel spdlog-devel libusbg-devel | ||||
|  | ||||
| # Install SDRPlay libraries | ||||
| wget https://www.sdrplay.com/software/SDRplay_RSP_API-Linux-3.15.1.run | ||||
| 7za x ./SDRplay_RSP_API-Linux-3.15.1.run | ||||
| 7za x ./SDRplay_RSP_API-Linux-3.15.1 | ||||
| cp x86_64/libsdrplay_api.so.3.15 /usr/lib/libsdrplay_api.so | ||||
| cp inc/* /usr/include/ | ||||
|  | ||||
| # Install librfnm | ||||
| git clone https://github.com/AlexandreRouma/librfnm | ||||
| cd librfnm | ||||
| mkdir build | ||||
| cd build | ||||
| cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr | ||||
| make -j2 | ||||
| make install | ||||
| cd ../../ | ||||
|  | ||||
| cd SDRPlusPlus | ||||
| mkdir build | ||||
| cd build | ||||
| cmake .. -DOPT_BUILD_AIRSPYHF_SOURCE=OFF -DOPT_BUILD_PLUTOSDR_SOURCE=OFF -DOPT_BUILD_RFNM_SOURCE=ON -DOPT_BUILD_SDRPLAY_SOURCE=ON -DOPT_BUILD_NEW_PORTAUDIO_SINK=ON -DOPT_BUILD_M17_DECODER=ON | ||||
| make VERBOSE=1 -j2 | ||||
| @@ -3,7 +3,7 @@ Encoding=UTF-8 | ||||
| Version=1.0 | ||||
| Type=Application | ||||
| Terminal=false | ||||
| Exec=@CMAKE_INSTALL_PREFIX@/bin/sdrpp | ||||
| Exec=@SDRPP_BIN_INSTALL_DIR@/sdrpp | ||||
| Name=SDR++ | ||||
| Icon=@CMAKE_INSTALL_PREFIX@/share/sdrpp/icons/sdrpp.png | ||||
| Icon=@SDRPP_RES_INSTALL_DIR@/icons/sdrpp.png | ||||
| Categories=HamRadio | ||||
| @@ -6,6 +6,10 @@ if (NOT SDRPP_MODULE_COMPILER_FLAGS) | ||||
|     set(SDRPP_MODULE_COMPILER_FLAGS @SDRPP_MODULE_COMPILER_FLAGS@) | ||||
| endif () | ||||
|  | ||||
| # Add compiler definitions for the directories | ||||
| add_definitions(-DSDRPP_MODULES_LOAD_DIR="${SDRPP_MODULES_LOAD_DIR}") | ||||
| add_definitions(-DSDRPP_RES_LOAD_DIR="${SDRPP_RES_LOAD_DIR}") | ||||
|  | ||||
| # Created shared lib and link to core | ||||
| add_library(${PROJECT_NAME} SHARED ${SRC}) | ||||
| target_link_libraries(${PROJECT_NAME} PRIVATE sdrpp_core) | ||||
| @@ -16,4 +20,4 @@ set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "") | ||||
| target_compile_options(${PROJECT_NAME} PRIVATE ${SDRPP_MODULE_COMPILER_FLAGS}) | ||||
|  | ||||
| # Install directives | ||||
| install(TARGETS ${PROJECT_NAME} DESTINATION lib/sdrpp/plugins) | ||||
| install(TARGETS ${PROJECT_NAME} DESTINATION ${SDRPP_MODULES_INSTALL_DIR}) | ||||
| @@ -523,8 +523,8 @@ private: | ||||
|         RTLSDRSourceModule* _this = (RTLSDRSourceModule*)ctx; | ||||
|         int sampCount = len / 2; | ||||
|         for (int i = 0; i < sampCount; i++) { | ||||
|             _this->stream.writeBuf[i].re = ((float)buf[i * 2] - 127.4) / 128.0f; | ||||
|             _this->stream.writeBuf[i].im = ((float)buf[(i * 2) + 1] - 127.4) / 128.0f; | ||||
|             _this->stream.writeBuf[i].re = ((float)buf[i * 2] - 127.4f) / 128.0f; | ||||
|             _this->stream.writeBuf[i].im = ((float)buf[(i * 2) + 1] - 127.4f) / 128.0f; | ||||
|         } | ||||
|         if (!_this->stream.swap(sampCount)) { return; } | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user