In the engine source /Engine/Build/BatchFiles/GenerateProjectFiles.bat attempts to detect if it is running within a Visual Studio Environment Shell like so:
if not “%INCLUDE%” == “” if not “%LIB%” == “” goto ReadyToCompile
However, INCLUDE and LIB are not Visual Studio specific environment variables, and if you, like me, have some paths in those variables then GenerateProjectFiles.bat errors out like so:
‘msbuild’ is not recognized as an internal or external command.
That’s because it skipped calling vcvarsx86_amd64.bat.
After I commented out the INCLUDE/LIB check project generation started working as expected.
I should note that when I opened the generated solution in Visual Studio and started the build one of the build tasks logged an error about %LIB% not being a valid path. My LIB environment variable is currently set to:
C:\Program Files\PellesC\Lib;C:\Program Files\PellesC\Lib\Win;%LIB%
Regardless it seems to have generated a working build of the engine.