Announcement

Collapse
No announcement yet.

[Guide] Compiling the engine from source, getting UT to work reliably step by step

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

    [Guide] Compiling the engine from source, getting UT to work reliably step by step

    **NOTE**: This guide is with the assumption that you're not going to be submitting programming work to Epic, if you're mapping you don't need to be changing any of Epics content, just using it or creating your own, and is meant to be a temporary solution until the engine launcher is once again reliable to use with the UT project


    Git CLI:
    http://fossies.org/windows/misc/Git-...w20140611.exe/

    Visual Studio 2013 Community (free, may require making a microsoft account - but still free):
    http://www.visualstudio.com/en-us/ne...munity-vs.aspx

    DirectX runtimes that the engine requires:
    http://www.microsoft.com/en-us/downl...s.aspx?id=8109


    First up as some (most?) of you are aware the github app really doesn't like large repos, it will give you problems when attempting to clone it/crashing etc. the git CLI app I listed above has never failed me

    Step 1: Tool Installation

    Git CLI: All of these settings can remain default except for page three, where you'll want to select git from the windows command prompt:




    I use all default values for the visual studio install, nothing special is required here.
    Select a directory to extract the DirectX runtimes to, then go and run DXSETUP.EXE from inside that folder
    Last edited by raxxy; 12-23-2014, 09:48 PM.

    #2
    Step 2: Getting Unreal Engine downloaded and compiled

    After that we'll skip right ahead to grabbing the Unreal Engine source.

    start -> run -> cmd

    In this, I type G: (the drive letter) and then cd Unreal to get into my working directory.:



    now you need to go and grab the engine version you're after

    https://github.com/EpicGames/UnrealEngine -- on the right hand side of this page you'll see a HTTPS clone url, copy the contents of that box and then type in shell:

    git clone https://github.com/EpicGames/UnrealEngine.git



    Once the clone has completed, type "git checkout 4.6"

    *UPDATE*: As of 4.6 the "Required" files are no longer required. Simply run Setup.bat to download the content, and when that has completed, double click on GenerateProjectFiles.bat to generate the solution for Visual Studio, once it's generated, open UE4.sln and Visual Studio should launch.


    Once it opens up, the top menu will look something like this:[/SIZE]



    You're going to want to select "Development Editor" and "Win64" from the dropdowns, and then click on Build, and then click Build Solution. This process may take more than one hour on slow computers.

    You're best to minimize Visual Studio and move onto the next part of this project, which is getting UT from Git.

    Once visual studio is complete, you will get a message down the bottom saying something like: Successful 12, failed: 0. You can close that Visual Studio now.
    Last edited by raxxy; 12-02-2014, 08:49 AM.

    Comment


      #3
      Step 3: Getting UT downloaded & running with a source editor

      As last time, I need to change to my working directory to G:\Unreal:



      git clone https://github.com/EpicGames/UnrealTournament.git



      This will take some time, UT is about 4.3GB at the time of this post, Once this has completed, you'll need to go back to visual studio and see if it has successfully finished compiling.

      Once Visual Studio has successfully finished compiling, right click on the UnrealTournament.uproject file and select "Switch Unreal Engine Version" then browse to the UnrealEngine directory that you just compiled and click OK.

      This should now generate an UnrealTournament.sln file linked to the source-compiled UE, double click on this file to open a Visual Studio that's linked to UT:



      Simply select Development Editor & Win64, then click the green local windows debugger option and sit back for a few minutes. The first run will take some time, but this is about the only sure-fire way I know of to ensure everything always works.






      Notes: When you want to update UT, you simply just need to type "git pull" in G:\Unreal\UnrealTournament (at least, as per this example) and it will update/download only new files, I found out today that a lot of people have been using .zips to do their work, this is very inefficient..and when things like this happen, it makes it hard for them to swap back to an earlier revision

      this guide turned out super messy and unclean, but something is better than nothing. If you get lost, speak up and I'll do what I can to help you
      Last edited by raxxy; 12-02-2014, 08:51 AM.

      Comment


        #4
        this is extremely helpful thanks
        https://play.google.com/store/apps/d...sm.zombieultra

        Comment


          #5
          Nice guide. Should sticky.

          Comment


            #6
            Great job on the thread. But if your (NOTE: Windows Account, your user log in) account name has special letters like mine did. The compiled engine won't be able to load the Unreal Tournament project file. My account name had "Ö" in it and that caused Unreal Engine to replace the "Ö" with "?". So the path to some needed files in my account folder stirred up some file missing errors and then the engine quit. I solved this by changing my Windows account name into something that only contain A-Z (with no spaces just to be sure).
            Last edited by Immelmann; 10-06-2014, 08:57 AM. Reason: clarification regarding account name.
            ~ Benoyd ~

            Comment


              #7
              Thanks Raxxor this is very clear and informative. Crossing all fingers and toes that it works like that, or I will run laughing into a Buzzsaw.

              Comment


                #8
                I've got to the point where you are supposed to right-click the UnrealTournament.uproject file and generate the visual studio project files, but I keep getting this error:

                Click image for larger version

