-
Notifications
You must be signed in to change notification settings - Fork 429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Windows and Mac build instructions on Wiki #864
Comments
Very useful indeed! Edit: Might have found the answer: Add workload "Desktop development with C++" into VS installation and the tools such as cmake will get available. |
Sorry, you need to install cmake as well: https://cmake.org/ - I'll update the text above. |
Next challenge is a cmake error: CMake Error at C:/Qt/5.15.2/mingw81_64/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package):
To solve, add the "QT Charts" to the Qt5.15.2 install option (checkbox in lower end of screenshot) and then rerun cmake. |
Thanks - you should probably have MSVC 2019 64-bit checked there too (As that's what Visual Studio uses) rather than MinGW |
Good point, actually I had never consciously checked MinGW. But I will now do for MSVC 2019 64-bit. |
Done adding some headers and cosmetic changes:
Also referenced in the main right menu at the top: https://github.com/f4exb/sdrangel/wiki |
Next challenge (Windows build): i come as far as the ninja command. Aborts as follows: [46/2239] cmd.exe /C "cd /D C:\Users\xxxxx\sdrangel\build\external\soapysdr\src\soapysdr && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -P C:/Users/xxxxx/sdrangel/build/external/soapysdr/tmp/soapysdr-gitupdate.cmake" C:\Users\xxxxx\sdrangel\build\external\rtlsdr\src\rtlsdr-build\src\rtlsdr.rc(2): fatal error C1083: Datei (Include) kann nicht ge÷ffnet werden: "afxres.h": No such file or directory ninja: build stopped: subcommand failed. |
Not, sure, as I haven't seen that problem. One thing that looks odd is the reference to Hostx86/x86/cl.exe? Are you definitely in a x64 shell rather than x86? When you start the shell, it should output: ** Visual Studio 2019 Developer Command Prompt v16.9.1 [vcvarsall.bat] Environment initialized for: 'x64' Check for x64 at the end. Note, if you were accidentally in an x86 shell, best to completely delete your build directory and start again. |
Oops you're right - 32bit... |
Hmm still not much better. [116/2288] Performing build step for 'rtlsdr' |
In my case, the "x64 Native Tools Command Prompt for VS 2019" is only available, if the workload "Desktop development with C++" option was installed with MSVC 2019. The same option also installs cmake in VC. |
I've sent an invite to |
Progress update:
|
You don't have to disable drivers in CMakeLists.txt, you can do it from the command line with -DENABLE_RTLSDR=OFF. I'll add NSIS, thanks. Yes, the patch should be in the DAB library sub-project. You can check by looking in sdrangel\build\external\dab\src\dab\library\src\backend\reed-solomon.cpp - Line 366 should be:
Not
To debug, I suggest you create a new build directory, sdrangel/builddebug then run cmake there changing:
To:
(-DCMAKE_BUILD_TYPE=Debug will probably be too slow) Then run the debugger with:
When it crashes, you should be able to see in which function it happens and send a screenshot with a stack trace. |
Looks like you are getting an image broadcast! And the code is trying to write it to a linux style path, without checking the file was opened successfully, which it wont on Windows. Should be easy to change. |
If I understand correctly, this happens with the DAB MOT service (slide shows), which would explain, why DAB demod runs fine for about 20 seconds, which is a typical transmission time for a slide until it is fully fetched. Does this make sense? |
Yes, MOT images are very popular here. |
Didn't realise it was in use. I guess we need a way to display the pic in SDRangel too :) I'll have to see if I can find a UK station that uses it. |
BBC, Capital London, Heart London are examples which should also broadcast pics. |
I saw that from a search, but currently doesn't appear to be the case. Anyway, I've guessed what a fix might be. You should just need to type ninja to rebuild and the patch to the DAB library should be picked up automatically. |
Your patch proofed to work! Listening different DAB+ programs since 5 minutes with no issues. Never before had come that far. Thanks! |
Excellent. Have a look in your temp directory (possibly C:\Users\you\AppData\Local\Temp), and you may see the images there. |
If you can send another sdriq file, I'll take a look. |
Stupid question for the DAB demod - how would you change channel whilst listening so that also the Programs list updates? My workaround is to create one preset per desired channel and switch between presets. Listening DAB since 1 hour without the slightest problem. Much appreciated! New sdriq recording (90 seconds) of another local MUX (Channel 5D) as .zip here: |
Currently, the program list should contain all the programs for the tuned ensemble. When you switch to a new frequency, new programs will be added for that frequency, but as soon as you change the frequency, the program you are currently listening to will stop. A feature that isn't yet implemented is for a channel scan - which goes through all of the channels and records a list of all programs there are and then saves it, so you can always see the complete list. Thanks for the file, I'll take a look. |
Aaaah the programs get appended to the list. All right, this is working. I had never scrolled the programs further down :) |
The image decoding looks like another Windows specific issue - as it works on Linux. |
Does not surprise me :) |
Thanks for updating the install prerequsites. I see the 2 references to cmake are still in? |
Ok - fixed that bug too - and when the above pull request is merged, you'll be able to see the images in the GUI. Note, changes to the SDRangel source aren't picked up automatically when you build (like there are for the DAB library). So after the merge is complete, you'll need to do a 'git pull' to get it. |
Whow great. Will do. |
Tried broadcast images. Works great. Thanks! Edit: I do not have audio overdrive anymore either on the very few programs where it was present although I did not find anything in the patches that explicitly fixed this. |
I have a debug build ready now, but it has no support for a PlutoSDR device. This currently my only available device. Maybe because of the |
Yes you do need |
In the existing build directory I did a rerun of cmake without the |
That's |
Yep thanks. Listening to DAB now but sorry, no MOT image on the Windows GUI. Where should that be? |
Also, make sure you've done a 'git pull' |
Aha maybe I was too impatient. On most programs it takes quite a while. Nice! |
My presumably last question on this thread is, if there is any chance to get rid of the Windows build errors for rtl-sdr? |
I don't know - I just did a clean build and it worked fine. You might try doing the same - i.e. checking out all of the source from scratch somewhere else and see if the same problem reappears. |
You did that in Windows or Linux? |
Yep, on Windows. I've just built it again from scratch and it is OK. I think it may be related to MFC not being installed as part of Visual Studio. Could you please try adding that? |
Confirmed. Adding the MFC option did the trick. Thanks. |
I think it would be useful to add Windows and Mac build instructions on a Wiki page.
Windows:
Install Visual Studio 2019 with Desktop development with C++ (Community edition is free - https://visualstudio.microsoft.com/vs/community/)
Install Qt 5.15.x (including optional Qt Charts) for MSVC 2019 64-bit (https://www.qt.io/download-open-source)
Install Boost (https://www.boost.org/users/download/)
Install ninja (https://ninja-build.org/)
Install cmake (https://cmake.org/download/) - May also be installed with Visual Studio
Install git (https://git-scm.com/download/win)
Install NSIS (https://nsis.sourceforge.io/Download)
Make sure git, cmake, ninja and nsis are in your PATH environment variable.
Run Visual Studio shell: Start > Visual Studio 2019 > x64 Native Tools Command Prompt for VS 2019
This will build the installer .exe
After an initial build of 'ninja package', rather than repeatedly building the installer, you can run SDRangel from the build directory, by just running 'ninja' to rebuild then '.\bin\sdrangel' to run.
Passing -DCMAKE_BUILD_TYPE=Debug or -DCMAKE_BUILD_TYPE=RelWithDebInfo to the cmake command will create a version that is easier to debug.
To debug using Visual Studio, run:
Mac:
Install XCode from AppStore
Install MacPorts from: https://www.macports.org/install.php
In a terminal, run:
More elaborate instructions probably needed for building directly from https://github.com/f4exb/sdrangel.git
The text was updated successfully, but these errors were encountered: