Error when running GenerateProjectFiles.bat to building engine from source

Error when running GenerateProjectFiles.bat to building engine from source.

Setting up Unreal Engine 4 project files…
Binding IntelliSense data… 0%ERROR: Expecting to find a type to be declared in a module rules named ‘XInput’ in UE4Rules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null. This type must derive from the ‘ModuleRules’ type defined by Unreal Build Tool.

GenerateProjectFiles ERROR: UnrealBuildTool was unable to generate project files
.

Press any key to continue . . .

I downloaded the source from github release branch.

Hey devilhiyan-

Are you running on a Mac? If so you will need to run the .command file rather than the .bat. If you are not on a Mac, please make sure that you’ve ran Setup.bat first. Let me know if you still get this message after trying this.

Hey devilhiyan-

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will follow up.

Cheers