Menu
Lumberyard
User Guide (Version 1.13)

Creating Minimal Release Builds

You can create a minimal release build of your game for PC. This means that this standalone release build does not require Asset Processor, Lumberyard, Lumberyard Editor, or any other specific modules to run.

The following procedure references the Samples Project. You can customize the procedure to your own project as needed.

Prerequisites

Before you start, build your game project. See Building Your Game Project.

To create a minimal release build

  1. Create the root release build directory and build the paks

    From the lumberyard_version\dev directory, run BuildSamplesProject_Paks_PC.bat. This generates a \samplesproject_pc_paks directory that includes the files required to run your game, excluding shaders and executables.

    If you are not in the Samples Project, edit the file and modify the paths it references. You can also change the file name as needed.

    The following example shows the part of the BuildSamplesProject_Paks_PC.bat that you can customize. The /gamefolder= parameter references the directory name of your project. The /game= parameter specifies the directory name that will be created when you run this batch file.

    ... echo ----- Processing Assets Using Asset Processor Batch ---- .\%BINFOLDER%\AssetProcessorBatch.exe /gamefolder=SamplesProject /platforms=pc IF ERRORLEVEL 1 GOTO AssetProcessingFailed echo ----- Creating Packages ---- rem lowercase is intentional, since cache folders are lowercase on some platforms .\%BINFOLDER%\rc\rc.exe /job=%BINFOLDER%\rc\RCJob_Generic_MakePaks.xml /p=pc /game=samplesproject IF ERRORLEVEL 1 GOTO RCFailed ...
  2. Build and pack the shaders

    1. To build the shaders, do one of the following:

      • If you run a shader compiler server, retrieve the shader list file from the server's file system. This file is typically named ShaderList_Platform.txt. Copy this file to the lumberyard_version\dev directory.

      • If you do not run a shader compiler server, open Lumberyard Editor and open each of the levels that you want to ship. In each level, navigate through the entire map in game mode until all the shaders are generated. Then close Lumberyard Editor. You can skip this step if all the shaders in the level are already generated.

    2. To pack the shaders, open a command line and navigate to the lumberyard_version\dev directory, and then do one of the following:

      • If you run a shader compiler server and copied a shader list in the previous step, type the following command:

        BuildShaderPak_DX11.bat ShaderList_Platform.txt

      • If you generated shaders by navigating the levels in Lumberyard, type the following command:

        BuildShaderPak_DX11.bat

      If you are not in the Samples Project, customize the BuildShaderPak_DX11.bat file before you run it. To do this, edit the highlighted parameter in the following example.

      ... set SOURCESHADERLIST=%1 set GAMENAME=SamplesProject set DESTSHADERFOLDER=Cache\%GAMENAME%\PC\user\Cache\Shaders ...
    3. The batch file output specifies where the packed shaders are located, such as the \Build\pc\SamplesProject directory. Copy the resulting .pak files and then move them to the \samplesproject_pc_packs\samplesproject directory with the rest of the .pak files.

  3. Compile the release version of the game and engine, and then copy the binaries into the release directory. To do this, do the following:

    1. To build game_and_engine in release mode, navigate to the lumberyard_version\dev directory and type the following command:

      lmbr_waf build_win_x64_vs2015_release -p game_and_engine

      This creates a Bin64<vc120_or_vc140>.Release directory within lumberyard_version\dev and places your game binaries in it.

    2. Copy the Bin64<vc120_or_vc140>.Release directory to the samplesproject_pc_paks directory, so that it has its own Bin64<vc120_or_vc140>.Release directory. Optionally, rename this directory.

    3. In the Bin64<vc120_or_vc140>.Release directory (or renamed directory), remove all but the following files. These are the only files that you need for a minimal release build for PC.

      • Your game executable file, which is named project_nameLauncher.exe. For example, SamplesProjectLauncher.exe.

      • d3dcomiler_47.dll

      • (Optional) dbghelp.dll (without which call stacks are not available if dumping crashes)

      You should have a directory structure like the following example:

      \samplesproject_pc_paks (contains bootstrap.cfg) \Bin64<vc120_or_vc140>.Release \SamplesProjectLauncher.exe (your game executable) \d3dcompiler_47.dll \dbghelp.dll \samplesproject (pak files) \config \editor.xml \game.xml \gems \gem.pak \levels (level directories and files)
  4. If your game does not have a menu system or UI (this is common during development), then you can use the following steps to create a batch file that launches a specific level.

    1. Create a batch file in the root of your release directory, such as in samplesproject_pc_paks. You can specify any name, such as LaunchMyLevel.bat.

    2. Edit the batch file and type the following code, customizing as needed:

      start release_directory\launcher_executable_name +map level_name

      The following example shows the contents of a launch.bat file for launching the Fur Technical Sample within the Samples Project. In this example, the batch file is placed in the root of the game directory. Its code navigates to the Bin64<vc120_or_vc140>.Release directory, launches SamplesProjectLauncher.exe, and then loads the level fur_technical_sample.

      start Bin64<vc120_or_vc140>.Release\SamplesProjectLauncher +map fur_technical_sample

    Note

    If the build does not run, see the dev.log, user.log, log.log, or game.log files for more information.

Your game is now ready to ship as a standalone PC release build.

Using Visual Studio

To run the release build from Visual Studio using the above method, you must change some of the debugging properties of the launcher project. Specifically, you must make the following changes, using Samples Project as an example:

  • Change command to: engine_install_location/samplesproject_pc_paks/Bin64<vc120_or_vc140>/SamplesProjectLauncher.exe

  • Change Command Arguments to: +map (MAPNAME)

  • Change Working Directory to: engine_install_location/samplesproject_pc_paks/Bin64<vc120_or_vc140>/

On this page: