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.
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
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
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 Visual:Development 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)
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.
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.
Best way is to look up the source itself. If you surf Engine/Source/Programs/UnrealBuildTool/Modes/GenerateProjectFilesMode.cs, you will find a section