From d83da38d79d9d52c4af8d8a87bba7a669b97ffe6 Mon Sep 17 00:00:00 2001 From: Ryzerth Date: Thu, 24 Dec 2020 14:43:14 +0100 Subject: [PATCH] Added windows build script --- core/src/core.cpp | 7 +++--- make_debian_package.sh | 54 +++++++++++++++++++++------------------- make_windows_package.ps1 | 31 +++++++++++++++++++++++ 3 files changed, 64 insertions(+), 28 deletions(-) create mode 100644 make_windows_package.ps1 diff --git a/core/src/core.cpp b/core/src/core.cpp index d8ed53a1..a749ce51 100644 --- a/core/src/core.cpp +++ b/core/src/core.cpp @@ -119,12 +119,13 @@ int sdrpp_main(int argc, char *argv[]) { defConfig["menuWidth"] = 300; defConfig["min"] = -70.0; - defConfig["moduleInstances"]["Audio Sink"] = "audio_sink"; - defConfig["moduleInstances"]["PlutoSDR Source"] = "plutosdr_source"; - defConfig["moduleInstances"]["RTL-TCP Source"] = "rtl_tcp_source"; defConfig["moduleInstances"]["Radio"] = "radio"; defConfig["moduleInstances"]["Recorder"] = "recorder"; defConfig["moduleInstances"]["SoapySDR Source"] = "soapy_source"; + defConfig["moduleInstances"]["PlutoSDR Source"] = "plutosdr_source"; + defConfig["moduleInstances"]["RTL-TCP Source"] = "rtl_tcp_source"; + defConfig["moduleInstances"]["AirspyHF+ Source"] = "airspyhf_source"; + defConfig["moduleInstances"]["Audio Sink"] = "audio_sink"; defConfig["modules"] = json::array(); defConfig["offset"] = 0.0; diff --git a/make_debian_package.sh b/make_debian_package.sh index f4e975d4..6bd5e9a0 100644 --- a/make_debian_package.sh +++ b/make_debian_package.sh @@ -2,43 +2,47 @@ # Create directory structure echo Create directory structure -mkdir sdrpp_deb -mkdir sdrpp_deb/DEBIAN -mkdir sdrpp_deb/usr -mkdir sdrpp_deb/usr/bin -mkdir sdrpp_deb/usr/share -mkdir sdrpp_deb/usr/share/sdrpp -mkdir sdrpp_deb/usr/lib -mkdir sdrpp_deb/usr/lib/sdrpp -mkdir sdrpp_deb/usr/lib/sdrpp/plugins +mkdir sdrpp_debian_amd64 +mkdir sdrpp_debian_amd64/DEBIAN +mkdir sdrpp_debian_amd64/usr +mkdir sdrpp_debian_amd64/usr/bin +mkdir sdrpp_debian_amd64/usr/share +mkdir sdrpp_debian_amd64/usr/share/sdrpp +mkdir sdrpp_debian_amd64/usr/lib +mkdir sdrpp_debian_amd64/usr/lib/sdrpp +mkdir sdrpp_debian_amd64/usr/lib/sdrpp/plugins # Create package info echo Create package info -echo Package: sdrpp >> sdrpp_deb/DEBIAN/control -echo Version: 0.2.5 >> sdrpp_deb/DEBIAN/control -echo Maintainer: Ryzerth >> sdrpp_deb/DEBIAN/control -echo Architecture: all >> sdrpp_deb/DEBIAN/control -echo Description: Bloat-free SDR receiver software >> sdrpp_deb/DEBIAN/control +echo Package: sdrpp >> sdrpp_debian_amd64/DEBIAN/control +echo Version: 0.2.5 >> sdrpp_debian_amd64/DEBIAN/control +echo Maintainer: Ryzerth >> sdrpp_debian_amd64/DEBIAN/control +echo Architecture: all >> sdrpp_debian_amd64/DEBIAN/control +echo Description: Bloat-free SDR receiver software >> sdrpp_debian_amd64/DEBIAN/control # Copy core files echo Copy core files -cp $1/sdrpp sdrpp_deb/usr/bin/ -cp $1/libsdrpp_core.so sdrpp_deb/usr/lib/ +cp $1/sdrpp sdrpp_debian_amd64/usr/bin/ +cp $1/libsdrpp_core.so sdrpp_debian_amd64/usr/lib/ # Copy reasources echo Copy reasources -cp -r root/res/* sdrpp_deb/usr/share/sdrpp/ +cp -r root/res/* sdrpp_debian_amd64/usr/share/sdrpp/ # Copy module echo Copy modules -cp $1/radio/radio.so sdrpp_deb/usr/lib/sdrpp/plugins/ -cp $1/recorder/recorder.so sdrpp_deb/usr/lib/sdrpp/plugins/ -cp $1/airspyhf_source/airspyhf_source.so sdrpp_deb/usr/lib/sdrpp/plugins/ -cp $1/plutosdr_source/plutosdr_source.so sdrpp_deb/usr/lib/sdrpp/plugins/ -cp $1/rtl_tcp_source/rtl_tcp_source.so sdrpp_deb/usr/lib/sdrpp/plugins/ -cp $1/soapy_source/soapy_source.so sdrpp_deb/usr/lib/sdrpp/plugins/ -cp $1/audio_sink/audio_sink.so sdrpp_deb/usr/lib/sdrpp/plugins/ +cp $1/radio/radio.so sdrpp_debian_amd64/usr/lib/sdrpp/plugins/ +cp $1/recorder/recorder.so sdrpp_debian_amd64/usr/lib/sdrpp/plugins/ +cp $1/airspyhf_source/airspyhf_source.so sdrpp_debian_amd64/usr/lib/sdrpp/plugins/ +cp $1/plutosdr_source/plutosdr_source.so sdrpp_debian_amd64/usr/lib/sdrpp/plugins/ +cp $1/rtl_tcp_source/rtl_tcp_source.so sdrpp_debian_amd64/usr/lib/sdrpp/plugins/ +cp $1/soapy_source/soapy_source.so sdrpp_debian_amd64/usr/lib/sdrpp/plugins/ +cp $1/audio_sink/audio_sink.so sdrpp_debian_amd64/usr/lib/sdrpp/plugins/ # Create package echo Create packagesudo -dpkg-deb --build sdrpp_deb \ No newline at end of file +dpkg-deb --build sdrpp_debian_amd64 + +# Cleanup +echo Cleanup +rm -rf sdrpp_debian_amd64 \ No newline at end of file diff --git a/make_windows_package.ps1 b/make_windows_package.ps1 new file mode 100644 index 00000000..5438a12a --- /dev/null +++ b/make_windows_package.ps1 @@ -0,0 +1,31 @@ +mkdir sdrpp_windows_x64 + +# Copy root +cp -Recurse root/* sdrpp_windows_x64/ + +# Copy core +cp build/Release/* sdrpp_windows_x64/ +cp 'C:/Program Files/PothosSDR/bin/volk.dll' sdrpp_windows_x64/ + +# Copy modules +cp build/radio/Release/radio.dll sdrpp_windows_x64/modules/ + +cp build/recorder/Release/recorder.dll sdrpp_windows_x64/modules/ + +cp build/airspyhf_source/Release/airspyhf_source.dll sdrpp_windows_x64/modules/ +cp 'C:/Program Files/PothosSDR/bin/airspyhf.dll' sdrpp_windows_x64/ + +cp build/plutosdr_source/Release/plutosdr_source.dll sdrpp_windows_x64/modules/ +cp 'C:/Program Files/PothosSDR/bin/libiio.dll' sdrpp_windows_x64/ +cp 'C:/Program Files/PothosSDR/bin/libad9361.dll' sdrpp_windows_x64/ + +cp build/rtl_tcp_source/Release/rtl_tcp_source.dll sdrpp_windows_x64/modules/ + +cp build/soapy_source/Release/soapy_source.dll sdrpp_windows_x64/modules/ + +cp build/audio_sink/Release/audio_sink.dll sdrpp_windows_x64/modules/ +cp build/audio_sink/Release/portaudio.dll sdrpp_windows_x64/ + +Compress-Archive -Path sdrpp_windows_x64/ -DestinationPath sdrpp_windows_x64.zip + +rm -Force -Recurse sdrpp_windows_x64 \ No newline at end of file