Prevent the editor from launching the launcher?

It’s just painful to launch the launcher every time you want to start the editor (excessively so considering the various problems the launcher currently has), so I’ve created a direct shortcut to the editor on my desktop and in my start menu. It’s all good, except for the fact that the EDITOR launches the LAUNCHER on launch (how much sense does that make?), and not just once, but multiple times (once during initial startup and once while it’s loading a project at least). Is there a command-line argument or something like that to disable this behavior?

1 Like

If you compile the engine from source you can bypass the launcher.

@Arshia001

We are aware of this occurring and are considering solutions. Howerver we do not have a simple workaround at this time.

We are curious about the various Launcher problems you mentioned. Are you still experiencing issues since making this post? If yes, and they haven’t previously been reported, please consider making new posts for the difficulties you are experiencing.

Thanks

This happened to me involuntarily. I wiped out UE4 and reinstalled it from scratch using the source and was surprised the launcher doesn’t start now. So it doesn’t log me online and the MarketPlace doesn’t work. It offers to re-install the Launcher if I press MarketPlace, but if choosing Yes it instead tries to uninstall UE4 … kind of confusing. But at least the editor is still working.

Thanks for your reply. I was talking about the issues where the update gets stuck at 80% (it still does that) and the one where it shows “Subscribe” instead of downloading the engine or giving the option to start it. Both issues have been discussed extensively on other threads, and the QFE2 fix is working for now. It’s been only 10 days or so since the release of the engine so problems like these are to be expected. I’m just hoping they’ll be fixed as quickly as possible.

If you are compiling from the source, you can change the following in code to stop the launcher:

In Editor.cpp find the following line and comment out:

DesktopPlatform->OpenLauncher( false, TEXT("") );

For me, in version 4.20 it is line 359.

Here is a patch I made to remove the auto launch.

https://github.com/robert-wallis/UnrealEngine/commit/95f2d511898dd1c019ddf597515432da0d175abf

I made it because it slows my editor down: UnrealEngineLauncher slows the editor down - C++ - Unreal Engine Forums

A very simple solution to this problem is to put a file named “PerforceBuild.txt” in your Engine/Build directory. Then when the editor opens without the launcher, it won’t open the launcher. No source patch needed.

It may have some other, subtle effects but it’s probably fine. Just remove it for production.

For reference, this is the condition you are changing to yes:

FEngineBuildSettings::IsPerforceBuild()

Well, I never really cared about memory/CPU usage. I generally choose systems with high enough RAM/CPU that I don’t have to worry about resource usage. However, the launcher takes up space on the Windows taskbar, and my OCD kills me when it does, so I went ahead and added a -NoLauncher command line argument to prevent this behavior to the source. Here’s the modified code:

	const bool bForceLauncherToOpen = FParse::Param( FCommandLine::Get(),TEXT( "ForceLauncher" ) );
	const bool bForceLauncherToNotOpen = FParse::Param(FCommandLine::Get(), TEXT("NoLauncher"));

	if( bForceLauncherToOpen ||
		( !FEngineBuildSettings::IsInternalBuild() &&
		  !FEngineBuildSettings::IsPerforceBuild() && 
		  !FPlatformMisc::IsDebuggerPresent() &&	// Don't spawn launcher while running in the Visual Studio debugger by default
		  !FApp::IsBenchmarking() &&
		  !GIsDemoMode && 
		  !IsRunningCommandlet() &&
		  !FPlatformProcess::IsApplicationRunning(TEXT("UnrealEngineLauncher") ) &&
		  !FPlatformProcess::IsApplicationRunning(TEXT("Unreal Engine Launcher") ) && 
		  !bForceLauncherToNotOpen ) )
	{
		IDesktopPlatform* DesktopPlatform = FDesktopPlatformModule::Get();
		if( DesktopPlatform != NULL )
		{
			DesktopPlatform->OpenLauncher( false, TEXT("") );
		}
	}

