Currently, the only two tested editors on Windows are VSCode and Visual Studio. If you are succesful in setting up another environment, please document the process here. If you have no experience in either, VSCode is recommended.
TIP To open a terminal in a directory, click on the file address box at the top of the File Explorer, type cmd, and press enter.
The following plugins are needed for use with VSCode. These can be downloaded under the extensions tab.
- C/C++ Extension Pack
- CMake
- CMake Tools
If downloading Visual Studio for the first time, make sure to select these plugins. If already downloaded, reopen the installer and click modify to select them.
- Desktop development with C++
- Linux and embedded development with C++ (optional)
Download the standalone installer and follow the directions. Accept all of the recommended settings except for the default editor. Select whichever is your prefrence (VSCode is a good option).
Follow these instructions to create an SSH key. When asked what to name the file, press enter. This will give the file the default name. When asked to create a password, press enter. Currently, there is a glitch with the Windows implementation of SSH that causes an authentication error with git submodules when a password is set. You may stop when you reach the section titled "Generating a new SSH key for a hardware security key". To add the key to your account, follow these directions, starting in the "Adding a new SSH key to your account" section. To validate this was successful, run the following command:
ssh git@github.comWhen asked to confirm the key, type yes and press enter.
To download the project, first navigate to the desired download location and open a terminal. After this, run the following command:
git clone git@github.com:HEEV/SupermilageDisplay.git --recursiveFollow these instructions to install VCPKG through step 2 (the integration step is not necessary). Once installed, navigate to the VCPKG directory and open a terminal. Run the following command to install libusb:
./vcpkg install libusbOnce this has finished, follow the instructions for your chosen IDE to allow it to use VCPKG libraries.
Open the project in VSCode and create the file .vscode/settings.json. In this file, paste the following, but replace [vcpkg root] with the download location of VCPKG.
{
"cmake.configureSettings": {
"CMAKE_TOOLCHAIN_FILE": "[vcpkg root]/scripts/buildsystems/vcpkg.cmake"
}
}Under the project tab, click on "CMake Settings for SuperMileageDisplay". Under the CMake toolchain file setting, paste the following code but replace [vcpkg root] with the download location of VCPKG.
[vcpkg root]/scripts/buildsystems/vcpkg.cmakeThe project is ready to be compiled! To do so, click on the play button at the bottom of the screen (VScode) or at the top (Visual Studio). Note that the play button at the top right in VSCode will not work.