Unreal Engine Installation

Hi I’m having a doubt regarding installation. Previously I was using the unreal engine 4.9 source code. Two days back I’ve formatted my PC and every software I’ve installed is gone. After formatting I’ve installed perforce and I got the 4.9 source code and my current working project from the server. The problem is in my project .uproject file I cannot able to generate visual studio files because I didnt install the unreal engine by launcher. Do I need to install the engine by the launcher and to use the source code or the source code itself is enough please help me regarding installation.

Thanks&Regards
Programmer