it goes in Editor.cpp, around line 370, in the InitEditor function.

For what it’s worth, the Launcher often taking over half a gig of memory and 15% of CPU is enough of a reason to not want it to constantly start up.

This is not a very good solution. There’s no reason to modify the engine code, just add PerforceBuild.txt to the right spot, as per my answer.

Well, mine is a solution, yours is a workaround. Solutions tend to take more effort. There is no telling which one is better however.

thanks man

Hello, and future viewers/readers looking to disable the annoying launcher each time you start UE4:

If you went ahead and put an empty “PerforceBuild.txt” in your /Engine/Build installation directory, you will have two minor issues:


You will lose the ability to do code compiling while in UE4 editor, and you will have to restart UE4 editor each time you modify a class property or add a new function.

You may also lose your project(s) if you opened them with the “PerforceBuild” flag set tot true. (Or the text file is placed.) The reason is the editor will launch the bleeding edge version (or the latest dev build from the Perforce source control management system) instead of the stable version, and will upgrade your project to that dev version. Once done so, you won’t be able to revert or downgrade from there.


The launcher may be an annoyance, but you will realize how quickly closing and opening the UE4 without the launcher can drain your time. I do not recommend you set the flag in your installation directory, unless you don’t mind restarting UE4 every now and then.

This has been tested on the latest stable version, UE 4.7.3, and the dev build version UE 4.7.3 - dev builds.

And THIS, is why I never settle for workarounds. Thanks for the info.

You will lose the ability to do code
compiling while in UE4 editor, and you
will have to restart UE4 editor each
time you modify a class property or
add a new function.

I don’t see this behaviour. Upon looking into it more the condition is !(GEngineVersion.IsPromotedBuild() && FEngineBuildSettings::IsPerforceBuild()) so you’re right there, if you’re a “promoted build” - you will see that behaviour. Good catch.

You may also lose your project(s) if
you opened them with the
“PerforceBuild” flag set tot true. (Or
the text file is placed.) The reason
is the editor will launch the bleeding
edge version (or the latest dev build
from the Perforce source control
management system) instead of the
stable version, and will upgrade your
project to that dev version. Once done
so, you won’t be able to revert or
downgrade from there.

This is complete nonsense. How does the editor launch “bleeding edge version”? You’ve pulled a revision and that’s the one it’s going to launch. Unless you’re at Epic, you don’t have a Perforce repository to pull from.

And yes, you’re right - it’s going to change your engine association. You know what that is? It’s one field in the .uproject that you can change how you like. For instance, this is mine:

“EngineAssociation”:
“{D124D247-4E78-EDA7-AF99-57B5E7F20764}”,

The UUID is for a source compiled engine. You can change that to whatever engine you like manually, or you can use the explorer context menu “Switch unreal engine version…” and it will change it for you.

It is nice to see people tweaking the engine to solve this, but what would be even nicer is to see these changes reflected in the actual release. Launching the launcher automatically is just bad design and workspace pollution. If I wanted the launcher I would have launched it. If I am opening an editor directly it obviously means I don’t want the launcher. This is the default behavior anyone would expect. I understand the desire to promote the marketplace and other things but this is not a nice thing for users.

Yeah, I figured as much, and since the tweak takes about 30 seconds (maybe less) to implement, I thought the lack of a command-line option must be intentional on Epic’s part, so I never created a pull request either. It’d still be nice to see something like this in the actual releases though, because building from source takes too much time and even as a programmer I’d still rather get the ready-made binaries.

Also because most people might want stay away from maintaining their own checkout. That being said I suppose if you get deep enough into your game development you will need to do it anyways.

That too. I haven’t yet found a reason to modify the source for any of my projects on UE4. You probably won’t need to unless you’re doing some sort of semi-AAA game, and not a lot of people do that. Personally I have yet to use UE4 for anything serious beside my BSc thesis.