Skip to content

Latest commit

 

History

History
101 lines (65 loc) · 5.49 KB

Building-Windows.md

File metadata and controls

101 lines (65 loc) · 5.49 KB

Building on Windows

These instructions and scripts assume you will be using Microsoft Visual Studio 2022. Building SatDump on Windows requires Microsoft Visual Studio 2019 or greater. If you are using another version of Visual Studio, update windows\Build.ps1 as necessary.

Compilation is currently only available for 64-bit Windows.

On install, set Visual Studio up for use with:

  • Desktop development with C++
  • Under "Individual components", install "Git for Windows" as well.

image

Automated PowerShell Build Instructions

Using the automated PowerShell build scripts is the easiest way to build SatDump on Windows.

  1. Open "Developer PowerShell for VS 2022" from the start Menu

    image

  2. cd to a directory where you want to build SatDump

  3. Run the following commands, one at a time

    git clone https://github.com/SatDump/SatDump
    cd SatDump
    .\windows\Configure-vcpkg.ps1    # Downloads a preconfigured vcpkg to the correct
                                     # location and adds SDRPlay libraries.
    .\windows\Build-SatDump.ps1      # Builds SatDump
    .\windows\Finish-Release.ps1     # Copies all necessary files into the Release folder

Your build SatDump will be in the build\Release folder of the SatDump repo.

Build Folder

Building in Visual Studio for Debugging

Compiling in Visual Studio for Debugging is for advanced users who aren't afriad to get their hands dirty!

  1. Open "Developer PowerShell for VS 2022" from the start Menu

    image

  2. cd to a directory where you want to build SatDump

  3. Run the following commands, one at a time

    git clone https://github.com/SatDump/SatDump
    cd SatDump
    .\windows\Configure-vcpkg.ps1    # Downloads a preconfigured vcpkg to the correct
                                     # location and adds SDRPlay libraries.
  4. Keeping the developer console open in the background, open Microsoft Visual Studio. On the launch screen, select "Open a local folder", and select your cloned SatDump repo.

    Open Local Folder

  5. Once the project opens, select "Open CMake Settings Editor"

    Edit CMake Settings

  6. In CMake Settings, change the following items:

    • CMake toolchain file: set this to <full path of your satdump repo>\vcpkg\scripts\buildsystems\vcpkg.cmake
    • CMake valiables and cache: check "BUILD_MSVC"
    • CMake Generator (under "show advanced setting): set this to "Visual Studio 17 2022 Win64"
  7. Press Ctrl+S to save the CMake Settings. You will usually get an error right away - this is normal. Either way, click Project > Delete Cache and Reconfigure. Confirm the prompt and let cmake rebuild its cache

    Delete Cache and Reconfigure

  8. Once cmake finishes, click Build > Build All. Go get come coffee because this takes several minutes

    Build All

  9. Once you get the "Build all succeded" message, go back to your developer terminal (it's still open, right?) and run .\windows\Finish-Debug.ps1. This will copy all necessary DLL files into the debug folder.

  10. That's it, you're ready to debug! To make any changes to the code and build again, just repeat steps 8 and 9 before launching the debugger. Step 9 is important, because it copies the plugin DLLs into the right spot for SatDump to load them!

Debugging SatDump UI

Once you built SatDump for debugging in Windows, using the debugger is the same as it is with any other Visual Studio project.

  1. At the top, set the startup item to "satdump-ui.exe" (not the installed one!)

    SatDump UI Startup Item

  2. Click the green start icon to start debugging SatDump-UI. Breakpoints and other tested debugger functionality works as expected

    The Mind of Alan

Debugging SatDump CLI

Debugging the CLI version is similar to the UI, but you need to provide command line arguments

  1. At the top, change the startup item to "satdump.exe"

    Satdump target

  2. Go to Debug > Debug and Launch setting for SatDump

    Debug Settings

  3. Add the satdump launch arguments in the form of an array. If you compose the argument list elsewhere and copy/paste it here, it will turn it into an array for you. You may need to clean it up, though

    Args

  4. Click the green start icon to start debugging SatDump.

    Dumping all MSUMR Timestamps