Because the build tools of UE4 works across platforms (Windows, Mac OS, Linux), steps in this article can be applied to Mac OS and Windows as well.
On Windows, You need to replace RunUAT.sh
with RunUAT.bat
though.
First, get Unreal Engine 4 sourcecode and export the following environment variables: