Generate project files in Linux

Some of my projects fail to open in Linux, e.g.

Launching UnrealBuildTool... [/opt/UnrealEngine/Engine/Build/BatchFiles/Linux/Build.sh -Mode=QueryTargets -Project="/unreal/Unreal Projects/ObstacleAssault/ObstacleAssault.uproject" -Output="/unreal/Unreal Projects/ObstacleAssault/Intermediate/TargetInfo.json" -progress]
LogInit: Warning: Incompatible or missing module: ObstacleAssault
LogInit: Initializing SDL.
LogInit: Initialized SDL 2.24.0 revision:  (compiled against 2.24.0)
LogInit: Using SDL video driver 'x11'
LogInit: Display metrics:
LogInit:   PrimaryDisplayWidth: 2560
LogInit:   PrimaryDisplayHeight: 1600
LogInit:   PrimaryDisplayWorkAreaRect:
LogInit:     Left=0, Top=0, Right=2560, Bottom=1570
LogInit:   VirtualDisplayRect:
LogInit:     Left=0, Top=0, Right=2560, Bottom=1570
LogInit:   TitleSafePaddingSize: X=0.000 Y=0.000 Z=0.000 W=0.000
LogInit:   ActionSafePaddingSize: X=0.000 Y=0.000 Z=0.000 W=0.000
LogInit:   Number of monitors: 1
LogInit:     Monitor 0
LogInit:       Name: 0
LogInit:       ID: display0
LogInit:       NativeWidth: 2560
LogInit:       NativeHeight: 1600
LogInit:       bIsPrimary: true
LogLinux: Warning: MessageBox: The following modules are missing or built with a different engine version:

  ObstacleAssault

Would you like to rebuild them now?: Missing ObstacleAssault Modules: No is implied.
LogCore: Engine exit requested (reason: EngineExit() was called)
LogExit: Preparing to exit.
LogVirtualization: UE::Virtualization was shutdown
LogModuleManager: Shutting down and abandoning module DesktopPlatform (60)
LogModuleManager: Shutting down and abandoning module PerforceSourceControl (58)
LogModuleManager: Shutting down and abandoning module PlasticSourceControl (56)
LogModuleManager: Shutting down and abandoning module SourceControl (55)
LogModuleManager: Shutting down and abandoning module PlatformCryptoOpenSSL (52)
LogModuleManager: Shutting down and abandoning module PlatformCryptoTypes (50)
LogModuleManager: Shutting down and abandoning module PlatformCrypto (48)
LogModuleManager: Shutting down and abandoning module PythonScriptPluginPreload (46)
LogModuleManager: Shutting down and abandoning module FastBuildController (44)
LogModuleManager: Shutting down and abandoning module AnimationModifiers (42)
LogModuleManager: Shutting down and abandoning module AudioEditor (40)
LogModuleManager: Shutting down and abandoning module PropertyEditor (39)
LogModuleManager: Shutting down and abandoning module Virtualization (36)
LogModuleManager: Shutting down and abandoning module MessageLog (35)
LogModuleManager: Shutting down and abandoning module TextureCompressor (32)
LogModuleManager: Shutting down and abandoning module RenderCore (30)
LogModuleManager: Shutting down and abandoning module Landscape (28)
LogModuleManager: Shutting down and abandoning module SlateRHIRenderer (26)
LogModuleManager: Shutting down and abandoning module OpenGLDrv (24)
LogModuleManager: Shutting down and abandoning module AnimGraphRuntime (22)
LogModuleManager: Shutting down and abandoning module Renderer (20)
LogModuleManager: Shutting down and abandoning module Engine (18)
LogModuleManager: Shutting down and abandoning module CoreUObject (16)
LogModuleManager: Shutting down and abandoning module SandboxFile (14)
LogModuleManager: Shutting down and abandoning module PakFile (12)
LogModuleManager: Shutting down and abandoning module RSA (11)
LogModuleManager: Shutting down and abandoning module NetworkFile (8)
LogModuleManager: Shutting down and abandoning module StreamingFile (6)
LogModuleManager: Shutting down and abandoning module CookOnTheFly (4)
LogModuleManager: Shutting down and abandoning module StorageServerClient (2)
LogExit: Exiting./opt/UnrealEngine/Engine/Build/BatchFiles/Linux/Build.sh -Mode=QueryTargets -Project="/unreal/Unreal Projects/ObstacleAssault/ObstacleAssault.uproject" -Output="/unreal/Unreal Projects/ObstacleAssault/Intermediate/TargetInfo.json" -progress
LogInit: Tearing down SDL.
Exiting abnormally (error code: 1)

Whilst in other projects (that open successfully) I can hit Tools -> Refresh Visual Studio Code Project which regenerates the project files giving me a Makefile and loading the build tasks, etc.

Is there a CLI way for me to fire that off in the above case where the Unreal Editor errors out and does not open the project?

of note, if I run that command in the error log output, I get a successful run, but that does not give me a Makefile, etc.

/opt/UnrealEngine/Engine/Build/BatchFiles/Linux/Build.sh -Mode=QueryTargets -Project="/unreal/Unreal Projects/ObstacleAssault/ObstacleAssault.uproject" -Output="/unreal/Unreal Projects/ObstacleAssault/Intermediate/TargetInfo.json" -progress
Setting up bundled DotNet SDK
Running command : dotnet Engine/Binaries/DotNET/UnrealBuildTool/UnrealBuildTool.dll -Mode=QueryTargets -Project=/unreal/Unreal Projects/ObstacleAssault/ObstacleAssault.uproject -Output=/unreal/Unreal Projects/ObstacleAssault/Intermediate/TargetInfo.json -progress
Written /unreal/Unreal Projects/ObstacleAssault/Intermediate/TargetInfo.json

here is my gen solution cli:
$enginedir/Binaries/DotNET/UnrealBuildTool/UnrealBuildTool -projectfiles -vscode -project=$projectfile -game -engine

you can find full cli in here

Brilliant! This was exactly what I was looking for, I hope you don’t mind I add some of this functionality to my own tool I’ve been working on to wrangle some of these unreal commands together, I gave you full credit with a link to this post in the comments. I’d happily accept pull requests from anyone if you think you can help me improve it in any way. Adding build, cook, and gen-solution methods from Dagon1999 · joshuacox/UnrealEngine-wrapper@83bcc00 · GitHub

One small note, the Makefile is still missing after the build using the automation tool, however, this did get my project far enought to where the editor will open at which point I can have it Refresh Visual Studio Code Project at which there is a Makefile in the project directory.

Bonus points for anyone who can name a CLI method of getting that final step to happen?

pull requests is no problem

to gen Makefile please remove -vscode in your cmd
$enginedir/Binaries/DotNET/UnrealBuildTool/UnrealBuildTool -projectfiles -project=$projectfile -game -engine

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.