Announcement

Collapse
No announcement yet.

Compile Times - Do I need to compile the Engine every time I package something?

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

    Compile Times - Do I need to compile the Engine every time I package something?

    Hey guys, I went ahead and cloned the Unreal Engine 4.9.2 release from GitHub today and ran Setup.bat and GenerateProjectFiles.bat, Nice, then I built the editor once (took around 45 mins D. Everything fine. I created with my source-built version one new project (I want to create a dedicated server in this test project). I created the project, did literally nothing in it, packaged it. it seems like he rebuilt all the cpps out of the UE4 project again, so packaging my game did finally take up 30 mins.. I thought maybe its the first time doing that. Same with dedicated Server. Built it (with Instructions from the wiki) and it went ahead and builded every god **** CPP out of UE4 project again. It says something with Performing 230 tasks [4 in parralel]. So when I made an error in the config (default load level on the server), I needed to rebuild the server. I thought, hmm, maybe he will just go ahead and take the already built engine from the last compile and just does the server, but no. Is this for real? I mean, do I need to wait everytime I want to compile my Client/Server till everything from UE4 compiled. That takes up so much time
    Hobby game developer from Germany Follow me on Twitter!
    Stuff I made:
    Steam Workshop Tutorial/Wiki
    Making a full working translation for your game and change it at runtime

    #2
    Hey,

    Are u packaging true the front-end like in the wiki page or using a batch file (command line build)?

    I'm using this batch file to cook/build my project without having to rebuild the entire engine again each time
    u might want to change the clientconfig/serverconfig, current using debug so i can debug the dedicated server source from inside visual studio.
    The most important command line argument for not rebuilding each time is "-noclean"
    U could also cook only by passing "-nocompile"

    I'm running simular batch on my jenkins server to have post-commit builds, for the nightly builds im using argument "-clean" instead of "-noclean" for a full rebuild or all code (including UE4 source)

    Code:
    @echo off
    
    set WORKSPACE=%~dp0.
    set UE4_ROOT=c:\Repositories\Git\UnrealEngine
    
    call "%UE4_ROOT%\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -project="%WORKSPACE%/SwatReloaded.uproject" -noP4 -platform=Win64 -serverplatform=Win64 -clientconfig=Debug -serverconfig=Debug -noclean -build -server -cook -allmaps -utf8output -stage -pak -createreleaseversion=PRE-ALPHA_1 -manifests -compressed -archive -archivedirectory="%WORKSPACE%/Archive"

    Comment


      #3
      Originally posted by Fallonsnest View Post
      Hey,

      Are u packaging true the front-end like in the wiki page or using a batch file (command line build)?

      I'm using this batch file to cook/build my project without having to rebuild the entire engine again each time
      u might want to change the clientconfig/serverconfig, current using debug so i can debug the dedicated server source from inside visual studio.
      The most important command line argument for not rebuilding each time is "-noclean"
      U could also cook only by passing "-nocompile"

      I'm running simular batch on my jenkins server to have post-commit builds, for the nightly builds im using argument "-clean" instead of "-noclean" for a full rebuild or all code (including UE4 source)

      Code:
      @echo off
      
      set WORKSPACE=%~dp0.
      set UE4_ROOT=c:\Repositories\Git\UnrealEngine
      
      call "%UE4_ROOT%\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -project="%WORKSPACE%/SwatReloaded.uproject" -noP4 -platform=Win64 -serverplatform=Win64 -clientconfig=Debug -serverconfig=Debug -noclean -build -server -cook -allmaps -utf8output -stage -pak -createreleaseversion=PRE-ALPHA_1 -manifests -compressed -archive -archivedirectory="%WORKSPACE%/Archive"
      I actually built it inside Visual Studio, or packaged the client in the editor it self, I will try your solution! Thanks!
      Hobby game developer from Germany Follow me on Twitter!
      Stuff I made:
      Steam Workshop Tutorial/Wiki
      Making a full working translation for your game and change it at runtime

      Comment


        #4
        Ok things going quicker right now, btw what is the standard time do compile with your script (I deleted some arguments since I dont need them)? Mine on a fresh empty Template Project works around 5mins... Oh, and how can I tell in the script wether I want a server or the client?

        Edit: OK the time sum is now
        Total 3s to run MSbuild.exe
        Total 673s to run UnrealBuildTool.exe
        Total 127s to run UE4Editor-Cmd.exe
        Total 9s to run UnrealPak.exe

        That makes 13 minutes.
        Last edited by iUltimateLP; 10-24-2015, 12:46 PM.
        Hobby game developer from Germany Follow me on Twitter!
        Stuff I made:
        Steam Workshop Tutorial/Wiki
        Making a full working translation for your game and change it at runtime

        Comment


          #5
          Compile time depend on system and size of project, so hard to compare.

          My main pc has 8core cpu with 8GB ram and a full rebuild including engine source takes about 20-30 min (also cause of SSD HD)
          My window jenkins slave with dual core, 8GB ram takes over 2hour
          My linux jenkins slave with dual core and only 8GB ram ... +8H (this is main reasson i searched for increamental build arguments for the batch)

          Comment

          Working...
          X