Skip to content

Instantly share code, notes, and snippets.

@Solessfir
Created July 29, 2026 19:09
Show Gist options
  • Select an option

  • Save Solessfir/5b38cbb80d684b64746c3c02814234d2 to your computer and use it in GitHub Desktop.

Select an option

Save Solessfir/5b38cbb80d684b64746c3c02814234d2 to your computer and use it in GitHub Desktop.
Script that automates building an Installed Build (Rocket build) of Unreal Engine from source via BuildGraph/RunUAT.
:: Copyright (c) Solessfir under MIT license
:: Builds an Installed Build (Rocket build) of Unreal Engine.
:: Place next to Engine\ folder (engine root, e.g. fresh git clone) and run.
@echo off
setlocal EnableDelayedExpansion
title Make Installed Engine
:: Enable ANSI color support
reg add HKCU\Console /v VirtualTerminalLevel /t REG_DWORD /d 1 /f >nul 2>&1
for /f "delims=" %%a in ('powershell -NoProfile -Command "[char]27"') do set "ESC=%%a"
set "Colors_Red=!ESC![91m"
set "Colors_Green=!ESC![92m"
set "Colors_White=!ESC![97m"
set "Colors_Yellow=!ESC![93m"
set "Colors_Reset=!ESC![0m"
set "EngineDir=%~dp0"
set "EngineDir=%EngineDir:~0,-1%"
:: Defaults
set "SkipSetup=0"
set "WithDDC=true"
set "WithFullDebugInfo=true"
set "DoClean=true"
set "ExtraArgs="
:: --- Parse args ---
:ParseArgs
if "%~1"=="" goto ArgsDone
if /i "%~1"=="-h" goto ShowHelp
if /i "%~1"=="-help" goto ShowHelp
if /i "%~1"=="/?" goto ShowHelp
if /i "%~1"=="-SkipSetup" (set "SkipSetup=1" & shift & goto ParseArgs)
if /i "%~1"=="-NoDDC" (set "WithDDC=false" & shift & goto ParseArgs)
if /i "%~1"=="-NoFullDebugInfo" (set "WithFullDebugInfo=false" & shift & goto ParseArgs)
if /i "%~1"=="-NoClean" (set "DoClean=false" & shift & goto ParseArgs)
if /i "%~1"=="--" (shift & goto CollectExtra)
set "ExtraArgs=!ExtraArgs! %1"
shift
goto ParseArgs
:CollectExtra
if "%~1"=="" goto ArgsDone
set "ExtraArgs=!ExtraArgs! %1"
shift
goto CollectExtra
:ArgsDone
:: --- Help ---
goto SkipHelp
:ShowHelp
echo !Colors_Green!:: Make Installed Engine (Win64) ::!Colors_Reset!
echo Run from engine root (folder containing Engine\), fresh git clone works as-is.
echo:
echo Usage: MakeInstalledEngine.bat [options] [-- extra BuildGraph args]
echo:
echo !Colors_White!Script options:!Colors_Reset!
echo -h, -help Show this help and exit.
echo -SkipSetup Skip Setup.bat (use if you already ran it / modified engine locally
echo and don't want to re-pull binary deps).
echo -NoDDC Disable -set:WithDDC=true (default: DDC built into installed build).
echo -NoFullDebugInfo Disable -set:WithFullDebugInfo=true (default: on, needed for PDBs).
echo -NoClean Skip -Clean (default: clean build).
echo:
echo !Colors_White!Default params used (Win64):!Colors_Reset!
echo -Script=Engine/Build/InstalledEngineBuild.xml
echo -Target="Make Installed Build Win64"
echo -set:HostPlatformOnly=true (build for host platform only, not all platforms)
echo -set:WithFullDebugInfo=true (generate PDBs, needed to debug the installed build)
echo -set:WithDDC=true (bake DerivedDataCache into the build, bigger/slower but offline-ready)
echo -Clean (wipe intermediate/staging before building)
echo:
echo !Colors_White!Other BuildGraph params you may want (pass after --):!Colors_Reset!
echo -set:WithClient=true Include client target in the installed build.
echo -set:WithServer=true Include server target.
echo -set:WithWin64=false Drop Win64 platform support from the build.
echo -set:WithLinux=true Add Linux as a target platform (cross-compile, needs toolchain).
echo -set:WithAndroid=true Add Android platform support.
echo -set:WithIOS=true Add iOS platform support.
echo -set:GameConfigurations=... Comma list, e.g. Development;Shipping.
echo -set:AnalyticsTypeOverride= Override analytics id baked into the build.
echo -ListOnly List all options this branch's XML supports, don't build.
echo:
echo Ref: https://dev.epicgames.com/documentation/unreal-engine/buildgraph-for-unreal-engine
echo:
echo Example: MakeInstalledEngine.bat -SkipSetup -- -set:WithServer=true
goto ExitClean
:SkipHelp
cls
echo !Colors_Green!:: Making Installed Engine ::!Colors_Reset!
echo Engine root: !Colors_White!%EngineDir%!Colors_Reset!
if not exist "%EngineDir%\Engine\Build\BatchFiles\RunUAT.bat" (
echo !Colors_Red!Error: RunUAT.bat not found. Run this script from the engine root ^(next to Engine\^).!Colors_Reset!
goto ExitWithPause
)
:: Report engine version (also confirms 4.27 / 5.x both work, target names unchanged since 4.20)
set "EngineVersion="
if exist "%EngineDir%\Engine\Build\Build.version" (
for /f "delims=" %%a in ('powershell -NoProfile -Command "(Get-Content '%EngineDir%\Engine\Build\Build.version' | ConvertFrom-Json) | ForEach-Object { \"$($_.MajorVersion).$($_.MinorVersion).$($_.PatchVersion)\" }"') do set "EngineVersion=%%a"
)
if defined EngineVersion echo Version: !Colors_White!%EngineVersion%!Colors_Reset!
:: --- Setup.bat ---
if "%SkipSetup%"=="1" (
echo !Colors_Yellow!Skipping Setup.bat as requested.!Colors_Reset!
) else (
if exist "%EngineDir%\Setup.bat" (
echo:
echo Running Setup.bat ^(pulls binary deps, can take a while^)...
call "%EngineDir%\Setup.bat"
if !errorlevel! neq 0 (
echo !Colors_Red!Error: Setup.bat failed.!Colors_Reset!
goto ExitWithPause
)
) else (
echo !Colors_Yellow!Warning: Setup.bat not found, skipping.!Colors_Reset!
)
)
:: --- Check for PDBCopy (Windows SDK Debugging Tools) if full debug info requested ---
if "%WithFullDebugInfo%"=="true" (
where pdbcopy.exe >nul 2>&1
if !errorlevel! neq 0 (
echo !Colors_Yellow!Warning: pdbcopy.exe not found on PATH. Installed Build symbol stripping needs it.!Colors_Reset!
echo !Colors_Yellow!Install "Debugging Tools for Windows" from the Windows SDK installer if PDB staging fails.!Colors_Reset!
echo !Colors_Yellow!Download: https://developer.microsoft.com/windows/downloads/windows-sdk/!Colors_Reset!
echo !Colors_Yellow!Via Winget: winget install --id Microsoft.WindowsSDK.10.0.26100 --interactive!Colors_Reset!
)
)
:: --- Build ---
set "CleanArg="
if "%DoClean%"=="true" set "CleanArg=-Clean"
echo:
echo Starting BuildGraph...
echo:
call "%EngineDir%\Engine\Build\BatchFiles\RunUAT.bat" BuildGraph ^
-Script=Engine/Build/InstalledEngineBuild.xml ^
-Target="Make Installed Build Win64" ^
-set:HostPlatformOnly=true ^
-set:WithFullDebugInfo=%WithFullDebugInfo% ^
-set:WithDDC=%WithDDC% ^
%CleanArg% ^
!ExtraArgs!
set "BuildResult=!errorlevel!"
echo:
if !BuildResult! neq 0 (
echo !Colors_Red!Build Failed. Check log above.!Colors_Reset!
) else (
echo !Colors_Green!Build Successful.!Colors_Reset!
echo Output: !Colors_White!%EngineDir%\LocalBuilds\Engine!Colors_Reset!
)
:ExitWithPause
pause
exit /b
:ExitClean
exit /b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment