Announcement

Collapse
No announcement yet.

Linux development pipeline

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

    Linux development pipeline

    Hello. I am new to UE4, trying to start building my own C++ projects.
    For many UE-unrelated reasons I decided to go with Linux version. I use kdevelop for development for a number of years, so was pretty happy to see this topic:
    https://forums.unrealengine.com/deve...jects-in-linux

    The purpose of my project is to build a plugin that will communicate with my external software and load/unload the UE4 map, interact with my library and do some actions e.g. change the weather, add models to the scene etc.

    I tried with the very basics so ran UE4Editor and created new C++ project "Basic Code" for Desktop/Console, with Maximum Quality and with No Starter Content. The project was made successfully - new files appeared including .kdev4 file (kdevelop project file).
    However I cannot successfully build the project. When I open the .kdev4 file and try to build the project I get the message "No command given for custom build tool in project "TestProject". I also realized that there are many Build configurations (like UE4Game-Linux-Debug, UnrealPak-Linux-Shipping, UnrealFrontend-Linux-Test etc - there are more than 100 of them) and as a beginner I don't understand the differences between them. The default build setup is named "BuildMeFirst".

    So my questions are:
    Is there any step by step manual (except the one above) that could help me start C++ project on Linux with kdevelop? Digging here and googling did not bring me the answers.
    Which build target should I choose according to my needs? Any documentation to understand them would be great.

    Any help will be appreciated.

    Edit: Tried to reproduce the similar pipeline on Windows and after creating the project the visual C++ was started. The build works and I can do my C++ stuff. Default build configuration is named "Development" for x64 platform. Tried to find similar build configuration on kdevelop but without success.
    So still I am stuck on the very initial stage.
    Last edited by tomecki; 09-05-2019, 12:26 PM. Reason: Tried to reproduce the similar pipeline on Windows...

    #2
    First it is important to understand the two important programs absolutely essential for building Engine code. They are Unreal Build Tool (UBT) and Unreal Header Tool (UHT). UBT is present in Binaries/DotNET directory. You can traverse to that directory and build Engine project
    Code:
    mono UnrealBuildTool.exe -project="/home/the_cowboy/unrealworks/UnrealProjects/UnrealTournament/UnrealTournament.uproject" Development Linux -TargetType=Editor -Progress -NoHotReloadFromIDE
    Now you can instruct your IDE to build the project using same commandline parameters. This is how it looks for Qt Creator
    Attached Files
    https://ravimohan.net/
    https://github.com/ravimohan1991

    Comment


      #3
      The Cowboy - thank you for explanation.
      I dug deeper and found that 95% of the Build configurations that are possible to select in my project have the "bash" as build executable. I still don't know what are they for. My guess is that they are supposed to do UE4 builds whenever it is updated. I also found few of build configurations had build executable as: Engine/Build/BatchFiles/Linux/RunMono.sh. All of those are having name of my project in it (XXX is the example name of our project):
      XXX, XXX-Linux-Test, XXXEditor, XXXEditor-Linux-Test, XXX-Linux-Shipping, XXXEditor-Linux-Debug, XXXEditor-Linux-Shipping, XXXEditor-Linux-DebugGame, XXX-Linux-DebugGame, XXX-Linux-Debug

      Comparing to the MS Visual Studio I realized that some of build configurations in kdevleop are corresponding the Visual Studio solution config.
      For example XXX is corresponding to Development in MS Visual, XXXEditor is Visualevelopment Editor, XXXEditor-Linux-Shipping is Visual:Shipping.
      I was still unable to build the project with kdevelop but after a moment I realized that the paths given for the custom build tool have to be absolute while they are relative. I changed both the path to UnrealBuildTool.exe and -project="PATH_TO_UPROJECT" to absolute path in "Arguments".
      I made a progress and now can build the project. Still - I have doubts about the build configuration names. Some of them were misleading comparing to MS Windows. Also there are around 100 of the bash based configs which I don't know what they are supposed to do.

      What is worrying me now is how to organize the production pipeline. Once we have to include the absolute paths in project settings it will be the obstacle if you think to develop C++/UE4 project with a number of developers and (or) on more than one machine. Once you create the kdevelop project and put it in repository it will have the absolute paths including the user name in it.
      I am trying to figure out if it's possible to start with CMakeLists.txt and let the cmake do all configuration (including creation of kdevelop project files)

      Comment


        #4
        Originally posted by tomecki View Post
        What is worrying me now is how to organize the production pipeline. Once we have to include the absolute paths in project settings it will be the obstacle if you think to develop C++/UE4 project with a number of developers and (or) on more than one machine. Once you create the kdevelop project and put it in repository it will have the absolute paths including the user name in it.
        I am trying to figure out if it's possible to start with CMakeLists.txt and let the cmake do all configuration (including creation of kdevelop project files)
        Putting the kdevelop project files in the repository is irrelevant imo. Project files can be generated on individual machines through UBT
        Code:
        mono UnrealBuildTool.exe -projectfiles -project="PATH_TO_PROJECT" -game -engine -progress
        and each developer can generate files as per their needs. Project files are there only for user convenience and Engine doesn't need them in order to compile the project.
        https://ravimohan.net/
        https://github.com/ravimohan1991

        Comment


          #5
          Thank you again. I followed the way you suggested and succeeded.
          As far as I understand if you plan to work with repository you should push/commit only the *.uproject file plus Source and Config directories. The rest is automatically generated.
          I tried to play with UBT command line options to generate just the CMake files and avoid generating the rest. I found the documentation for command line options here:
          https://docs.unrealengine.com/en-US/...DEs/index.html
          but unfortunately there are options for MS Windows/Visual generation. I searched the forum and google but did not find the manual that could explain the linux command line options for UBT. Running it with -help or --help gave no result.
          I also fount this thread:
          https://answers.unrealengine.com/que...enerating.html
          Tried the blind guess: -cmakefile and yay! It did work.
          Last edited by tomecki; 09-09-2019, 07:50 PM.

          Comment


            #6
            Originally posted by tomecki View Post
            I tried to play with UBT command line options to generate just the CMake files and avoid generating the rest. I found the documentation for command line options here:
            https://docs.unrealengine.com/en-US/...DEs/index.html
            but unfortunately there are options for MS Windows/Visual generation.
            Best way is to look up the source itself. If you surf Engine/Source/Programs/UnrealBuildTool/Modes/GenerateProjectFilesMode.cs, you will find a section
            Code:
            ///<summary>
            /// Types of project files to generate
            ///</summary>
            [CommandLine("-ProjectFileFormat")]
            [CommandLine("-2012unsupported",Value=nameof(ProjectFileFormat.VisualStudio2012))]
            [CommandLine("-2013unsupported",Value=nameof(ProjectFileFormat.VisualStudio2013))]
            [CommandLine("-2015",Value=nameof(ProjectFileFormat.VisualStudio2015))]// + override compiler
            [CommandLine("-2017",Value=nameof(ProjectFileFormat.VisualStudio2017))]// + override compiler
            [CommandLine("-2019",Value=nameof(ProjectFileFormat.VisualStudio2019))]// + override compiler
            [CommandLine("-Makefile",Value=nameof(ProjectFileFormat.Make))]
            [CommandLine("-CMakefile",Value=nameof(ProjectFileFormat.CMake))]
            [CommandLine("-QMakefile",Value=nameof(ProjectFileFormat.QMake))]
            [CommandLine("-KDevelopfile",Value=nameof(ProjectFileFormat.KDevelop))]
            [CommandLine("-CodeLiteFiles",Value=nameof(ProjectFileFormat.CodeLite))]
            [CommandLine("-XCodeProjectFiles",Value=nameof(ProjectFileFormat.XCode))]
            [CommandLine("-EddieProjectFiles",Value=nameof(ProjectFileFormat.Eddie))]
            [CommandLine("-VSCode",Value=nameof(ProjectFileFormat.VisualStudioCode))]
            [CommandLine("-VSMac",Value=nameof(ProjectFileFormat.VisualStudioMac))]
            [CommandLine("-CLion",Value=nameof(ProjectFileFormat.CLion))]
            which lists the commandline parameters for generating IDE specific project files.

            P.S. I am in the process of writing a documentation (unofficial of course) for Linux based development pipeline.
            https://ravimohan.net/
            https://github.com/ravimohan1991

            Comment


              #7
              Originally posted by The-Cowboy View Post
              Best way is to look up the source itself. If you surf Engine/Source/Programs/UnrealBuildTool/Modes/GenerateProjectFilesMode.cs, you will find a section
              which lists the commandline parameters for generating IDE specific project files.
              I totally agree, but I just started your adventure with UE so it is not very clear to me where to look.


              Originally posted by The-Cowboy View Post
              P.S. I am in the process of writing a documentation (unofficial of course) for Linux based development pipeline.
              This is great news. As a beginner user I must say, that this kind of doc would let me save a lot of time.

              Comment

              Working...
              X