This topic will guide you through the process of building the CryEngine for the first time.
WAF is a very powerful meta build system actively developed by Thomas Nagy.
With WAF, the power of CryEngine can be unleashed on a variety of platforms using a the most common compilers. It's Python nature makes it easier to extend and debug than other build systems. CryEngine has made heavy use of its extendibility while keeping the core mostly untouched. Extensions such as a simple GUI, integration into Visual Studio, Incredibuild support or uber file support enhance the workflow of large scale products even further.
A quick overview of support platforms and compilers can be found here:
Before you are able to build the CryEngine, you will need to configure the WAF Build System to your needs.
To do so, you will need to locate the cry_waf exectuable file. It is worth noticing that all interaction with the WAF Build System will be handled by this file.
- Locate and execute: <SDK_DIR>/cry_waf.exe
- Locate and execute: <SDK_DIR>/cry_waf.sh using Python 2.7
When you run Cry WAF the first time, the WAF Interface will ask you for a selection of user specific configuration options. The following section will guide you thorough the most important one.
Each selection can be changed individually after the configuration step has finished.
To do this execute cry_waf again to bring up the WAF GUI and select Options.
Automatic Solution Generation:
If enabled WAF is able to create a project for your favorite IDE.
The CryEngine is collection of many modules which interact with each other in various ways. The more you get to know the CryEngine, the more modules you will discover and potentially use.
WAF allows you to categorize all modules within the CryEngine space into Specs. Depending on your Specs selection, you will be able to see the various dependent modules in the final generates solution.
There are two Specs which should be of initial interest to you:
- GameSDK - allows you to build and run the CryEngine SDK sandbox game. In essence the sandbox game that is shipped as part of the CryEngine.
- GameSDK and Tools - allows you to build and run the CryEngine SDK sandbox game as well as tools, such as the CryEngine Editor.
If you are working on the game as well as the editor. Select both Specs. This allows you to quickly switch between buildpipelines. After all if you are working on the game only, you are not interested on waiting for the Editor to re-compile.
Example result in Visual Studio
Compiling The Project
Once Cry WAF is configured you will be able to compile the various CryEngine components. This can be done via the WAF Command-Line Interface or from within the chosen IDE.
Option 1: Using the command line
Using the WAF Command-Line Interface is straight forward but requires some knowledge about how the WAF Command is put together.
In the previous section we already located the cry_waf entry point executable. This time you will instruct it to build the CryEngine component you are interested in.
A build command is made of the following component:
- cry_waf build_<platform>_<compiler>_<configuration>
- <platform> stands for the target platform.
- <compiler> stand for the target compiler.
- <configuration> for the target configuration.
cry_waf has to be executed from the root of the CryEngine SDK folder!
Option 2: Using Visual Studio
To generate a Visual Studio solution execute <SDK_DIR>/cry_waf.exe and select Regenerate -> Visual Studio Solution from the WAF Interface.
WAF will generate a Visual Studio Solution file for you which can be found in <CRY_SDK>/Solutions called CRYENGINE.sln.
Once you have opened the solution ensure that you have the spec and platform selected that you want to build, as well as the correct startup project.
Example compile and launch GameSDK [Profile] - X64:
- Check target spec and platform:
- Build the game:
Press F7 or go Build-> Build Solution.
- Select the startup project:
- Launch the game:
Press F5 or Debug -> Start Debugging
Only use Build-> Build Solution
Do not use the IncrediBuild Build Interface.
IncrediBuild tasks are started from within CRY WAF itself.