IDesktopPlatform

Interface for functionality supported by desktop platforms

Windows
MacOS
Linux

References

Module

DesktopPlatform

Header

/Engine/Source/Developer/DesktopPlatform/Public/IDesktopPlatform.h

Include

#include "IDesktopPlatform.h"

Syntax

class IDesktopPlatform

Remarks

Interface for functionality supported by desktop platforms

Destructors

Name Description

Public function Virtual

~IDesktopPlatform()

Virtual destructor

Functions

Name Description

Public function

bool

 

CleanGameProject

(
    const FString& ProjectDir,
    FString& OutFailPath,
    FFeedbackContext* Warn
)

Cleans a game project. Removes the intermediate folder and binary build products.

Public function

bool

 

CompileGameProject

(
    const FString& RootDir,
    const FString& ProjectFileName,
    FFeedbackContext* Warn,
    ECompilationResult::Type* OutR...
)

Compiles a game project.

Public function

void

 

EnumerateEngineInstallations

(
    TMap< FString, FString >& OutInsta...
)

Enumerates all the registered engine installations.

Public function

void

 

EnumerateLauncherEngineInstallations

(
    TMap< FString, FString >& OutInsta...
)

Enumerates all the registered binary engine installations.

Public function

void

 

EnumerateLauncherSampleInstallations

(
    TArray< FString >& OutInstallation...
)

Enumerates all the samples installed by the launcher.

Public function

void

 

EnumerateLauncherSampleProjects

(
    TArray< FString >& OutFileNames
)

Enumerates all the sample projects installed by the launcher.

Public function

bool

 

EnumerateProjectsKnownByEngine

(
    const FString& Identifier,
    bool bIncludeNativeProjects,
    TArray< FString >& OutProjectFileN...
)

Finds all the projects which the engine (given by an identifier) has a record of.

Public function

bool

 

GenerateProjectFiles

(
    const FString& RootDir,
    const FString& ProjectFileName,
    FFeedbackContext* Warn,
    FString LogFilePath
)

Generates project files for the given project.

Public function

FString

 

GetCurrentEngineIdentifier()

Gets the identifier for the currently executing engine installation

Public function

bool

 

GetDefaultEngineIdentifier

(
    FString& OutIdentifier
)

Gets the identifier for the default engine. This will be the newest installed engine.

Public function

bool

 

GetDefaultEngineRootDir

(
    FString& OutRootDir
)

Gets the root directory for the default engine installation.

Public function

FString

 

GetDefaultProjectCreationPath()

Gets the default folder for creating new projects.

Public function

FString

 

GetEngineDescription

(
    const FString& Identifier
)

Returns a description for the engine with the given identifier.

Public function

bool

 

GetEngineIdentifierForProject

(
    const FString& ProjectFileName,
    FString& OutIdentifier
)

Gets the engine association for a project.

Public function

bool

 

GetEngineIdentifierFromRootDir

(
    const FString& RootDir,
    FString& OutIdentifier
)

Returns the identifier for the engine with the given root directory.

Public function

bool

 

GetEngineRootDirFromIdentifier

(
    const FString& Identifier,
    FString& OutRootDir
)

Returns the identifier for the engine with the given root directory.

Public function

FString

 

GetEngineSavedConfigDirectory

(
    const FString& Identifier
)

Gets the root directory for the engine's saved config files

Public function

FFeedbackCon...

 

GetNativeFeedbackContext()

Gets a feedback context which can display progress information using the native platform GUI.

Public function Const

const TArray...

 

GetTargetsForCurrentProject()

Gets information about the build targets supported by the current project.

Public function Const

const TArray...

 

GetTargetsForProject

(
    const FString& ProjectFile
)

Gets information about the build targets supported by a particular project.

Public function

FString

 

GetUserTempPath()

Gets the path to the user's temporary directory

Public function

FProcHandle

 

InvokeUnrealBuildToolAsync

(
    const FString& InCmdLineParams,
    FOutputDevice& Ar,
    void*& OutReadPipe,
    void*& OutWritePipe,
    bool bSkipBuildUBT
)

Launches UnrealBuildTool with the specified command line parameters

Public function

bool

 

InvokeUnrealBuildToolSync

(
    const FString& InCmdLineParams,
    FOutputDevice& Ar,
    bool bSkipBuildUBT,
    int32& OutReturnCode,
    FString& OutProcOutput
)

