Skip to content

Commit

Permalink
Added windows build script
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryzerth committed Dec 24, 2020
1 parent b21f8ab commit d83da38
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 28 deletions.
7 changes: 4 additions & 3 deletions core/src/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
54 changes: 29 additions & 25 deletions make_debian_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
dpkg-deb --build sdrpp_debian_amd64

# Cleanup
echo Cleanup
rm -rf sdrpp_debian_amd64
31 changes: 31 additions & 0 deletions make_windows_package.ps1
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit d83da38

Please sign in to comment.