This topic explains how to add a new project to the WAF build system.
A project can be seen as the root target of your game. It describes the most basic information such as the executable name and the code folder for that your game code is located in.
Once you have created a project, you can target it from Spec Files which allow you to configure your project to be compatible with various platforms and project configurations.
We will create a simple game project with the following parameters:
Project Name: | "MyFirstProject" |
---|---|
Executable Name: | MyFirstProject |
Product Name: | My Company © |
Code Folder: | Code/MyFirstProject |
Data Folder: | MyGameData |
As a first step you will need to locate the WAF Project File (projects.json) which is located in <SDK_ROOT_DIR>/__WAF__/projects.json.
Once opened for edit, you will need to populate the file as follow using the JSON format.
{
"MyFirstProject" :
{
"executable_name" : "MyFirstProject",
"product_name" : "My Company ©",
"code_folder" : "Code/MyFirstProject",
"game_data_dir" : "MyGameData"
},
"Next Project":
{
...
},
...
}
The executable_name is the name of the final output file that is written to the output directory of the platform you have targeted during the build process e.g. <SDK_ROOT_DIR>/Bin64.
The product_name is encoded into the executable. On Windows right click on the executable -> Properties -> Details .
The code_folder defines where your game code is located. WAF will automatically parse this directory looking for WAF Module Files (wscript).
The game_data defines where your game assets are located.
WAF allows you to have multiple projects in the same solution. Hence your game projects can share the CRYENGINE code but use different game code and/or assets.
Once you have added the information you can target the project from spec files. See WAF Adding a Spec on how to add a spec to your project.