-
Notifications
You must be signed in to change notification settings - Fork 0
IDE Setup Guide
For different operating systems, you can use this document to better help you install and configure the MyEngine project.
Under different operating systems, you can choose any C++ Integrated Development Environment (IDE) for project development. Here are some commonly used C++ IDE options:
If you want to set up a C/C++ environment in one go, it is recommended to choose:
CLion is a powerful cross-platform IDE that supports all platforms (Windows, Linux, MacOS), has a relatively small footprint, and the project relies on CMake for building, with the corresponding compiler being MinGW. It is the most suitable IDE for installing or configuring the MyEngine project on this platform.
Visual Studio is beginner-friendly and fully compatible with the Windows platform. However, it has a relatively large footprint, and its corresponding compiler is MSVC.
Different IDEs have different configuration methods. Here are the configurations for the following mainstream IDEs:
ℹ️ Note:
On Windows systems, you do not need to install additional build tools such as MinGW, Ninja, or CMake, as CLion has built-in corresponding build tools.
All you need to do is configure the system environment variables so that you can directly use the corresponding build tools in any terminal.
You can right-click the Windows icon, select the System menu item, and open Advanced system settings in the settings. In the pop-up System Properties window, click the Environment Variables button. Next, you need to add the path to CLion's corresponding build tools to the system environment variables. Usually, you only need to add it to the Path environment variable.
Alternatively, you can directly run a script in PowerShell to add the path to CLion's corresponding build tools to the system environment variables. The specific steps are as follows:
Create a new file (e.g., set-clion-path.ps1), and execute the following command in PowerShell to add the path to CLion's corresponding build tools to the system environment variables. Before executing the following command, remember to replace $clionPath with your own CLion installation path.
# Need to modify $clionPath to your own path.
$clionPath = "\path\to\Jetbrains\Clion"
# Add the path to the system environment variable.
$newPath = "$clionPath\bin;$clionPath\bin\mingw\bin;$clionPath\bin\gdb\win\x64\bin;$clionPath\bin\ninja\win\x64;$clionPath\bin\cmake\win\x64\bin"
# Add the path to the user environment variable.
$currentUserPath = [Environment]::GetEnvironmentVariable("PATH", "User")
# Set the user environment variable.
[Environment]::SetEnvironmentVariable("PATH", "$currentUserPath;$newPath", "User")
# Current session will be affected.
$env:PATH = [Environment]::GetEnvironmentVariable("PATH", "User")💡 TIPS:
Note that the above configuration only takes effect for the current user.
If you need it to take effect for all users, run PowerShell as an administrator and replace
"User"with"Machine".
For specific installation methods, please refer to [Compiler Installation GNU GCC and Usage Guide](Compiler Installation Guide).
For specific installation methods, please refer to [Compiler Installation GNU GCC and Usage Guide](Compiler Installation Guide).
Open the terminal directly and follow the [Quick Start → Source Repository Installation](Quick Start/#source-repository-installation) section in the document to configure, compile, and install the project.
If you have never installed Visual Studio, open the Visual Studio Installer directly.
-
In the
Availabletab, select any IDE and click theInstallbutton. -
In the
Workloadstab, select theDesktop development with C++andC++ development tools for Linux and Macworkloads. -
In the
Installation locationtab, modify theProductinstallation path, then click theInstallbutton and wait for the download and installation to complete.
If you have already installed Visual Studio, click Tools -> Get Tools and Features in the menu bar to launch the Visual Studio Installer.
-
Select your IDE and click the
Modifybutton. -
In the pop-up window, select the
Individual componentstab. -
Enter
cmakein the search box and check theCMakecomponent. -
Click the
Installbutton to install the CMake component.
Open the command line Developer PowerShell for VS or Developer Command Prompt for VS (located in the Visual Studio folder in the Start menu), and follow the [Quick Start → Source Repository Installation](Quick Start/#source-repository-installation) section in the document to configure, compile, and install the project.
For configuration, please refer to the following links:
Open the terminal directly and follow the [Quick Start → Source Repository Installation](Quick Start/#source-repository-installation) section in the document to configure, compile, and install the project.