Announcement

Collapse
No announcement yet.

Setting up the Unreal Tournament Editor on Linux

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

    [TUTORIAL] Setting up the Unreal Tournament Editor on Linux

    Since the information on how to build and run the Unreal Editor and specifically UT4 on Linux is all over the place, I decided to make a tutorial about it. Later additions will also involve setting up IDEs and whatnot. This perhaps could be put on the wiki as well down the road. Also, any corrections or other input is welcome.

    Introduction

    The Unreal Editor is a generic tool for modifying Unreal Engine 4 games, allowing you to edit and create maps, models, materials, particles, blueprints and so on. In a sense, Unreal Tournament is a set of additions to the Unreal Engine 4 Editor, that adds content specific to UT4. Recently it was made possible to compile it on GNU/Linux natively, so you can do all the mapping and modding work right here on your preferred OS.

    Note that the support is still ongoing, there may be bugs and lack of polish in places, but overall it should be already more or less workable. Also, as compatibility is improved, the set up process may change as well, so check back for any updates. See this page as well: https://github.com/EpicGames/UnrealT...inux/README.md

    Lastly, compiling is a time-consuming process; even on a high-end system it may take several hours. It also consumes a lot of RAM, it's best to have 4 times your processor's core count in GiB of RAM (so for 4 cores, that'd be 16 GiB). If you don't have enough, make sure to have enough swap space to compensate, and don't be surprised if your computer becomes unresponsive during the process.

    Preparation

    First off, you obviously need to get an Unreal Engine 4 subscription: https://www.unrealengine.com/register This will give you access to the Unreal Tournament git repository.

    Next, you need to install git (and git-gui is recommended too) in order to download the source code. How to do it depends on your distribution. For instance, on openSUSE, you can use YaST, or the command line interface (CLI):
    Code:
    $ sudo zypper install git git-gui
    (note: "$" indicates lines you should input into the terminal, you don't need to write the "$" by itself; lines that don't start with it are output text)

    Once that is done, you need to create an SSH key and link it to your GitHub account so that GitHub allows you to download the source. That is easiest to do from the Git GUI. Launch it (you can even launch it from the CLI by entering "git gui"), then select Help → Show SSH Key. If you haven't done it before, you will get a blank window with a button "Generate Key". Press it. When prompted, you can enter a passphrase (not necessary, you can leave it blank; it's just in case someone steals your PC). That will result in a few words and a long string of characters being generated, like this:


    Copy it and go to the GitHub SSH key page: https://github.com/settings/ssh Press "Add SSH key", give it a unique title (one key is per one OS installation) and paste the key into the "Key" field, then press "Add key".

    Next is time to download the sources. Open your favourite terminal emulator, navigate to the directory you want to place the source code in, and clone the UnrealTournament repository. I chose the directory ~/Games/ut4:
    Code:
    $ cd ~/Games/ut4
    $ git clone git@github.com:EpicGames/UnrealTournament.git
    By default the source will be downloaded into a subdirectory called "UnrealTournament". You can change the name by appending your custom one to the last command (but I will continue to refer to it as "UnrealTournament" in this tutorial).
    The download will take a while, depending on your internet connection speed.

    Once finished, you need to run several bash scripts to set up the build environment. Start from Setup.sh in UnrealTournament/Engine/Build/BatchFiles/Linux/ (must be run from the Engine directory):
    Code:
    $ cd UnrealTournament/Engine/
    $ Build/BatchFiles/Linux/Setup.sh
    This will set some things up, including installing needed dependencies (on supported distributions, at the moment of writing that's Debian-based, SUSE-based and Arch-based ones).

    If you were not asked for a root password to install them, then your distribution is not supported and you need to install the packages manually. The list of packages to install is maintained inside the Setup.sh file itself: https://github.com/EpicGames/UnrealT...x/Setup.sh#L35

    Then make sure you have Clang and Mono installed. If you get errors down the line about compilers or C#, you might be missing them.

    Once done, you need to customise which toolkit you want the Editor to use. The default is Qt 4, but you can also build it with Qt 5, GTK 3 or GTK 2. If you don't know what any of that means, don't worry about it, Qt 4 is good enough. For those who want to use something else, make sure to install the needed development packages for the toolkits, and remove the development packages of the others. For instance, if you want Qt 5 and don't want Qt 4, and are on openSUSE, you could do this:
    Code:
    $ sudo zypper install libQt5Core-devel libQt5Gui-devel libQt5Widgets-devel libqt5-qtbase-common-devel
    $ sudo zypper remove libqt4-devel
    If you have both Qt 4 and Qt 5 development libraries installed, Qt 4 will be used, so you must at least temporarily remove Qt 4 development tools if you want Qt 5.

    Next, run Setup.sh in the top-level directory:
    Code:
    $ cd ..
    $ ./Setup.sh
    Finally, run GenerateProjectFiles.sh:
    Code:
    $ ./GenerateProjectFiles.sh
    Compilation and running

    Now you are ready to compile the Editor. To build everything needed to have a working Editor with Unreal Tournament capabilities, do:
    Code:
    $ make ShaderCompileWorker UnrealLightmass UnrealPak UE4Editor UnrealTournamentEditor
    Now go do something else for a while, as this step will likely take over an hour. Stopping unneeded processes may speed it up a little.

    Once it's done, you can try and launch the Editor. To launch it with Unreal Tournament capabilities, do this:
    Code:
    $ cd Engine/Binaries/Linux/
    $ ./UE4Editor UnrealTournament/UnrealTournament.uproject
    You may be presented with a blank message box with the options "yes" and "no". Press "yes" to make sure UnrealTournament was built correctly (albeit reportedly if the previous "make UnrealTournament" step succeeded this may not be necessary). This step might cause a partial recompilation and thus take a while, over half an hour.

    Then you should see the Unreal Tournament Unreal Editor splash screen come up, with words "Initializing...". Wait for a generous while, possibly over half an hour more. The terminal should show some output about compiling materials in the mean while. After some time, a percentage will appear on the splash screen.

    At 20% initialisation you might get an empty message box with a random character and an "ok" button, and the terminal output may have warnings like:
    Code:
    LogLinux:Warning: dlopen failed: libUE4Editor-XmlParser.so: cannot open shared object file: No such file or directory
    LogModuleManager:Warning: ModuleManager: Unable to load module 'UnrealTournament/Engine/Plugins/Developer/SubversionSourceControl/Binaries/Linux/libUE4Editor-SubversionSourceControl.so' because the file couldn't be loaded by the OS.
    This is known to happen at least in openSUSE and Gentoo, possibly other distributions. In that case, re-run the editor like this (make sure you are still in Engine/Binaries/Linux/):
    Code:
    $ LD_LIBRARY_PATH=. ./UE4Editor UnrealTournament/UnrealTournament.uproject
    Finally, the Editor should load. However, on first load, in the lower right of the Editor you will see a box saying "Compiling shaders (5000)" or another number. The number is the number of GLSL shaders left to compile, and it will count down. This may take over half an hour more, and is also very processor-intensive.

    And that's it! Congratulations, you have built and successfully run the Unreal Tournament Editor on GNU/Linux. Next time you rerun the Editor binary (using the same command as last time) it will start up much faster (but still not spectacularly so, it takes around half a minute to start for me).

    This Image Was Automatically Resized by using the Screenshot Tag.  Click to view the full version

    Updating and troubleshooting

    If compilation or running fails for you, it's likely that the current version of the Editor is broken and will get fixed in the future. In fact, it might have got fixed while you were trying to compile it (that sure happened to me). Or you might want to update Unreal Tournament to get any new features and fixes to the game itself. In that case, you need to repeat much of the same commands, just starting with a git pull. The quick list of commands to update the Editor is this:
    Code:
    $ cd UnrealTournament/
    $ git pull
    $ cd Engine/
    $ Build/BatchFiles/Linux/Setup.sh
    $ cd ..
    $ ./GenerateProjectFiles.sh
    $ make ShaderCompileWorker UnrealLightmass UnrealPak UE4Editor UnrealTournamentEditor
    It will go faster than the first time, since it won't recompile parts that didn't change since last compilation.
    Last edited by GreatEmerald; 09-02-2015, 03:44 PM.
    Unreal Tournament 4 eXpanded MultiPlayer (UT4XMP) efforts
    My website, listing all my Unreal series mods and mutators

    #2
    You really should change this:

    make ShaderCompileWorker UnrealLightmass UnrealPak UE4Editor UnrealTournament

    to this:

    make ShaderCompileWorker UnrealLightmass UnrealPak UE4Editor UnrealTournamentEditor

    Since people are likely to want to open the game in the editor and not play it directly at this point.

    You might also want to point out that the first run of the editor will take quite a while for the editor to even start.

    You might also want to point out that the editor is very buggy still and that Epic does not recommend it for production use, but any issues should probably be reported somewhere (not even sure where because this isn't the latest engine and many of the bugs have been fixed in mainline).
    HABOUJI! Ouboudah! Batai d'va!
    BeyondUnreal - Liandri Archives [An extensive repository of Unreal lore.] - Join us on IRC [irc.utchat.com - #beyondunreal]

    Comment


      #3
      Originally posted by Sir_Brizz View Post
      You really should change this:

      make ShaderCompileWorker UnrealLightmass UnrealPak UE4Editor UnrealTournament

      to this:

      make ShaderCompileWorker UnrealLightmass UnrealPak UE4Editor UnrealTournamentEditor

      Since people are likely to want to open the game in the editor and not play it directly at this point.
      Oh, there's a difference? I guess that explains why it keeps rebuilding it every time I try to launch it. Thanks, I'll correct that.

      Originally posted by Sir_Brizz View Post
      You might also want to point out that the first run of the editor will take quite a while for the editor to even start.
      I already pointed that out three times.

      Originally posted by Sir_Brizz View Post
      You might also want to point out that the editor is very buggy still and that Epic does not recommend it for production use, but any issues should probably be reported somewhere (not even sure where because this isn't the latest engine and many of the bugs have been fixed in mainline).
      I would, but I don't know where to report them either. And nobody on UE4Linux knows, too... Also, there's probably a distinction between UT4 and generic UE4 bugs, too.
      Unreal Tournament 4 eXpanded MultiPlayer (UT4XMP) efforts
      My website, listing all my Unreal series mods and mutators

      Comment


        #4
        How unreal editor 4 works on Linux atm? How far we are from full compatibility?

        Comment


          #5
          I tested it only briefly, but so far I've only noticed minor issues with tooltips opening new windows and a few graphical glitches. Tested the material editor and it's working fine. So nothing is missing as far as I can see. Though I haven't tried it on Windows.
          Unreal Tournament 4 eXpanded MultiPlayer (UT4XMP) efforts
          My website, listing all my Unreal series mods and mutators

          Comment


            #6
            Most of the bugs are in Blueprints/UMG, testing in the editor, and a lot of the "nice" features that the editor adds (like packaging for different platforms and such). The issues seem like they are often related to graphics and sound processing right now, but they are getting fixed as time goes on. RCL has done a decent job of getting it to a stable place with the help of the UE4Linux community.
            HABOUJI! Ouboudah! Batai d'va!
            BeyondUnreal - Liandri Archives [An extensive repository of Unreal lore.] - Join us on IRC [irc.utchat.com - #beyondunreal]

            Comment


              #7
              Hello, im having trouble after running the Setup.sh file, when i try this command:

              sudo zypper install mono-core mono-devel dos2unix cmake llvm-clang
              I get the following:
              Reading package lists... Done
              Building dependency tree
              Reading state information... Done
              E: Unable to locate package mono-core
              E: Unable to locate package llvm-clang

              Can you help?

              Comment


                #8
                Huh, what distribution are you running? Since zypper is called it looks like one of the SUSE family, but the response is that of apt-get. That's not right.
                Unreal Tournament 4 eXpanded MultiPlayer (UT4XMP) efforts
                My website, listing all my Unreal series mods and mutators

                Comment


                  #9
                  Im using ubuntu 15.04 and changed zypper for sudo apt-get install, is that wrong?

                  Comment


                    #10
                    Yes, because the setup script should have detected you as Ubuntu rather than SUSE and run apt-get, not zypper. Can you post the output of `cat /etc/os-release`?
                    Unreal Tournament 4 eXpanded MultiPlayer (UT4XMP) efforts
                    My website, listing all my Unreal series mods and mutators

                    Comment


                      #11
                      I would love to! but i have no idea where that is, sorry, im pretty new to ubuntu, can you help me?

                      ok i looked it up on google and i found a file on the folder:

                      NAME="Ubuntu"
                      VERSION="15.04 (Vivid Vervet)"
                      ID=ubuntu
                      ID_LIKE=debian
                      PRETTY_NAME="Ubuntu 15.04"
                      VERSION_ID="15.04"
                      HOME_URL="http://www.ubuntu.com/"
                      SUPPORT_URL="http://help.ubuntu.com/"
                      BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"

                      is that what i needed?
                      Last edited by A00958821; 09-02-2015, 12:17 AM.

                      Comment


                        #12
                        Btw, i have no idea what SUSE is, but when i try to use 'zypper' as a command i get the message 'command not found'

                        Comment


                          #13
                          Yes, that's what I needed. It looks right, so I don't really see why the script would fail for you.

                          Put this into a file called "test.sh" in your user directory, open a Terminal, and enter "bash ~/test.sh", then post the output.

                          Code:
                          #!/bin/bash
                          if [ -e /etc/os-release ]; then
                            source /etc/os-release
                            if [[ "$ID" == "ubuntu" ]] || [[ "$ID_LIKE" == "ubuntu" ]] || [[ "$ID" == "debian" ]] || [[ "$ID_LIKE" == "debian" ]]; then
                              DEPS="ubuntu"
                          
                              if [[ "$ID" != "ubuntu" ]]; then
                                DEPS+="ubuntu-like"
                              fi
                          
                              for DEP in $DEPS; do
                                echo "Your OS is: $DEP"
                              done
                            fi
                          
                            if [[ "$ID" == "opensuse" ]] || [[ "$ID_LIKE" == "suse" ]]; then
                              DEPS="SUSE"
                          
                              for DEP in $DEPS; do
                                echo "Your OS is: $DEP"
                              done
                            fi
                          fi
                          Unreal Tournament 4 eXpanded MultiPlayer (UT4XMP) efforts
                          My website, listing all my Unreal series mods and mutators

                          Comment


                            #14
                            Ok, soo i created a file called "test.sh" in home/mena (mena being my user)
                            then added the code you wrote to it
                            and ran the command "bash ~/test.sh"

                            this was the output:

                            mena@mena-Lenovo-G500:~$ bash ~/test.sh
                            Your OS is: ubuntu

                            i installed ubuntu 15.04 by a booted USB, if that helps
                            Last edited by A00958821; 09-02-2015, 03:21 AM.

                            Comment


                              #15
                              OK, so the Setup.sh script should be working just fine and call apt-get, not zypper. I'm not sure why you're having problems with it, if you haven't modified it...
                              Unreal Tournament 4 eXpanded MultiPlayer (UT4XMP) efforts
                              My website, listing all my Unreal series mods and mutators

                              Comment

                              Working...
                              X