Documentation to compile UE4 in Windows

Added documentation to compile and patch the engine
in windows
This commit is contained in:
Daniel Santos-Olivan 2020-12-22 10:41:53 +01:00 committed by bernat
parent 36ce906d3b
commit 0c52d5b4c2
1 changed files with 27 additions and 2 deletions

View File

@ -94,10 +94,35 @@ Get the 2017 version from [here](https://developerinsider.co/download-visual-stu
### Unreal Engine
Go to [Unreal Engine](https://www.unrealengine.com/download) and download the _Epic Games Launcher_. In `Engine versions/Library`, download __Unreal Engine 4.24.x__. Make sure to run it in order to check that everything was properly installed.
Since CARLA 0.9.11, we have included some fixes to the engine that requires to modify it so it is no longer possible to use the Unreal Engine version provided by Epic Games Launcher. To build this modified version, we need to download the engine's code from source and then apply some patches that we provide. Be aware that to download the Unreal Engine's source code, you need to have a Github account linked to the Unreal's account. If you do not have it, please follow [this guide](https://www.unrealengine.com/en-US/ue4-on-github) before going any further.
* __1.__ Open a terminal, go to the folder in which you want to save Unreal Engine and, clone the 4.24 branch on your computer.
```cmd
git clone --depth=1 -b 4.24 https://github.com/EpicGames/UnrealEngine.git
```
!!! Note
Having VS2017 and UE4.24 installed, a __Generate Visual Studio project files__ option should appear when doing right-click on __.uproject__ files. If this is not available, something went wrong whith the UE4.24 installation. Create a UE project to check it out and reinstall if necessary.
Keep it as close as `C://` as you can because if the path exceeds certain longitude __Setup.bat__ will return errors in step __3__.
* __2.__ Inside the engine's source folder, we need to download our patch and apply it.
```cmd
cd UnrealEngine
powershell -Command "(New-Object System.Net.WebClient).DownloadFile('https://carla-releases.s3.eu-west-3.amazonaws.com/Backup/UE4_patch_wheels.patch', 'UE4_patch_wheels.patch')"
git apply UE4_patch_wheels.patch
```
* __3.__ Run the configuration scripts.
```cmd
Setup.bat
GenerateProjectFiles.bat
```
* __4.__ Now, we need to compile the engine. Open the __UE4.sln__ file inside the source folder with Visual Studio (Epic recommends 2017 or 2019 versions). Make sure that in the build bar, it is selected the 'Development Editor', 'Win64' and, 'UnrealBuildTool' options. Check [this guide](https://docs.unrealengine.com/en-US/ProductionPipelines/DevelopmentSetup/BuildingUnrealEngine/index.html) if you need any help. Then, in the solution explorer, right-click in __UE4__ and select __Build__.
* __5.__ Once the solution is compiled you can open the engine to check that everything was correct launching the executable `Engine\Binaries\Win64\UE4Editor.exe`.
!!! Note
If the installation was successful, this should be recognoized by the Unreal Engine's version selector and when you use __Switch Unreal Engine version__ when right-clicking on __.uproject__ files, it should appear as __Source Build at PATH__ where PATH is the installation path that you have chosen. If you can not see this selector or the __Generate Visual Studio project files__ when you right-click on __.uproject__ files, something went wrong with the UE4 installation and probably you need to reinstall it correctly.
---
## CARLA build