Lumberyard
User Guide (Version 1.16)

Waf Spec Files (*.json)

You use Waf spec files to specify which modules to include in a build configuration. All settings are mandatory if not explicitly stated otherwise.

A typical spec includes all modules that are required to build a game project. Lumberyard includes the following with the engine SDK:

  • game_and_engine.json – Specs to build the sample game and engine

  • resource_compiler.json – Specs to build the Resource Compiler

  • pipeline.json – Specs to build the pipeline tools

  • all.json – Specs to build all projects

The following is an example *.json file that illustrates a spec file layout:

{ "description" : "Configuration to build the my game", "visual_studio_name" : "My Game", "comment" : "This is meant to only compile tools on Windows.", "disable_game_projects" : true, "platforms" : ["win"], "configurations" : ["debug","profile"], "modules" : [ "AzCore", "AzFramework", "AzToolsFramework", "GridMate", "LuaIDE", "Profiler" ] }

Note

The disable_game_projects keyword does not compile the games specified in the project.json file. The default value is false, which means the specs compile the game projects by default.

Platform-specific Entry Values

You can apply the entry values in the table to targeted platforms and/or configurations. For example, a spec can build specific modules for win_x64 or a spec can build different modules in certain configurations.

  • modules – Includes in the build all modules defined by this key, regardless of platform and configuration.

  • win_x64_modules – Includes in the win_64 build all modules defined by this key, regardless of configuration.

Overlapping lists are combined into a single list based on the build command.

Spec File Format Specification

The general format of the JSON-based spec file is a dictionary of keyword values. The following table lists the possible keywords and their description.

Keyword Value Description
comment Additional comments to add to the spec file.
configurations The list of configurations that this spec supports. In other words, the spec only builds the modules listed in the spec if the current configuration exists in the list of configurations. This is an AND condition with the platforms value.
description Description of the spec file.
disable_game_projects Flag that indicates that no game projects (as defined in project.json) are included in the build for this spec.
platforms The list of platforms that this spec supports. In other words, the spec only builds the modules listed in the spec if the current target platform exists in this list of platforms.
platform_configuration_defines
  • platform and configuration are optional values.

  • Possible values for platform and configuration can be determined from the waf_branch_spec.py file.

  • The build uses the entry that matches the combination of these values and the build command.

visual_studio_name Name of the generated Visual Studio solution that is used to distinguish this build spec from a build configuration.