Skip to content

Commit

Permalink
- Update RTLSDR lib to support RTL-SDR Blog V4
Browse files Browse the repository at this point in the history
- Optimize git clones with depth 1
- Lock in working versions of dependencies
  • Loading branch information
cjcliffe committed Jan 26, 2024
1 parent a76b7ce commit f279c9b
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 26 deletions.
2 changes: 1 addition & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Write-Host "`tBuild Type: $CS_BUILD_TYPE"
Write-Host "`tBuild Arch: $CS_BUILD_ARCH"
Write-Host "`tGenerator: $CS_GENERATOR"


Set-PSDebug -Trace 1

# Initialize build paths
. .\scripts\init_paths.ps1
Expand Down
10 changes: 5 additions & 5 deletions scripts/build_deps.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ switch ($CS_BUILD_ARCH) {
$LIBUSB_SOURCES="$CS_DEPS/libusb"
$LIBUSB_PROJECT="$LIBUSB_SOURCES/msvc/libusb.sln"
if (-not ($LIBUSB_SOURCES | Test-Path)) {
git clone https://github.com/libusb/libusb $LIBUSB_SOURCES
git clone --depth 1 https://github.com/libusb/libusb $LIBUSB_SOURCES
msbuild $LIBUSB_PROJECT /property:Configuration=$CS_BUILD_TYPE /property:Platform=$CS_BUILD_ARCH
}
$LIBUSB_LIBRARIES="$CS_DEPS/libusb/build/v143/$CS_BUILD_ARCH/$CS_BUILD_TYPE/dll/libusb-1.0.lib"
Expand Down Expand Up @@ -72,7 +72,7 @@ switch ($CS_BUILD_ARCH) {
"Win32" { $ICONV_BUILD_PATH="" }
}
if (-not ($ICONV_SOURCES | Test-Path)) {
git clone https://github.com/kiyolee/libiconv-win-build.git $ICONV_SOURCES
git clone --depth 1 -c advice.detachedHead=false -b v1.17 https://github.com/kiyolee/libiconv-win-build.git $ICONV_SOURCES
msbuild $ICONV_PROJECT /property:Configuration=$CS_BUILD_TYPE /property:Platform=$CS_BUILD_ARCH
}
$LIBICONV_INCLUDE_DIR="$ICONV_SOURCES/include"
Expand All @@ -83,7 +83,7 @@ Copy-Item -Path "$CS_DEPS/libiconv-win-build/build-VS2022/$ICONV_BUILD_PATH/$CS_
$XZ_SOURCES="$CS_DEPS/xz"
$XZ_PROJECT="$XZ_SOURCES/windows/VS2019/xz_win.sln"
if (-not ($XZ_SOURCES | Test-Path)) {
git clone -c advice.detachedHead=false -b v5.2.5 https://git.tukaani.org/xz.git $XZ_SOURCES
git clone --depth 1 -c advice.detachedHead=false -b v5.2.5 https://git.tukaani.org/xz.git $XZ_SOURCES
devenv /Upgrade $XZ_PROJECT
msbuild $XZ_PROJECT /property:Configuration=$CS_BUILD_TYPE /property:Platform=$CS_BUILD_ARCH
}
Expand All @@ -94,7 +94,7 @@ Copy-Item -Path "$CS_DEPS/xz/windows/vs2019/$CS_BUILD_TYPE/$CS_BUILD_ARCH/liblzm

$ZLIB_SOURCES="$CS_SOURCES/zlib"
if (-not ($ZLIB_SOURCES | Test-Path)) {
git clone https://github.com/madler/zlib $ZLIB_SOURCES
git clone --depth 1 -c advice.detachedHead=false -b v1.3.1 https://github.com/madler/zlib $ZLIB_SOURCES
}
$ZLIB_TARGET="$CS_TARGET/zlib"
$ZLIB_INSTALL="$CS_INSTALL/zlib"
Expand All @@ -114,7 +114,7 @@ Copy-Item -Path "$CS_INSTALL/zlib/bin/*.dll" -Destination "$CS_INSTALL/SoapySDR/

$LIBXML_SOURCES="$CS_SOURCES/libxml2"
if (-not ($LIBXML_SOURCES | Test-Path)) {
git clone https://gitlab.gnome.org/GNOME/libxml2.git $LIBXML_SOURCES
git clone --depth 1 -c advice.detachedHead=false -b v2.12.4 https://gitlab.gnome.org/GNOME/libxml2.git $LIBXML_SOURCES
}

$LIBXML_TARGET="$CS_TARGET/libxml2"
Expand Down
4 changes: 2 additions & 2 deletions scripts/build_module_airspy.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$AIRSPYONE_HOST_SOURCES="$CS_SOURCES/airspyone_host"
if (-not ($AIRSPYONE_HOST_SOURCES | Test-Path)) {
git clone https://github.com/airspy/airspyone_host $AIRSPYONE_HOST_SOURCES
git clone --depth 1 https://github.com/airspy/airspyone_host $AIRSPYONE_HOST_SOURCES
}

$AIRSPYONE_HOST_TARGET="$CS_TARGET/airspyone_host"
Expand All @@ -22,7 +22,7 @@ Copy-Item -Path "$AIRSPYONE_HOST_INSTALL/bin/*.dll" -Destination "$CS_INSTALL/So

$SOAPYAIRSPY_SOURCES="$CS_SOURCES/SoapyAirspy"
if (-not ($SOAPYAIRSPY_SOURCES | Test-Path)) {
git clone https://github.com/pothosware/SoapyAirspy $SOAPYAIRSPY_SOURCES
git clone --depth 1 https://github.com/pothosware/SoapyAirspy $SOAPYAIRSPY_SOURCES
}


Expand Down
4 changes: 2 additions & 2 deletions scripts/build_module_airspyhf.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$AIRSPYHF_HOST_SOURCES="$CS_SOURCES/airspyhf"
if (-not ($AIRSPYHF_HOST_SOURCES | Test-Path)) {
git clone https://github.com/airspy/airspyhf $AIRSPYHF_HOST_SOURCES
git clone --depth 1 https://github.com/airspy/airspyhf $AIRSPYHF_HOST_SOURCES
}

$AIRSPYHF_HOST_TARGET="$CS_TARGET/airspyhf"
Expand All @@ -22,7 +22,7 @@ Copy-Item -Path "$AIRSPYHF_HOST_INSTALL/bin/*.dll" -Destination "$CS_INSTALL/Soa

$SOAPY_AIRSPYHF_SOURCES="$CS_SOURCES/SoapyAirspyHF"
if (-not ($SOAPY_AIRSPYHF_SOURCES | Test-Path)) {
git clone https://github.com/pothosware/SoapyAirspyHF $SOAPY_AIRSPYHF_SOURCES
git clone --depth 1 https://github.com/pothosware/SoapyAirspyHF $SOAPY_AIRSPYHF_SOURCES
}

$SOAPY_AIRSPYHF_TARGET="$CS_TARGET/SoapyAirspyHF"
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_module_audio.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$SOAPY_AUDIO_SOURCES="$CS_SOURCES/SoapyAudio"
if (-not ($SOAPY_AUDIO_SOURCES | Test-Path)) {
git clone https://github.com/pothosware/SoapyAudio $SOAPY_AUDIO_SOURCES
git clone --depth 1 https://github.com/pothosware/SoapyAudio $SOAPY_AUDIO_SOURCES
}

$SOAPY_AUDIO_TARGET="$CS_TARGET/SoapyAudio"
Expand Down
4 changes: 2 additions & 2 deletions scripts/build_module_hackrf.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
$HACKRF_SOURCES="$CS_SOURCES/hackrf"

if (-not ($HACKRF_SOURCES | Test-Path)) {
git clone https://github.com/greatscottgadgets/hackrf $HACKRF_SOURCES
git clone --depth 1 https://github.com/greatscottgadgets/hackrf $HACKRF_SOURCES
}

$HACKRF_TARGET="$CS_TARGET/hackrf"
Expand All @@ -26,7 +26,7 @@ Copy-Item -Path "$HACKRF_INSTALL/bin/*.dll" -Destination "$CS_INSTALL/SoapySDR/b

$SOAPY_HACKRF_SOURCES="$CS_SOURCES/SoapyHackRF"
if (-not ($SOAPY_HACKRF_SOURCES | Test-Path)) {
git clone https://github.com/pothosware/SoapyHackRF $SOAPY_HACKRF_SOURCES
git clone --depth 1 https://github.com/pothosware/SoapyHackRF $SOAPY_HACKRF_SOURCES
}

$SOAPY_HACKRF_TARGET="$CS_TARGET/SoapyHackRF"
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_module_netsdr.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$SOAPY_NETSDR_SOURCES="$CS_SOURCES/SoapyNetSDR"
if (-not ($SOAPY_NETSDR_SOURCES | Test-Path)) {
git clone https://github.com/pothosware/SoapyNetSDR $SOAPY_NETSDR_SOURCES
git clone --depth 1 https://github.com/pothosware/SoapyNetSDR $SOAPY_NETSDR_SOURCES
}

$SOAPY_NETSDR_TARGET="$CS_TARGET/SoapyNetSDR"
Expand Down
8 changes: 3 additions & 5 deletions scripts/build_module_pluto.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$LIBIIO_SOURCES="$CS_SOURCES/libiio"
if (-not ($LIBIIO_SOURCES | Test-Path)) {
git clone https://github.com/analogdevicesinc/libiio $LIBIIO_SOURCES
git clone --depth 1 -c advice.detachedHead=false -b v0.25 https://github.com/analogdevicesinc/libiio --depth 1 $LIBIIO_SOURCES
}

$LIBIIO_TARGET="$CS_TARGET/libiio"
Expand All @@ -11,8 +11,6 @@ if (-not ($LIBIIO_TARGET | Test-Path)) {
-DCMAKE_INSTALL_PREFIX="$LIBIIO_INSTALL" `
-DLIBUSB_INCLUDE_DIR:PATH="$LIBUSB_INCLUDE_DIR" `
-DLIBUSB_LIBRARIES:PATH="$LIBUSB_LIBRARIES" `
-DIconv_INCLUDE_DIR:PATH="$LIBICONV_INCLUDE_DIR" `
-DIconv_LIBRARY:FILEPATH="$LIBICONV_LIBRARY" `
-DLIBXML2_LIBRARY:FILEPATH="$LIBXML2_LIBRARY" `
-DLIBXML2_INCLUDE_DIR:PATH="$LIBXML2_INCLUDE_DIR"

Expand All @@ -25,7 +23,7 @@ Copy-Item -Path "$LIBIIO_INSTALL/bin/*.dll" -Destination "$CS_INSTALL/SoapySDR/b

$LIBAD_SOURCES="$CS_SOURCES/libad9361-iio"
if (-not ($LIBAD_SOURCES | Test-Path)) {
git clone https://github.com/analogdevicesinc/libad9361-iio $LIBAD_SOURCES
git clone --depth 1 https://github.com/analogdevicesinc/libad9361-iio $LIBAD_SOURCES
}

$LIBAD_TARGET="$CS_TARGET/libad9361-iio"
Expand All @@ -45,7 +43,7 @@ Copy-Item -Path "$LIBAD_INSTALL/bin/*.dll" -Destination "$CS_INSTALL/SoapySDR/bi

$SOAPY_PLUTOSDR_SOURCES="$CS_SOURCES/SoapyPlutoSDR"
if (-not ($SOAPY_PLUTOSDR_SOURCES | Test-Path)) {
git clone https://github.com/pothosware/SoapyPlutoSDR $SOAPY_PLUTOSDR_SOURCES
git clone --depth 1 https://github.com/pothosware/SoapyPlutoSDR $SOAPY_PLUTOSDR_SOURCES
}

$SOAPY_PLUTOSDR_TARGET="$CS_TARGET/SoapyPlutoSDR"
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_module_redpitaya.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

$SOAPY_REDPITAYA_SOURCES="$CS_SOURCES/SoapyRedPitaya"
if (-not ($SOAPY_REDPITAYA_SOURCES | Test-Path)) {
git clone https://github.com/pothosware/SoapyRedPitaya $SOAPY_REDPITAYA_SOURCES
git clone --depth 1 https://github.com/pothosware/SoapyRedPitaya $SOAPY_REDPITAYA_SOURCES
}


Expand Down
7 changes: 4 additions & 3 deletions scripts/build_module_rtlsdr.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
$RTLSDR_SOURCES="$CS_SOURCES/librtlsdr"
if (-not ($RTLSDR_SOURCES | Test-Path)) {
# git clone https://github.com/librtlsdr/librtlsdr $RTLSDR_SOURCES
git clone https://github.com/steve-m/librtlsdr $RTLSDR_SOURCES
# git clone --depth 1 https://github.com/librtlsdr/librtlsdr $RTLSDR_SOURCES
# git clone --depth 1 https://github.com/steve-m/librtlsdr $RTLSDR_SOURCES
git clone --depth 1 https://github.com/rtlsdrblog/rtl-sdr-blog-minimal $RTLSDR_SOURCES
}

$RTLSDR_TARGET="$CS_TARGET/librtlsdr"
Expand All @@ -25,7 +26,7 @@ Copy-Item -Path "$RTLSDR_INSTALL/bin/*.dll" -Destination "$CS_INSTALL/SoapySDR/b

$SOAPY_RTLSDR_SOURCES="$CS_SOURCES/SoapyRTLSDR"
if (-not ($SOAPY_RTLSDR_SOURCES | Test-Path)) {
git clone https://github.com/pothosware/SoapyRTLSDR $SOAPY_RTLSDR_SOURCES
git clone --depth 1 https://github.com/pothosware/SoapyRTLSDR $SOAPY_RTLSDR_SOURCES
}


Expand Down
2 changes: 1 addition & 1 deletion scripts/build_module_sdrplay.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$SOAPY_SDRPLAY_SOURCES="$CS_SOURCES/SoapySDRPlay3"
if (-not ($SOAPY_SDRPLAY_SOURCES | Test-Path)) {
git clone https://github.com/pothosware/SoapySDRPlay3 $SOAPY_SDRPLAY_SOURCES
git clone --depth 1 https://github.com/pothosware/SoapySDRPlay3 $SOAPY_SDRPLAY_SOURCES
}

$SOAPY_SDRPLAY_TARGET="$CS_TARGET/SoapySDRPlay3"
Expand Down
4 changes: 2 additions & 2 deletions scripts/build_module_uhd.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$UHD_SOURCES="$CS_SOURCES/uhd"
if (-not ($UHD_SOURCES | Test-Path)) {
git clone https://github.com/EttusResearch/uhd.git $UHD_SOURCES
git clone --depth 1 -c advice.detachedHead=false -b v4.6.0.0 https://github.com/EttusResearch/uhd.git $UHD_SOURCES
}

$UHD_TARGET="$CS_TARGET/uhd"
Expand Down Expand Up @@ -28,7 +28,7 @@ Copy-Item -Path "$UHD_INSTALL/bin/*.dll" -Destination "$CS_INSTALL/SoapySDR/bin/

$SOAPY_UHD_SOURCES="$CS_SOURCES/SoapyUHD"
if (-not ($SOAPY_UHD_SOURCES | Test-Path)) {
git clone https://github.com/pothosware/SoapyUHD $SOAPY_UHD_SOURCES
git clone --depth 1 https://github.com/pothosware/SoapyUHD $SOAPY_UHD_SOURCES
}

$SOAPY_UHD_TARGET="$CS_TARGET/SoapyUHD"
Expand Down

0 comments on commit f279c9b

Please sign in to comment.