I am currently using an offline installer to download the unreal engine source code for 5.3.2. The documentation says to run GenerateProjectFiles.bat, but no file exists in the directory ./Engine/Build/BatchFiles/. I have been trying to run the UnrealBuildTool instead from the command line, but I’m not sure what arguemenrs are needed to generate the UE5.sln project file.
Hello there @Wii_Have_Fun!
From what I could gather around the community, in order to generate the GenerateProjectFiles.bat to continue the offline installation, you need to run Setup.bat, which will generate this missing file. The detailed build process goes as follows:
Building Unreal Engine
There are two approaches that can be used for building the binaries for the engine:
- Building With Visual Studio - ( uses the Visual Studio IDE )
- Building An Installed Build - ( command line)
Both approaches will require that you have Visual Studio installed ( see above ).
If you are actively developing or changing Unreal Engine source code, and want to iterate quickly without distributing your changes - we recommend Building With Visual Studio.
If however, you want to distribute Unreal Engine to others, we recommend Building An Installed Build.
The two sections below outline the process for each method.
Building With Visual Studio
This approach uses the Visual Studio IDE to build the engine and it is the best approach for source code development work and debugging. It will allow you to iterate quickly.
Assuming you have cloned the engine code from GitHub - we are ready to build the Engine.
These steps can be found in the Readme of the EpicGames/UnrealEngine page on GitHub.
- Open your source folder in Windows Explorer and run Setup.bat. This will download binary content for the engine, install prerequisites, and set up Unreal file associations.
- On Windows 8, a warning from SmartScreen may appear. Click More info, then Run anyway to continue.
- A clean download of the engine binaries is currently 20-21 GB, which may take some time to complete. Subsequent runs will be much faster, as they only download new and updated content.
- Run GenerateProjectFiles.bat to create project files for the engine. It should take less than a minute to complete.
- Load the project into Visual Studio by double-clicking the new *.sln file named after the engine version ( e.g. for UE5 it is named UE5.sln ).
- In Visual Studio, set your solution configuration to "Development Editor " and your solution platform to “Win64”, then right click the UE* (where * is the engine version) target and select “Build”.
After compiling finishes, you can run the editor from Visual Studio by setting your startup project to same target you ran the build on (e.g. UE* - where * is the engine version ) and pressing F5 to start debugging.
***If you update your source files from GitHub ( by changing branches, or making a new fetch or pull ), you will need to repeat all the steps above - especially re-running the .bat files.
Building and Deploying An Installed Build
The docs have some good information about how to deploy a build to a team. There are lots of options, but I personally like making an “Installed Build”, which produces a standalone build of the editor very much like how Epic Games builds their installed builds available in the Epic Games Launcher, but which you can customize with your own code changes, and choose which platforms and options you want to include.
Assuming you have cloned the engine code from GitHub - we are ready to build the Engine.
- Open up a Command Prompt in Windows.
- At the command line, change your directory to your source folder then run the following commands in order:
Setup.bat
GenerateProjectFiles.bat
Engine\Build\BatchFiles\RunUAT.bat BuildGraph -target=“Make Installed Build Win64” -script=Engine/Build/InstalledEngineBuild.xml -clean -set:HostPlatformOnly=true -set:WithDDC=false
** Be sure to change the platform if you are compiling for Mac or Linux*
** There are many other options you can add to the build process - see the Using an Installed Build documentation.
***The build can take anywhere from 1 to 8 hours depending upon the cpu performance of your computer.
- When the build is complete, you can find the engine build in a folder called “LocalBuilds”:
- [Your source directory]\LocalBuilds\Engine\Windows\Engine
This build is fully portable and can be zipped up and shared. It does not require installation.
To be able to open existing projects using the newly installed build, you can right click on the project file and switch engine versions to the installed build version.
For more information on the topic, check out the following links
- Documentation:
You can read the full tutorial here: