Compiling dedicated server without source build?

Hi there,

I know this was a problem in the past, but I’ve been testing lately to see if it’s finally been solved.

I’m bypassing the Visual Studio build configuration drop-down list to try to build my project as a dedicated server.

"L:\Programs\Epic Games\4.12\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -project="%CD%\RTGProto.uproject" -noP4 -platform=Win64 -clientconfig=Development -serverconfig=Development -cook -server -serverplatform=Win64 -noclient -build -stage -pak -archive -archivedirectory="%CD%\Staging"

The above is the .bat file I have sitting next to be RTGProto project. I’ve also added an RTGProtoServer.target.cs file to my Source folder, and have confirmed that it is being used.

The problem now is that any #include of something like Engine.h will lead to including other modules/files that are not known to the server, i.e. InputCore, as per the following error that I get back from UAT/UBT when I use the above .bat file:

-------------------------------------------------------------------------------
Initializing...
--------------------Project: Env_0---------------------------------------------
** For RTGProtoServer-Win64-Development
PCH.UELinkerFixupsName.h.cpp
UELinkerFixups.cpp
PCH.SpaceServer.h.cpp
l:\programs\epic games\4.12\engine\source\runtime\inputcore\public\../Classes/InputCoreTypes.h(5): fatal error C1083: Cannot open include file: 'InputCoreTypes.generated.h': No such file or directory

Error executing C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\cl.exe (tool returned code: 2)
PCH.RTGProto.h.cpp
l:\programs\epic games\4.12\engine\source\runtime\inputcore\public\../Classes/InputCoreTypes.h(5): fatal error C1083: Cannot open include file: 'InputCoreTypes.generated.h': No such file or directory

Error executing C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\cl.exe (tool returned code: 2)

Removing anything that includes Engine.h fixes this, but of course I include it in other places for UObject subclasses etc.

Having to lug a full build of the engine source around to every computer I develop on would be a major pain in the ■■■. Is there some way to side-step having to do this?

Thanks!

Get same compile error in 4.13,
I am using command line:

"D:/UnrealEngine/Epic Games/4.13/Engine/Build/BatchFiles/RunUAT.bat" BuildCookRun -verbose         -project="D:/workspace/UE4_project/DedicatedServerTest/DedicatedServerTest.uproject"                -noP4 -platform=Win64                -clientconfig=Development -serverconfig=Development                -cook -server -serverplatform=Win64 -noclient -build -stage                -pak -archive -archivedirectory="D:/workspace/UE4_project/DedicatedServerTest_ci_build/Win64/master/7/Development"