WIP updated Windows build instructions (3)

Vincent Sonnier 2018-05-18 10:44:35 +02:00
parent 9abb4130d4
commit 3c61d9d004

@ -91,13 +91,37 @@ Configure variables to indicate CubicSDR that modules files will be searched in
`libusb` is a low-level USB 'driver' used by the `librtlsdr` used in turn by the SoapySDR module below to talk to the hardware. There are 2 way to get them: `libusb` is a low-level USB 'driver' used by the `librtlsdr` used in turn by the SoapySDR module below to talk to the hardware. There are 2 way to get them:
- A) Easiest way: use a pre-compiled `librtlsdr` binary which also package `libusb` from the [librtlsdr Releases](https://github.com/librtlsdr/librtlsdr/releases) page and choose the "x64" version. Easiest way: use a pre-compiled `librtlsdr` binary which also package `libusb` from the [librtlsdr Releases](https://github.com/librtlsdr/librtlsdr/releases) page and choose the "x64" version.
- B) Compile both libraries :
Or re-compile both libraries : (not complete)
* Clone or download https://github.com/libusb/libusb to C:\MSVCDev\libusb and build it using `C:\MSVCDev\libusb\msvc\libusb_2017.sln` choosing the `Release` and `x64` configuration.
* Clone or download https://github.com/librtlsdr/librtlsdr to C:\MSVCDev\librtlsdr
* Launch CMake, set source path to C:/MSVCDev/librtlsdr/
* Set destination to C:/MSVCDev/librtlsdr_win64/
* Click "Configure" and choose "Visual Studio 15 2017 Win64" and Finish
* Set LIBUSB_INCLUDE_DIR to C:/MSVCDev/libusb/
* Set LIBUSB_LIBRARIES to C:/MSVCDev/libusb/x64/Release/dll/libusb-1.0.lib
* Set THREADS_PTHREADS_INCLUDE_DIR to (TBD)
* Set THREADS_PTHREADS_WIN32_LIBRARY to (TBD)
* Click "Configure" again and then click "Generate"
Open "Developer Command Prompt for VS2017" by right-clicking and "Run as Administrator".
From the prompt:
```
C:\> cd C:\MSVCDev\
C:\MSVCDEV> cmake --build librtlsdr_win64 --config Release --target install
... Bunch of building ...
0 Error(s)
```
Either way, copy the files `rtlsdr.dll` and `libusb-1.0.dll` in the `C:\MSVCDev\CubicSDR_win64\x64\` directory where CubicSDR can find them.
## SoapyRTLSDR ## SoapyRTLSDR
* Clone or download ZIP from https://github.com/pothosware/SoapyRTLSDR to C:\MSVCDev\SoapyRTLSDR * Clone or download ZIP from https://github.com/pothosware/SoapyRTLSDR to C:\MSVCDev\SoapyRTLSDR
* Download http://sdr.osmocom.org/trac/attachment/wiki/rtl-sdr/RelWithDebInfo.zip and unpack to C:\MSVCDev\rtl-sdr-release\ * Go to [librtlsdr Releases](https://github.com/librtlsdr/librtlsdr/releases) page and download the "x64" version, then unpack it to C:\MSVCDev\rtl-sdr-release\
* Copy C:\MSVCDev\rtl-sdr-release\x64\libusb-1.0.dll and C:\MSVCDev\rtl-sdr-release\x64\rtlsdr.dll to C:\Program Files\SoapySDR\bin * Copy C:\MSVCDev\rtl-sdr-release\x64\libusb-1.0.dll and C:\MSVCDev\rtl-sdr-release\x64\rtlsdr.dll to C:\Program Files\SoapySDR\bin
* Launch CMake, set source path to C:/MSVCDev/SoapyRTLSDR/ * Launch CMake, set source path to C:/MSVCDev/SoapyRTLSDR/
* Set destination to C:/MSVCDev/SoapyRTLSDR_win64/ * Set destination to C:/MSVCDev/SoapyRTLSDR_win64/