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.
On install, set Visual Studio up for use with:
Desktop development with C++
Python Development Support (for building dependencies)
Within Visual Studio, go to Tools > Python > Python Environments. Change the “Overview” dropdown to “Packages (PyPI)” and install mako (for building dependencies)
Automated PowerShell Build Instructions
Using the automated PowerShell build scripts is the easiest way to build SatDump on Windows.
Open “Developer PowerShell for VS 2022” from the start Menu
cd to a directory where you want to build SatDump
Run the following commands, one at a time
powershell
git clone https://github.com/SatDump/SatDump
cd SatDump
.\windows\Configure-vcpkg.ps1 # Downloads vcpkg and configures it to build SatDump.
# This may take a while!
.\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.
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!
Open “Developer PowerShell for VS 2022” from the start Menu
cd to a directory where you want to build SatDump
Run the following commands, one at a time
powershell git clone https://github.com/SatDump/SatDump cd SatDump .\windows\Configure-vcpkg.ps1 # Downloads vcpkg and configures it to build SatDump. # This may take a while!
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.
Once the project opens, select “Open CMake Settings Editor”
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 settings”): set this to
Visual Studio 17 2022 Win64
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
Once cmake finishes, click Build > Build All. Go get come coffee because this takes several minutes
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.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.
At the top, set the startup item to “satdump-ui.exe” (not the installed one!)
Click the green start icon to start debugging SatDump-UI. Breakpoints and other tested debugger functionality works as expected
Debugging SatDump CLI
Debugging the CLI version is similar to the UI, but you need to provide command line arguments
At the top, change the startup item to “satdump.exe”
Go to Debug > Debug and Launch setting for SatDump
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
Click the green start icon to start debugging SatDump.