Announcement

Collapse
No announcement yet.

How to create Rocket build that can deploy Dedicated Server of game?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Hi there ryanjon2040
    this seems to be broken in 4.19 saying EnableSymStore is unknown. Exit Error 1., Any idea how to fix this? perhaps the keyword is deprecated?

    Using older version of InstalledBuilds.xml however gives me different error
    ERROR: C:\Users\User\Documents\GitHub\AmmoboxUnrealEngine\Engine\Build\InstalledEngineBuild.xml(104): The 'FromDir' attribute is not declared.
    Last edited by Frozenfire; 04-24-2018, 01:55 AM.
    Developer at AmmoboxStudios.



    Eximius ( An FPS/RTS Hybrid )

    Comment


      #17
      Hi Frozenfire That keyword has been deprecated. You have to use -set:EmbedSrcSrvInfo=true or false now.

      Creating dedicated server supported rocket no longer seems possible with these changes in this thread. I've tried to build, but server/client targets are no longer included despite the modified InstalledEngineBuild.xml. There is a new xml file called BuildEditorAndTools.xml in \Engine\Build\Graph\Examples folder that supports UE4Server and UE4Client.
      Unreal Issue Tracker - Desktop App for Unreal Engine Issues
      Unreal Nexus - Create Share and Experience!

      Unreal Engine 4 World-Wide User Map

      [PLUGIN] Aws Gamelift Client Plugin
      [TOOL] Create your own binary release of UE4 from GitHub source
      [Marketplace] Vehicle Soccer Template
      [Marketplace] Objective Waypoint System
      My UE4 Tutorials and Misc Tools

      Lead Programmer at YetiTech Studios
      Your Friendly Neighborhood
      Satheesh PV (a.k.a RyanJon2040) | Twitter, Instagram, Facebook, LinkedIn, YouTube, Google+

      Comment


        #18
        Hey folks!

        Sorry to necromance this thread, but I really need help getting the Server Target to work for my built binaries.
        At first I was building the dedicated server for my game with the Built from Source version of the Unreal Engine (4.20.3), and it works. Now I am trying to get a Local Built I can distribute inhouse, so everyone can built the Server Target, but does not need to built the engine him-/herself.
        I followed all the instructions of the previous posts here and my Local Build actually has the "Development Server" Target. But when I try to use it I get the following error:

        UnrealBuildTool : error : Couldn't find target rules file for target 'UE4Server' in rules assembly 'UE4Rules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
        2> Location: E:\Projects\UnrealEngineGit\LocalBuilds\Engine\Windows\Engine\Intermediate\Build\BuildRules\UE4Rules.dll
        2> Target rules found:
        2>
        2> (see ../Programs/UnrealBuildTool/Log.txt for full exception trace)


        The "Development Game" Target seems to work withouth problems.
        I attached my InstalledEngineBuild.xml file, but I didn't change anything besides the recommended changes for the Server Target. I even looked at the diff of ryanjon2040s file and mine.
        This is the command I am using to start the UAT Build:

        ./RunUAT.bat BuildGraph -target="Make Installed Build Win64" -script="Engine/Build/InstalledEngineBuild.xml" -set:WithMac=false -set:WithAndroid=false -set:WithIOS=false -set:WithTVOS=false -set:WithLinux=false -set:WithHTML5=false -set:WithLumin=false -set:WithDDC=false -set:WithWin32=false


        Anyone here had the same problem? Do I have to do something since UE 4.20.3 that I didn't hear of yet?
        Looking forward to your help!

        Kind Regards,
        Stefan
        Attached Files

        Comment


          #19
          Only after posting I saw the comments here on Page 2 and tried the BuildEditorAndTools.xml file for building with BuildGraph. This has different problems as I described in my AnswersHub Question over here. https://answers.unrealengine.com/que...0279/view.html
          I hope someone can help me.

          Comment


            #20
            Bump.

            ryanjon2040 Frozenfire did you ever get a running build with BuildEditorAndTools.xml?

            Comment


              #21
              spreiste With the recent changes I am not sure how we can build binary version with Dedicated Server and Client support. I modified the InstalledEngineBuild.xml (which I'm sharing here) to add support for server/client targets and it did build the Engine but the problem was not being able to package the game in server target.

              For the target rules not found error, the fix is easy. Simply copy UE4Server.Target.cs from your Github source (Engine\Source directory) to your binary build (Engine\Source directory).

              PS: I posted a new thread requesting this feature here: https://forums.unrealengine.com/unre...client-support

              PPS: The InstalledEngineBuild.xml I'm sharing here only supports Win64 and Win32. I've stripped out all other platforms.

              PPPS: You can check out this tool for creating binary UE4: https://forums.unrealengine.com/deve...-for-your-team
              Attached Files
              Unreal Issue Tracker - Desktop App for Unreal Engine Issues
              Unreal Nexus - Create Share and Experience!

              Unreal Engine 4 World-Wide User Map

              [PLUGIN] Aws Gamelift Client Plugin
              [TOOL] Create your own binary release of UE4 from GitHub source
              [Marketplace] Vehicle Soccer Template
              [Marketplace] Objective Waypoint System
              My UE4 Tutorials and Misc Tools

              Lead Programmer at YetiTech Studios
              Your Friendly Neighborhood
              Satheesh PV (a.k.a RyanJon2040) | Twitter, Instagram, Facebook, LinkedIn, YouTube, Google+

              Comment


                #22
                Thank you so much ryanjon2040! I actually have an IEB now that can build Server Targets! I was just missing the "UE4Server.Target.cs" in the Engine folder.:/

                I also glanced over your InstalledEngineBuild.xml and didn't find the earlier mentioned <Tag> for the generated Server Includes. (Also not for the default Game one.)
                Is this no longer needed?

                HTML Code:
                 <!-- Tag the generated includes for this target -->
                <!-- This one is already in the default InstalledEngineBuild.xml-->
                <Tag Files="Engine/Intermediate/Build/Win64/UE4/Inc/...;Engine/Plugins/.../Intermediate/Build/Win64/UE4/Inc/..." With="#UE4Game Win64 Includes"/>
                <!-- This one is added for Server Target-->
                <Tag Files="Engine/Intermediate/Build/Win64/UE4Server/Inc/...;Engine/Plugins/.../Intermediate/Build/Win64/UE4Server/Inc/..." With="#UE4Game Win64 Includes"/>
                And if they are needed, would I have to add a UE4Client one aswell?

                Comment


                  #23
                  So, after some tinkering I now have an inhouse distributed engine build, which works for building and packaging both Server and Client Targets. I also added an option to allow for a custom output directory.
                  I only altered the default InstalledEngineBuild.xml a little bit by adding the UE4Server and UE4Client targets as follows:

                  HTML Code:
                  <!-- Ouput directory for the build. This was ADDED to the xml -->
                  <Option Name="BuiltDirectory" DefaultValue="$(RootDir)/LocalBuilds/Engine/" Description="Directory for outputting the built engine"/>
                  
                  <!-- The local output directory. These were EDITED in the xml -->
                  <Property Name="LocalInstalledDir" Value="$(BuiltDirectory)/Engine/Windows"/>
                  <Property Name="LocalInstalledDirMac" Value="$(BuiltDirectory)/Engine/Mac"/>
                  <Property Name="LocalInstalledDirLinux" Value="$(BuiltDirectory)/Engine/Linux"/>
                  Later in the Target Platform Node I added:

                  HTML Code:
                  <ForEach Name="Configuration" Values="$(GameConfigurations)">
                  <Compile Target="UE4Game" Platform="Win64" Configuration="$(Configuration)" Tag="#UE4Game Win64" Arguments="-precompile $(VSCompilerArg) $(TargetDebugInfoArg)"/>
                  <Compile Target="UE4Server" Platform="Win64" Configuration="$(Configuration)" Tag="#UE4Game Win64" Arguments="-precompile $(VSCompilerArg) $(TargetDebugInfoArg)"/>
                  <Compile Target="UE4Client" Platform="Win64" Configuration="$(Configuration)" Tag="#UE4Game Win64" Arguments="-precompile $(VSCompilerArg) $(TargetDebugInfoArg)"/>
                  </ForEach>
                  
                  <!-- Some other stuff -->
                  
                  <!-- Tag the generated includes for this target -->
                  <Tag Files="Engine/Intermediate/Build/Win64/UE4/Inc/...;Engine/Plugins/.../Intermediate/Build/Win64/UE4/Inc/..." With="#UE4Game Win64 Includes"/>
                  <Tag Files="Engine/Intermediate/Build/Win64/UE4Server/Inc/...;Engine/Plugins/.../Intermediate/Build/Win64/UE4Server/Inc/..." With="#UE4Game Win64 Includes"/>
                  <Tag Files="Engine/Intermediate/Build/Win64/UE4Client/Inc/...;Engine/Plugins/.../Intermediate/Build/Win64/UE4Client/Inc/..." With="#UE4Game Win64 Includes"/>
                  Then I built the Engine from Commandline using this command:
                  Code:
                  ./RunUAT.bat BuildGraph -target="Make Installed Build Win64" -script="Engine/Build/InstalledEngineBuild.xml" -set:WithMac=false -set:WithAndroid=false -set:WithIOS=false -set:WithTVOS=false -set:WithLinux=false -set:WithHTML5=false -set:WithLumin=false -set:WithDDC=false -set:WithWin32=false -set:BuiltDirectory="PathToOutputDirectory"
                  As ryanjon2040 mentioned you then have to copy over the UE4Server.Target.cs and UE4Client.Target.cs to your resulting Engine/Source/ folder.
                  (Also add the corresponding targets to your Project/Source/ folder.)

                  For packaging I use the BuildCookRun from commandline as follows:
                  Code:
                  ./RunUAT.bat BuildCookRun -project="FullPathToProjectfile.uproject" -noP4 -platform=Win64 -clientconfig=Development -serverconfig=Development -cook -allmaps -server -client -serverplatform=Win64 -stage -pak -archive -archivedirectory="FullPathToOutputDirectory"
                  I think that was all I did. Of course you have to edit your Project with the UnrealVersionSelector to use the resulting Engine Binary. (Start UE4Editor.exe once so it can set the correct registry keys and is visible in the Version Selector)

                  Some other tips:
                  1. To get your dedicated server to run with an anonymously logged in steamcmd.exe, you have to copy the four Steam .DLL files from your Engine directory (\Engine\Binaries\ThirdParty\Steamworks\Steamv139\Win64) next to your Server binary. Otherwise you will get SteamAPI Errors. (Source)
                  2. The Server and Client have a version check integrated by default. Here is a starting point on how to override it with your own stuff.
                  3. My server was starting too fast sometimes and I had no time to attach my debugger. I added the following hack to my code, so now the process waits for the debugger if I use the command line parameter "-WaitForDebugger".
                    Code:
                    	//TODO SR: REMOVE THIS DEBUGCODE
                    	if (FParse::Param(FCommandLine::Get(), TEXT("WaitForDebugger")))
                    	    {
                    	        UE_LOG(LogTemp, Verbose, TEXT("'WaitForDebugger' found. Waiting for Debugger."))
                    	            while (!IsDebuggerPresent())
                    	            {
                    	                Sleep(1000);
                    	            }
                    	    }
                  4. Use command line arguments to start your server with logging. (e.g. ProjectServer.exe -log -logcmds="logonline all, logonlinegame all")
                  I hope this little summary helps anyone with the same problems. If anyone has questions, just ask in this thread or shoot me a message here or on twitter.

                  My next problem: How to change the Project Version number from my builders command line. (I hoped for some .ini setting that I could override in the packaging process, but I haven't found anything yet)



                  Comment

                  Working...
                  X