├── compile.sh ├── Dockerfile ├── LICENSE └── README.md /compile.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Delete old output, in case someone runs this script more than once. 4 | rm -rf output/ 5 | 6 | # Prepare a folder for the compilation results. 7 | mkdir -p output 8 | 9 | # Run the compilation process. 10 | docker run -ti --rm -v $PWD/output:/opt/ue4 -w /opt/ue4 connorlanigan/unrealengine-docker 11 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:latest 2 | 3 | MAINTAINER Connor Lanigan 4 | 5 | RUN apt-get update && apt-get install -y git sudo tzdata && rm -rf /var/lib/apt/lists/* 6 | 7 | CMD git clone --depth=1 https://github.com/EpicGames/UnrealEngine.git && \ 8 | cd UnrealEngine && \ 9 | apt-get update && \ 10 | ./Setup.sh && \ 11 | ./GenerateProjectFiles.sh && \ 12 | make && \ 13 | chmod 777 ../ # Allows the users on the outside to delete the folder 14 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Connor Lanigan 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Compiling Unreal Engine for Linux inside a Docker container 2 | 3 | The Linux version of the Unreal Engine is currently only available as source code (so there are no published binaries). You need to compile it on your machine, but it can be a pain to clean up all the build-related stuff afterwards. 4 | 5 | This project allows you to compile Unreal Engine on your local Linux machine without leaving all the build dependencies on your disk. The source is automatically downloaded and compiled in the `output/` directory. 6 | 7 | It follows the steps listed in [https://wiki.unrealengine.com/Building_On_Linux]. 8 | 9 | 10 | ## How to use it 11 | 12 | You need to have `docker` and `bash` installed. 13 | Then, run `compile.sh`. 14 | 15 | 16 | 17 | ## What this project DOES 18 | 19 | * download the Unreal Engine source code 20 | * install all needed dependencies 21 | * compile the engine (including the editor and other binaries) 22 | * delete the container afterwards 23 | 24 | 25 | ## What this project DOESN'T 26 | 27 | * get you authentication to the source code repository 28 | * clean up the source code or intermediate compilation files 29 | * delete the image from your machine 30 | 31 | You need to get access to the source code repository yourself. Usually, this can be achieved by getting an _Epic Games_ account and adding your Github username to your _Epic Games_ user profile. If you are using 2FA with Github, you need to create a [personal access token](https://github.com/settings/tokens) and use it in place of your password. 32 | 33 | After compilation, you will have lots of intermediate files in the `output/` directory. You need to decide for yourself which ones you want to keep and which ones you want to delete. The editor is run by executing `output/UnrealEngine/Engine/Binaries/Linux/UE4Editor`. 34 | 35 | If you are done with compiling, the docker image will still be stored on your machine. You can delete it by running `docker rmi connorlanigan/unrealengine && docker image prune`. 36 | --------------------------------------------------------------------------------