This document provides instructions to set up the development environment on a Windows computer.
- Check that Git is installed on your computer
- Open the Command Prompt (if it is not already open)
- Run
git --version
- If the command returns an error,
- Go to this link in your browser: https://git-scm.com/download/win
- Click "64-bit Git for Windows Setup" to download the installer
- In the directory where the file downloaded, run the installer
- Follow the installer instructions; the default options should work
- Run
git --version
in the Command Prompt again to confirm that the installation worked
- Otherwise, continue to step 2.
- Clone the repository from GitHub
- Open the Command Prompt in the folder where your want the repository (or navigate there with
cd [file path]
) - Run
git clone https://github.com/MylesScholz/A-Life-Capstone-Project.git
- Navigate into the new directory with
cd ./A-Life-Capstone-Project
- Run
git submodule update --init --recursive
- Open the Command Prompt in the folder where your want the repository (or navigate there with
- Check that Python is installed on your computer
- Open the Command Prompt (if it is not already open)
- Run
python --version
- If the command returns an error or a version less than 3.6,
- Go to this link in your browser: https://www.python.org/downloads/
- Click "Download Python 3.*" to download the installer
- In the directory where the file downloaded, run the installer
- Follow the installer instructions; the default options should work, but check the box labelled "Add python.exe to PATH"
- Run
python --version
in the Command Prompt again to confirm that the installation worked
- Otherwise, continue to step 2.
- Install SCons with pip
- Open the Command Prompt (if it is not already open)
- Run
pip install scons
- Run
scons --version
to confirm the installation
- Check that gcc or g++ is installed on your computer
- Open the Command Prompt (if it is not already open)
- Run
gcc --version
- If the command returns an error, go to this link and follow all its installation instructions: https://www.msys2.org/
- Check that Godot is installed on your computer
- Press the Windows key and search "Godot"
- If no app (executable) shows up,
- Go to this link in your browser: https://godotengine.org/download/archive/4.2-stable/
- Click the "Standard" button next to "Windows" to download a ZIP file containing the Godot editor
- In the directory where the file downloaded, unzip the file
- Right click the ZIP file
- Click "Extract All..."
- In the window that appears, click "Extract"
- The Godot editor executable is in the uncompressed directory; move this wherever you want to store the editor (but not within the repository directory)
- Open the Command Prompt in /A-Life-Capstone-Project/godot-cpp/ (or navigate there with
cd [file path]
) - Run
scons platform=windows
(this may take a while to complete) - When the command line returns, navigate to the repository directory with
cd ..
- Run
scons
(this may also take a while) - Check that the project built correctly by opening it in the Godot editor
- Open the Godot editor
- Click "Import"
- In the window that appears, navigate to the A-Life-Capstone-Project directory
- Click "Select Current Folder"
- The project should open without error and be able to run
- For troubleshooting, see the Godot documentation: https://docs.godotengine.org/en/stable/contributing/development/compiling/index.html#building-for-target-platforms
- Go to this link in your browser: https://github.com/llvm/llvm-project/releases/tag/llvmorg-13.0.1
- Click "LLVM-13.0.1-win64.exe" to download the installer
- In the directory where the file downloaded, run the installer
- If the installer asks to uninstall an existing version of LLVM, click "Yes"
- Follow the installer instructions; use the default options, except click "Add LLVM to the system PATH for all users"
- Check that clang-format is installed properly
- Open the Command Prompt (if it is not already open)
- Run
clang-format --version
- If the command returns an error,
- Press the Windows key, type "Edit the system environment variables", and select the option of the same name
- In the "System Properties" window, click "Environment Variables..."
- In the "Environment Variables" window, under "User Variables for [User]", click the "Path" entry
- Click "Edit"
- In the "Edit Environment Variable" window, click "New" and type "C:\Program Files\LLVM\bin" (excluding the quotation marks)
- Click "OK" in each of the three windows in reverse order to close them
- Run
clang-format --version
again to confirm the change
- Check that Visual Studio Code is installed on your computer
- Press the Windows key and search "Visual Studio Code" or "VS Code"
- If no app shows up,
- Go to this link in your browser: https://code.visualstudio.com/
- Click "Download for Windows" to download the installer
- In the directory where the file downloaded, run the installer
- Follow the installer instructions; the default options should work
- Open Visual Studio Code
- In the "Extensions" tab on the right, search for and install, at minimum, the following extensions:
- C/C++
- C/C++ Extension Pack
- Clang-Format
- godot-tools
- Python
- Open "Settings" by navigating through the top menu bar ("File" > "Preferences" > "Settings")
- Under the "User" tab, navigate to C/C++ formatting ("Extensions" > "C/C++" > "Formatting")
- Set the following settings:
- C_Cpp: Clang_format_fallback Style: LLVM
- C_Cpp: Clang_format_path: C:\Program Files\LLVM\bin\clang-format.exe
- C_Cpp: Clang_format_style: file
- C_Cpp: Formatting: clangFormat
- Under the "User" tab, navigate to text editor formatting ("Text Editor" > "Formatting")
- Set the following settings:
- Format On Paste: Checked
- Format On Save: Checked
- Format On Save Mode: file