Invokes UnrealBuildTool with the given arguments

Public function

bool

 

IsPerforceBuild

(
    const FString& RootDir
)

Tests whether an engine installation is a perforce build.

Public function

bool

 

IsPreferredEngineIdentifier

(
    const FString& Identifier,
    const FString& OtherIdentifier
)

Compares two identifiers and checks whether the first is preferred to the second.

Public function

bool

 

IsSourceDistribution

(
    const FString& RootDir
)

Tests whether an engine installation is a source distribution.

Public function

bool

 

IsStockEngineRelease

(
    const FString& Identifier
)

Checks if the given engine identifier is for an stock engine release.

Public function

bool

 

IsUnrealBuildToolAvailable()

Determines whether UnrealBuildTool is available

Public function

bool

 

IsUnrealBuildToolRunning()

Checks if an instance of UnrealBuildTool is running.

Public function

bool

 

IsValidRootDirectory

(
    const FString& RootDir
)

Tests whether a root directory is a valid Unreal Engine installation

Public function

bool

 

OpenDirectoryDialog

(
    const void* ParentWindowHandle,
    const FString& DialogTitle,
    const FString& DefaultPath,
    FString& OutFolderName
)

Opens the "choose folder" dialog for the platform

Public function

bool

 

OpenFileDialog

(
    const void* ParentWindowHandle,
    const FString& DialogTitle,
    const FString& DefaultPath,
    const FString& DefaultFile,
    const FString& FileTypes,
    uint32 Flags,
    TArray< FString >& OutFilenames,
    int32& outFilterIndex
)

Opens the "open file" dialog for the platform

Public function

bool

 

OpenFileDialog

(
    const void* ParentWindowHandle,
    const FString& DialogTitle,
    const FString& DefaultPath,
    const FString& DefaultFile,
    const FString& FileTypes,
    uint32 Flags,
    TArray< FString >& OutFilenames
)

Opens the "open file" dialog for the platform

Public function

bool

 

OpenFontDialog

(
    const void* ParentWindowHandle,
    FString& OutFontName,
    float& OutHeight,
    EFontImportFlags& OutFlags
)

Opens the "choose font" dialog for the platform

Public function

bool

 

OpenProject

(
    const FString& ProjectFileName
)

Opens the given project with the appropriate editor. Tries to use the shell association.

Public function

bool

 

RegisterEngineInstallation

(
    const FString& RootDir,
    FString& OutIdentifier
)

Registers a directory as containing an engine installation

Public function

bool

 

RunUnrealBuildTool

(
    const FText& Description,
    const FString& RootDir,
    const FString& Arguments,
    FFeedbackContext* Warn
)

Runs UnrealBuildTool with the given arguments.

Public function

bool

 

RunUnrealBuildTool

(
    const FText& Description,
    const FString& RootDir,
    const FString& Arguments,
    FFeedbackContext* Warn,
    int32& OutExitCode
)

Runs UnrealBuildTool with the given arguments.

Public function

bool

 

SaveFileDialog

(
    const void* ParentWindowHandle,
    const FString& DialogTitle,
    const FString& DefaultPath,
    const FString& DefaultFile,
    const FString& FileTypes,
    uint32 Flags,
    TArray< FString >& OutFilenames
)

Opens the "save file" dialog for the platform

Public function

bool

 

SetEngineIdentifierForProject

(
    const FString& ProjectFileName,
    const FString& Identifier
)

Sets the engine association for a project.

Public function

bool

 

TryGetEngineVersion

(
    const FString& RootDir,
    FEngineVersion& OutVersion
)

Attempt to get the engine version from the supplied engine root directory.

Public function

bool

 

TryParseStockEngineVersion

(
    const FString& Identifier,
    FEngineVersion& OutVersion
)

Attempt to get the engine version from the supplied identifier

Public function

bool

 

UpdateFileAssociations()

Updates file associations.

Public function

bool

 

VerifyFileAssociations()

Checks that the current file associations are correct.

Deprecated Functions

Name Description

Public function

bool

 

GetSolutionPath

(
    FString& OutSolutionPath
)

The IDesktopPlatform::GetSolutionPath() method has been deprecated. Use the ISourceCodeAccessor interface for cross-IDE support instead.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss