Skip to content

AutoSDK Configuration

Universal Foundry supports Epic’s AutoSDK to install SDKs and tools on the build machines. AutoSDK is a tool to load files onto the agents in a place that UBT expects and for configuring the build environment.

There are two related, but distinct types of things AutoSDK handles:

  1. Tools - Getting tools that you need as part of your build process copied onto build agents so that you don’t have to put them into the main stream you use for development.
  2. Platform SDKs - Copying and then providing UBT with the location of target platform SDKs.

Build agents get both of these via a special perforce stream. This guide will walk you through configuring AutoSDK.

Set up a new stream in perforce to contain your SDKs. You might name it something like <yourgame>-autosdk.

Inside of that stream add a HostWin64 folder with subfolders for each platform you want to build. When you’re done, it should look something like this if, for example, you’re building Linux_x64 builds:

img

Set up virtual streams in Perforce that include only what you’d like installed on the agent. For most use cases, this will be just the HostWin64 folder for a Windows machine.

Go to the Settings page in the UF dashboard. Scroll down to “Horde AutoSDK Streams”. Click the edit button next to “Host Win64” and provide the stream you configured in the previous step. If you are using Linux hosts, also fill in that section.

Anything under HostWin64 will be loaded onto agents. You can access these in BuildGraph using the UE_SDKS_ROOT environment variable which will point at the directory containing HostWin64 such that HostWin64/SomeTool/Tool.exe will be located at <UE_SDKS_ROOT>/HostWin64/SomeTool/Tool.exe and can be invoked with <Spawn Exe="$(UE_SDKS_ROOT)\HostWin64\SomeTool\Tool.exe"/> from BuildGraph.

The directories inside of the target platform (Linux_x64 in the above example) should match the versions specified inside of Engine/Config/<platform>/<platform>_SDK.json. The way these are specified and handled by AutoSDK varies from platform to platform. Consult the source code and the Readme.md files inside of Engine/Extras/AutoSDK/HostWin64/<Target Platform> folder in Epic’s Github/P4.

You will want to set environment variables providing the path to the installed SDKs. This is done via Setup.bat and Unsetup.bat files. Example Setup.bat / Unsetup.bat files can be found in Epic’s Github/P4, for example: Engine/Extras/AutoSDK/HostWin64/Linux_x64/v16_clang/Setup.bat.

You can test that AutoSDK is configured properly by setting UE_SDKS_ROOT on your local machine to point at the directory on your local machine containing your HostWin64.