Skip to content

Instantly share code, notes, and snippets.

@geekrelief
Created January 26, 2026 02:05
Show Gist options
  • Select an option

  • Save geekrelief/6b8ed9cc468e60892bcdeeb06dbd1fef to your computer and use it in GitHub Desktop.

Select an option

Save geekrelief/6b8ed9cc468e60892bcdeeb06dbd1fef to your computer and use it in GitHub Desktop.
Unreal Source clone and setup for Windows
@echo off
setlocal
:: --- USAGE INSTRUCTIONS ---
if "%~1"=="" goto :usage
if "%~2"=="" goto :usage
set "FolderName=%~1"
set "ForkUrl=%~2"
:: Initialize counters
set /a CurrentStep=1
set /a TotalSteps=9
echo [%CurrentStep%/%TotalSteps%] Cloning Unreal Engine...
git clone --depth 1 --single-branch --branch ue5-main --shallow-submodules https://github.com/EpicGames/UnrealEngine.git "%FolderName%"
if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL%
cd "%FolderName%"
set "EngineRoot=%CD%"
set /a CurrentStep+=1
echo [%CurrentStep%/%TotalSteps%] Downloading Dependencies (Setup.bat)...
call Setup.bat --threads=10
set /a CurrentStep+=1
echo [%CurrentStep%/%TotalSteps%] Generating Project Files...
call GenerateProjectFiles.bat
set /a CurrentStep+=1
echo [%CurrentStep%/%TotalSteps%] Building Development Editor and ShaderCompileWorker...
call .\Engine\Build\BatchFiles\Build.bat -Target="UnrealEditor Win64 Development" -Target="ShaderCompileWorker Win64 Development -Quiet" -WaitMutex -FromMsBuild -architecture=x64
set /a CurrentStep+=1
echo [%CurrentStep%/%TotalSteps%] Building Debug Editor...
call .\Engine\Build\BatchFiles\Build.bat UnrealEditor Win64 Debug -WaitMutex
set /a CurrentStep+=1
echo [%CurrentStep%/%TotalSteps%] Building CrashReportClient (Shipping)...
call .\Engine\Build\BatchFiles\Build.bat CrashReportClient Win64 Shipping -WaitMutex
set /a CurrentStep+=1
echo [%CurrentStep%/%TotalSteps%] Building CrashReportClientEditor (Development)...
call .\Engine\Build\BatchFiles\Build.bat CrashReportClientEditor Win64 Development -WaitMutex
set /a CurrentStep+=1
echo [%CurrentStep%/%TotalSteps%] Building UnrealInsights (Shipping)...
call .\Engine\Build\BatchFiles\Build.bat UnrealInsights Win64 Shipping -WaitMutex
set /a CurrentStep+=1
echo [%CurrentStep%/%TotalSteps%] Applying InstalledBuild (Rocket) Hack...
if not exist "Engine\Build" mkdir Engine\Build
echo. > Engine\Build\InstalledBuild.txt
set /a CurrentStep+=1
echo.
echo ====================================================
echo SETUP COMPLETE!
echo ====================================================
echo.
echo Binary Locations:
echo - Development: %EngineRoot%\Engine\Binaries\Win64\UnrealEditor.exe
echo - Debug: %EngineRoot%\Engine\Binaries\Win64\UnrealEditor-Win64-Debug.exe
echo.
echo Launching Unreal Editor...
start "" "%EngineRoot%\Engine\Binaries\Win64\UnrealEditor.exe"
exit /b
:usage
echo ====================================================
echo ERROR: Missing Parameters
echo ====================================================
echo Usage: %~nx0 [FolderName] [ForkURL]
echo.
echo Example:
echo %~nx0 MyEngine https://github.com/User/UnrealEngine.git
echo ====================================================
pause
exit /b
:exit
echo Setup finished.
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment