UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ILauncherPlatform.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
6
8{
9public:
11
14 {
15 if ( !LauncherRelativeUrl.IsEmpty() )
16 {
17 bSilent = false;
18 }
19 }
20
30
31 FString GetLauncherUriRequest() const
32 {
33 FString LauncherUriRequest;
34 int RunningAppTimeout = 60;
35
36 GConfig->GetInt(TEXT("LauncherPlatform"), TEXT("RunningAppTimeout"), RunningAppTimeout, GEngineIni);
37
38 if ( LauncherRelativeUrl.IsEmpty() )
39 {
40 LauncherUriRequest = TEXT("com.epicgames.launcher:");
41 }
42 else
43 {
44 LauncherUriRequest = FString::Printf(TEXT("com.epicgames.launcher://%s"), *LauncherRelativeUrl);
45 }
46
47 // Append running app timeout arg.
48 if (LauncherUriRequest.Contains("?"))
49 {
51 }
52 else
53 {
55 }
56 LauncherUriRequest += FString::Printf(TEXT("runningapptimeout=%d"), RunningAppTimeout);
57
58 // Append silent query string arg.
59 if ( bSilent )
60 {
61 LauncherUriRequest += TEXT("&silent=true");
62 }
63
64 // Append action string if present
65 if (!Action.IsEmpty())
66 {
67 LauncherUriRequest += FString::Printf(TEXT("&action=%s"), *Action);
68 }
69
70 return LauncherUriRequest;
71 }
72
73public:
74
75 bool bInstall = false;
76 bool bSilent = true;
77 FString Action;
79};
80
81
83{
84public:
86 virtual ~ILauncherPlatform() {}
87
94 virtual bool CanOpenLauncher(bool Install) = 0;
95
104 virtual bool OpenLauncher(const FOpenLauncherOptions& Options) = 0;
105};
106
108{
109public:
112};
FString GEngineIni
Definition CoreGlobals.cpp:237
FConfigCacheIni * GConfig
Definition CoreGlobals.cpp:54
#define TEXT(x)
Definition Platform.h:1272
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
CORE_API bool GetInt(const TCHAR *Section, const TCHAR *Key, int32 &Value, const FString &Filename)
Definition ConfigCacheIni.cpp:5090
Definition ILauncherPlatform.h:108
static LAUNCHERPLATFORM_API FString GetEncodedExePath()
Definition ILauncherPlatform.cpp:9
Definition ILauncherPlatform.h:8
FOpenLauncherOptions(bool DoInstall, FString InLauncherRelativeUrl)
Definition ILauncherPlatform.h:21
FString Action
Definition ILauncherPlatform.h:77
bool bInstall
Definition ILauncherPlatform.h:75
bool bSilent
Definition ILauncherPlatform.h:76
FString LauncherRelativeUrl
Definition ILauncherPlatform.h:78
FString GetLauncherUriRequest() const
Definition ILauncherPlatform.h:31
FOpenLauncherOptions()
Definition ILauncherPlatform.h:10
FOpenLauncherOptions(FString InLauncherRelativeUrl)
Definition ILauncherPlatform.h:12
Definition ILauncherPlatform.h:83
virtual ~ILauncherPlatform()
Definition ILauncherPlatform.h:86
virtual bool OpenLauncher(const FOpenLauncherOptions &Options)=0
virtual bool CanOpenLauncher(bool Install)=0