Name:	SfpapBC.png
Views:	1
Size:	7.5 KB
ID:	330825

                This is after I downloaded Unreal Engine 4.4, extracted the required .zip files and built the Engine (Development Editor, Win64)

                Comment


                  #9
                  Originally posted by Ringwood View Post
                  I've got to the point where you are supposed to right-click the UnrealTournament.uproject file and generate the visual studio project files, but I keep getting this error:

                  [ATTACH=CONFIG]8566[/ATTACH]

                  This is after I downloaded Unreal Engine 4.4, extracted the required .zip files and built the Engine (Development Editor, Win64)
                  UT Git is currently on UE4.5

                  Comment


                    #10
                    Originally posted by raxxy View Post
                    UT Git is currently on UE4.5

                    Ah godamn me for not paying attention, thanks raxxy

                    Comment


                      #11
                      Compiled successfully after following all of the instructions.

                      How's that for a customer satisfaction quote? lol
                      Contact me: (Steam: Neillithan) (E-mail: neilvmoore@gmail.com)

                      Comment


                        #12
                        I get to the point where I'm supposed to generate the solution, where I run into a problem.

                        It fails to generate anything, saying "GenerateProjectFiles ERROR: UnrealBuildTool failed to compile.

                        "Could not copy the file .. because it was not found". But if I navigate to the path specified in the error message, UnrealBuildTool.csproj is there so I get a bit confused.
                        /Jonas - youtube.com/user/JTykesson -

                        Comment


                          #13
                          Originally posted by Huckle View Post
                          I get to the point where I'm supposed to generate the solution, where I run into a problem.

                          It fails to generate anything, saying "GenerateProjectFiles ERROR: UnrealBuildTool failed to compile.

                          "Could not copy the file .. because it was not found". But if I navigate to the path specified in the error message, UnrealBuildTool.csproj is there so I get a bit confused.
                          Required zips 1 and 2 contain that file, it sounds like the directory structure is incorrect, can you confirm that you merged the Engine folder from both required 1 and 2 with the git folder?

                          Comment


                            #14
                            Originally posted by raxxy View Post
                            Required zips 1 and 2 contain that file, it sounds like the directory structure is incorrect, can you confirm that you merged the Engine folder from both required 1 and 2 with the git folder?
                            Yep I did. The file is there (...engine/source/programs/UnrealBuildTool/UnrealBuildTool.csproj). I could have made a mistake because I replaced some files during the merge, which might not have been the correct choice.

                            /Jonas - youtube.com/user/JTykesson -

                            Comment


                              #15
                              Originally posted by Huckle View Post
                              Yep I did. The file is there (...engine/source/programs/UnrealBuildTool/UnrealBuildTool.csproj). I could have made a mistake because I replaced some files during the merge, which might not have been the correct choice.


                              Shouldn't have replaced any files at all, only merged directories - I appear to have been wrong, the zips don't include that file, apologies

                              To reset the git back to default: 'git reset --hard HEAD' in the unreal engine folder, skimming through the bat files it looks like UBT is being provided by git but isn't working - is your visual studio installed and working correctly with other things, or was it installed for this process only?

                              a fair few people have done this successfully now, so there must be a misconfiguration somewhere..

                              give this a try (change the paths so they match yours)

                              "C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe" /nologo /verbosity:n G:\UnrealEngine-4.5-preview\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj /property:Configuration=Development /property:Platform=AnyCPU

                              should give you slightly more information as to whats going on...hopefully

                              Comment

                              Working...
                              X