From 137193ff3bdf873d5eb1c118750d9bf179492c65 Mon Sep 17 00:00:00 2001 From: f4exb Date: Sat, 12 Mar 2016 03:17:30 +0100 Subject: [PATCH] Windows build: added RTL-SDR input plugin with dependency to binary libusb for MinGW32 --- librtlsdr/librtlsdr.pro | 32 +++++++++++++++++++++ plugins/samplesource/rtlsdr/rtlsdr.pro | 39 ++++++++++++++++++++++++++ sdrangel.windows.pro | 2 ++ windows.install.bat | 4 +++ 4 files changed, 77 insertions(+) create mode 100644 librtlsdr/librtlsdr.pro create mode 100644 plugins/samplesource/rtlsdr/rtlsdr.pro diff --git a/librtlsdr/librtlsdr.pro b/librtlsdr/librtlsdr.pro new file mode 100644 index 000000000..8a0b195a6 --- /dev/null +++ b/librtlsdr/librtlsdr.pro @@ -0,0 +1,32 @@ +#-------------------------------------------------------- +# +# Pro file for Android and Windows builds with Qt Creator +# +#-------------------------------------------------------- + +QT += core + +TEMPLATE = lib +TARGET = librtlsdr + +CONFIG(MINGW32):LIBRTLSDRSRC = "D:\softs\librtlsdr" +INCLUDEPATH += $$LIBRTLSDRSRC/include + +CONFIG(MINGW32):INCLUDEPATH += "D:\libusb-1.0.20\include\libusb-1.0" + +SOURCES = $$LIBRTLSDRSRC/src/librtlsdr.c\ + $$LIBRTLSDRSRC/src/tuner_e4k.c\ + $$LIBRTLSDRSRC/src/tuner_fc0012.c\ + $$LIBRTLSDRSRC/src/tuner_fc0013.c\ + $$LIBRTLSDRSRC/src/tuner_fc2580.c\ + $$LIBRTLSDRSRC/src/tuner_r82xx.c\ + $$LIBRTLSDRSRC/src/getopt/getopt.c + +HEADERS = $$LIBRTLSDRSRC/include/rtl-sdr.h\ + $$LIBRTLSDRSRC/include/rtl-sdr_export.h\ + $$LIBRTLSDRSRC/src/getopt/getopt.h + +CONFIG(MINGW32):LIBS += -LD:\libusb-1.0.20\MinGW32\dll -llibusb-1.0 + +CONFIG(ANDROID):CONFIG += mobility +CONFIG(ANDROID):MOBILITY = diff --git a/plugins/samplesource/rtlsdr/rtlsdr.pro b/plugins/samplesource/rtlsdr/rtlsdr.pro new file mode 100644 index 000000000..03f2fedb1 --- /dev/null +++ b/plugins/samplesource/rtlsdr/rtlsdr.pro @@ -0,0 +1,39 @@ +#-------------------------------------------------------- +# +# Pro file for Android and Windows builds with Qt Creator +# +#-------------------------------------------------------- + +TEMPLATE = lib +CONFIG += plugin + +QT += core gui widgets multimedia + +TARGET = inputrtlsdr + +CONFIG(MINGW32):LIBRTLSDRSRC = "D:\softs\librtlsdr" +INCLUDEPATH += $$PWD +INCLUDEPATH += ../../../sdrbase +INCLUDEPATH += $$LIBRTLSDRSRC/include + +CONFIG(Release):build_subdir = release +CONFIG(Debug):build_subdir = debug + +SOURCES += rtlsdrgui.cpp\ + rtlsdrinput.cpp\ + rtlsdrplugin.cpp\ + rtlsdrsettings.cpp\ + rtlsdrthread.cpp + +HEADERS += rtlsdrgui.h\ + rtlsdrinput.h\ + rtlsdrplugin.h\ + rtlsdrsettings.h\ + rtlsdrthread.h + +FORMS += rtlsdrgui.ui + +LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase +LIBS += -L../../../librtlsdr/$${build_subdir} -llibrtlsdr + +RESOURCES = ../../../sdrbase/resources/res.qrc diff --git a/sdrangel.windows.pro b/sdrangel.windows.pro index c03c576ce..04264031c 100644 --- a/sdrangel.windows.pro +++ b/sdrangel.windows.pro @@ -7,8 +7,10 @@ TEMPLATE = subdirs SUBDIRS = sdrbase SUBDIRS += lz4 +SUBDIRS += librtlsdr SUBDIRS += plugins/samplesource/filesource SUBDIRS += plugins/samplesource/sdrdaemon +SUBDIRS += plugins/samplesource/rtlsdr SUBDIRS += plugins/channel/chanalyzer SUBDIRS += plugins/channel/demodam SUBDIRS += plugins/channel/demodbfm diff --git a/windows.install.bat b/windows.install.bat index 60dbe9433..982f82ea9 100644 --- a/windows.install.bat +++ b/windows.install.bat @@ -1,6 +1,9 @@ +SET libusbdir="D:\libusb-1.0.20\MinGW32" + copy app\%1\sdrangel.exe %2 copy sdrbase\%1\sdrbase.dll %2 copy lz4\%1\lz4.dll %2 +copy %libusbdir%\dll\libusb-1.0.dll %2 mkdir %2\plugins mkdir %2\plugins\channel mkdir %2\plugins\samplesource @@ -15,3 +18,4 @@ copy plugins\channel\tcpsrc\%1\tcpsrc.dll %2\plugins\channel copy plugins\channel\udpsrc\%1\udpsrc.dll %2\plugins\channel copy plugins\samplesource\filesource\%1\inputfilesource.dll %2\plugins\samplesource copy plugins\samplesource\sdrdaemon\%1\inputsdrdaemon.dll %2\plugins\samplesource +copy plugins\samplesource\rtlsdr\%1\inputrtlsdr.dll %2\plugins\samplesource