Skip to content

Building

Adrian edited this page Feb 5, 2021 · 10 revisions

Overview

Currently, the engine uses the C++17 standard, so make sure your compilers are up to date. On Windows, you will need a Visual Studio installation, preferably 2019 or later. For earlier versions, you can change the generator within the build scripts to create the corresponding Visual Studio solution.

macOS

  • Run the build.sh scripts from within the project directory to generate the necessary Makefile and build configuration. You can optionally specify the --xcode command line flag when building with either command to generate an Xcode project if you prefer to work with Xcode.
  • Once the build succeeds, run the run.sh script any time to run the engine. On Xcode you can simply click on the build and run button to achieve the same result.

Windows

  • Open a Powershell window, then go the project directory using cd your\project\path. Run the build.ps1 powershell script to generate a Visual Studio project. You can then open the Zenith.sln solution to run and build the project as normal.

    OR

  • Use the CMake GUI to generate the Visual Studio project files, making sure to select the appropriate Visual Studio version as the generator, based on what you have installed.

Command Line Flags

Windows: -development Unix: --development|-d


Generates a development build. This has some additional implications on how resources are expected to be bundled. For more information check out the Resources and Assets wiki page. In short, building with this flag will not require you to package your Assets folder into a zip file.

Windows: -headless Unix: --headless|-h


Creates a headless version of the engine. In headless configuration, the editor is stripped out and the engine is built as a standalone executable instead of a separate library.

Windows: -clean Unix: --clean|-c


Cleans the engine build, any project build data (for projects built with the projectName flag) and all CMake configuration files, before rebuilding the engine.

Windows: -projectName Unix: --projectName|-p


Generates a project with the given name in the same directory as the engine, pre-linked to a pre-built engine binary.