đ Getting Started
đĨ Prerequisites
These are needed before working to get TheAtlasEngine building successfully on your platform.
python
: 3.12 or aboveconan
: 2.10.0 or abovellvm
: 17 or aboveCMake
Build tool for the projectgit
: Version control
Info
Needs to install Visual Studio's installer before using the winget
command
Visual studio is required only on Windows for getting C++ to work
Run this winget
command to setup C++ with Visual Studio installer in powershell (in admin mode)
winget install Microsoft.VisualStudio.2022.BuildTools --override "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended -p --installWhileDownloading"
It is recommended to use Choco for an easy installation process on Windows.
To install choco
, open powershell with admin access and run the following command in your terminal (powershell must be admin):
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
Tip
If choco
command does not work after running this script try closing and reopening powershell again.
When choco
prompts you to run install scripts from the commands below, enter all
so it can install everything.
Install git
(powershell must be admin):
choco install git
Install python
(powershell must be admin):
choco install python --version=3.12.0
Install llvm
(powershell must be admin):
Error
If you get this error make sure that your environment variable is set to LLVM's clang.exe and clang++.exe filepath.
While also making sure
CMake Error at CMakeLists.txt:2 (project):
The CMAKE_CXX_COMPILER:
C:/Program Files/LLVM/bin/clang++.exe
is not a full path to an existing compiler tool.
choco install llvm
Install conan
(powershell must be admin)
pip install "conan>=2.10.2"
Install cmake and make
Error
you can get this error if you DO NOT have 'make' installed via choco
CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
Error
you can get this error if you DO NOT have 'mingw' installed via choco
CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
choco install make cmake
Info
mingw is installed because we need mingw32-make.exe
as dependencies will default to using "MinGW Makefiles" generator specified.
which means that their CMake will look for mingw32-make.exe
specific make executables instead of make.exe
Install mingw
choco install mingw
Info
Using this winget
command will install Vulkan's installer, set it up for you, and set the environment path variable.
Installing Vulkan's installer from the terminal in powershell. (in admin mode)
winget install --id=KhronosGroup.VulkanSDK -e
Tip
Once you have completely finish installing. DONT FORGET to refresh your powershell before building the TheAtlasEngine project.
Install wget if it isn't already on your system
sudo apt-get install wget
Install the latest version of llvm
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh
Install LLVM's C+ standard library (this will use the llvm apt repos)
sudo apt install libc++-17-dev libc++abi-17-dev
Installing Linux Prerequisites
sudo apt install -y lsb-release wget software-properties-common gnupg libgtk2.0-dev libgl1-mesa-dev
sudo apt-get install -y libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxt-dev libxtst-dev libxrender-dev libxrandr-dev libxi-dev
sudo apt install -y software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
Info
If your using 20.04, you have to upgrade Python to 3.10
sudo apt update
sudo apt install software-properties-common -y
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install Python3.10
Install pipx which is used to install conan
sudo apt install pipx
Installing conan
pipx install "conan>=2.10.1"
Tip
On linux vulkan is not needed to be installed, conan handles that
Install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install python pipx llvm@17
Install conan:
pipx install "conan>=2.10.2"
Make clang-tidy
available on the command line:
sudo ln -s $(brew --prefix llvm)/bin/clang-tidy /usr/local/bin/
Install Rosetta (only required for M1 macs):
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
Info
metal-cpp does not need to be installed because conan handles this for you
đĻ Setting up Conan
Install host profiles for your specific platforms
If you are on an x86 architecture for Windows.
conan config install -sf profiles/x86_64/Windows/ -tf profiles https://github.com/engine3d-dev/conan-config.git
If you are on a linux platform that uses an x86 architecture.
conan config install -sf profiles/x86_64/linux/ -tf profiles https://github.com/engine3d-dev/conan-config.git
If you are on an M1 Mac OS.
conan config install -sf profiles/armv8/mac/ -tf profiles https://github.com/engine3d-dev/conan-config.git
đĨ Getting project repositories from Artifactory
Add the engine3d-conan repository to your system. This repository holds all of the TheAtlasEngine packages.
conan remote add engine3d-conan https://libhal.jfrog.io/artifactory/api/conan/engine3d-conan
â Development Environment Completed!!
Once the development environment is completed. Then go to the repos to see the list of repositories that you plan to contribute to.
Changing Build Type
The build type determines level of optimizations for the project you are building for. TheAtlasEngine by default is Release is because performance is one of the most important aspects of the project.
You can change build_type
to the following types:
-
Debug
: Turns on some optimizations to reduce binary size and improve performance while still maintaining the structure to make debugging easier. Recommended for testing and prototyping. -
Release
: Turns on optimizations and favors high-performance optimizations over space-saving optimizations. -
MinSizeRel
: Turns on optimizations and favor higher space saving optimizations over higher-performance.
Tip
-b missing is only used during your first build.
conan build . -b missing -s build_type=Debug
This is how you can specify build types when building with conan:
conan build . -s build_type=Debug