Hey, I had little issue here, so I am going to let you know it happens, even when there is workaround…
I downloaded source from GitHub release branch using zip package (currently, it is 4.12.5) and placed it on desktop and then renamed “UnrealEngine-release” to “Unreal Engine 4.12.5 Source”. If it is named like this then GenerateProjectFiles.command does not work and throws long error about mono and missing unrealheadertool. When I renamed it back it started working and now it works even when I rename folder back to “Unreal Engine 4.12.5 Source”.