You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
========================== MAJOR FEATURES + CHANGES ========================== Change 2718441 on 2015/10/06 by Ben.Marsh@Ben.Marsh_T3245_Stream Allow nodes to be added with an "explicit" frequency, meaning that they'll only be part of manually triggered builds (not CIS). Change 2718698 on 2015/10/06 by Ben.Marsh@Ben.Marsh_T3245_Stream Add a type of node that can execute an arbitrary sequence of tasks, and allow constructing graphs of such nodes from an XML file. Change 2723013 on 2015/10/09 by Ben.Marsh@Ben.Marsh_T3245_Stream Small utility to quickly capture a workspace, or delete files to restore the workspace to a previously captured state (and output a p4 sync list to restore it) Change 2744521 on 2015/10/28 by Matthew.Griffin@Matthew.Griffin_G5772_BuildStream Adding config entries to determine which platforms/configurations are available Currently only written out as part of the Rocket Build process but could be done elsewhere for other types of installed build. A near identical singleton class is used in both C++ and C# to load the config section and check whether configuration/platform combinations are valid. Change 2773723 on 2015/11/19 by Ben.Marsh@Ben.Marsh_T3245_Stream Copying UnrealGameSync into Engine/Source/Programs. Change 2773914 on 2015/11/19 by Ben.Marsh@Ben.Marsh_T3245_Stream PR #1687: [GitDependencies] New feature: ignore file support (.gitdepsignore) (Contributed by nbjk667) Change 2775317 on 2015/11/20 by Ben.Marsh@Ben.Marsh_T3245_Stream Add a -listtps option to UBT, which will find all the TPS files in any directory that's compiled into a target. Change 2780832 on 2015/11/25 by Ben.Marsh@Ben.Marsh_T3245_Stream Allow compiling a single file in UBT. Pass -singlefile=<Path> on command line to UBT to use. Change 2781071 on 2015/11/25 by Ben.Marsh@Ben.Marsh_T3245_Stream Precompile all valid engine modules for Rocket by default. Modules may set the PrecompileForTargets field to control which configurations they should be compiled for. Modules which currently fail to compile have this set to PrecompileTargetsType.None. #codereview Matthew.Griffin Change 2784469 on 2015/12/01 by Matthew.Griffin@Matthew.Griffin_G5772_BuildStream Added -FastPDB commandline parameter for UBT, so that we can make use of the /DEBUG:FASTLINK option in VS2015 Change 2784722 on 2015/12/01 by Matthew.Griffin@Matthew.Griffin_G5772_BuildStream Made -FastPDB option part of BuildConfiguration instead of checking commandline at each place it's used. Also added option to override if someone doesn't want it automatically added to their project files. Change 2787501 on 2015/12/02 by Ben.Marsh@Ben.Marsh_T3245_Stream Restore change to gather VC environment directly from registry. #lockdown Nick.Penwarden [CL 2790002 by Ben Marsh in Main branch]
214 lines
21 KiB
C++
214 lines
21 KiB
C++
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "DesktopPlatformPrivatePCH.h"
|
|
#include "PlatformInfo.h"
|
|
|
|
#define LOCTEXT_NAMESPACE "PlatformInfo"
|
|
|
|
namespace PlatformInfo
|
|
{
|
|
|
|
namespace
|
|
{
|
|
|
|
FPlatformInfo BuildPlatformInfo(const FName& InPlatformInfoName, const FName& InTargetPlatformName, const FText& InDisplayName, const EPlatformType InPlatformType, const EPlatformFlags::Flags InPlatformFlags, const FPlatformIconPaths& InIconPaths, const FString& InUATCommandLine, const FString& InAutoSDKPath, EPlatformSDKStatus InStatus, const FString& InTutorial, bool InEnabled, FString InBinaryFolderName, bool InUsesHostCompiler, bool InUATClosesAfterLaunch)
|
|
{
|
|
FPlatformInfo PlatformInfo;
|
|
|
|
PlatformInfo.PlatformInfoName = InPlatformInfoName;
|
|
PlatformInfo.TargetPlatformName = InTargetPlatformName;
|
|
|
|
// See if this name also contains a flavor
|
|
const FString InPlatformInfoNameString = InPlatformInfoName.ToString();
|
|
{
|
|
int32 UnderscoreLoc;
|
|
if(InPlatformInfoNameString.FindChar(TEXT('_'), UnderscoreLoc))
|
|
{
|
|
PlatformInfo.VanillaPlatformName = *InPlatformInfoNameString.Mid(0, UnderscoreLoc);
|
|
PlatformInfo.PlatformFlavor = *InPlatformInfoNameString.Mid(UnderscoreLoc + 1);
|
|
}
|
|
else
|
|
{
|
|
PlatformInfo.VanillaPlatformName = InPlatformInfoName;
|
|
}
|
|
}
|
|
|
|
PlatformInfo.DisplayName = InDisplayName;
|
|
PlatformInfo.PlatformType = InPlatformType;
|
|
PlatformInfo.PlatformFlags = InPlatformFlags;
|
|
PlatformInfo.IconPaths = InIconPaths;
|
|
PlatformInfo.UATCommandLine = InUATCommandLine;
|
|
PlatformInfo.AutoSDKPath = InAutoSDKPath;
|
|
PlatformInfo.BinaryFolderName = InBinaryFolderName;
|
|
|
|
// Generate the icon style names for FEditorStyle
|
|
PlatformInfo.IconPaths.NormalStyleName = *FString::Printf(TEXT("Launcher.Platform_%s"), *InPlatformInfoNameString);
|
|
PlatformInfo.IconPaths.LargeStyleName = *FString::Printf(TEXT("Launcher.Platform_%s.Large"), *InPlatformInfoNameString);
|
|
PlatformInfo.IconPaths.XLargeStyleName = *FString::Printf(TEXT("Launcher.Platform_%s.XLarge"), *InPlatformInfoNameString);
|
|
|
|
// SDK data
|
|
PlatformInfo.SDKStatus = InStatus;
|
|
PlatformInfo.SDKTutorial = InTutorial;
|
|
|
|
// Distribution data
|
|
PlatformInfo.bEnabledForUse = InEnabled;
|
|
PlatformInfo.bUsesHostCompiler = InUsesHostCompiler;
|
|
PlatformInfo.bUATClosesAfterLaunch = InUATClosesAfterLaunch;
|
|
|
|
return PlatformInfo;
|
|
}
|
|
|
|
#if PLATFORM_WINDOWS
|
|
static const bool IsAvailableOnWindows = true;
|
|
static const bool IsAvailableOnMac = false;
|
|
static const bool IsAvailableOnLinux = false;
|
|
static const FString IOSTutorial = TEXT("/Engine/Tutorial/Mobile/InstallingiTunesTutorial.InstallingiTunesTutorial");
|
|
#elif PLATFORM_MAC
|
|
static const bool IsAvailableOnWindows = false;
|
|
static const bool IsAvailableOnMac = true;
|
|
static const bool IsAvailableOnLinux = false;
|
|
static const FString IOSTutorial = TEXT("/Engine/Tutorial/Installation/InstallingXCodeTutorial.InstallingXCodeTutorial");
|
|
#elif PLATFORM_LINUX
|
|
static const bool IsAvailableOnWindows = false;
|
|
static const bool IsAvailableOnMac = false;
|
|
static const bool IsAvailableOnLinux = true;
|
|
static const FString IOSTutorial = TEXT("/Engine/Tutorial/NotYetImplemented");
|
|
#endif
|
|
|
|
static const FPlatformInfo PlatformInfoArray[] = {
|
|
// PlatformInfoName TargetPlatformName DisplayName PlatformType PlatformFlags IconPaths UATCommandLine AutoSDKPath SDKStatus SDKTutorial EnabledForUse BinaryFolderName UsesHostCompiler UATClosesAfterLaunch
|
|
BuildPlatformInfo(TEXT("WindowsNoEditor"), TEXT("WindowsNoEditor"), LOCTEXT("WindowsNoEditor", "Windows"), EPlatformType::Game, EPlatformFlags::None, FPlatformIconPaths(TEXT("Launcher/WindowsTarget/Platform_WindowsNoEditor_24x"), TEXT("Launcher/WindowsTarget/Platform_WindowsNoEditor_128x")), TEXT("-targetplatform=Win64"), TEXT(""), EPlatformSDKStatus::Unknown, TEXT("/Engine/Tutorial/Installation/InstallingVisualStudioTutorial.InstallingVisualStudioTutorial"), IsAvailableOnWindows, TEXT("Win64"), IsAvailableOnWindows, true),
|
|
BuildPlatformInfo(TEXT("WindowsNoEditor_Win32"), TEXT("WindowsNoEditor"), LOCTEXT("WindowsNoEditor_Win32", "Windows (32-bit)"), EPlatformType::Game, EPlatformFlags::BuildFlavor, FPlatformIconPaths(TEXT("Launcher/WindowsTarget/Platform_WindowsNoEditor_24x"), TEXT("Launcher/WindowsTarget/Platform_WindowsNoEditor_128x")), TEXT("-targetplatform=Win32"), TEXT(""), EPlatformSDKStatus::Unknown, TEXT("/Engine/Tutorial/Installation/InstallingVisualStudioTutorial.InstallingVisualStudioTutorial"), IsAvailableOnWindows, TEXT("Win32"), IsAvailableOnWindows, true),
|
|
BuildPlatformInfo(TEXT("WindowsNoEditor_Win64"), TEXT("WindowsNoEditor"), LOCTEXT("WindowsNoEditor_Win64", "Windows (64-bit)"), EPlatformType::Game, EPlatformFlags::BuildFlavor, FPlatformIconPaths(TEXT("Launcher/WindowsTarget/Platform_WindowsNoEditor_24x"), TEXT("Launcher/WindowsTarget/Platform_WindowsNoEditor_128x")), TEXT("-targetplatform=Win64"), TEXT(""), EPlatformSDKStatus::Unknown, TEXT("/Engine/Tutorial/Installation/InstallingVisualStudioTutorial.InstallingVisualStudioTutorial"), IsAvailableOnWindows, TEXT("Win64"), IsAvailableOnWindows, true),
|
|
BuildPlatformInfo(TEXT("Windows"), TEXT("Windows"), LOCTEXT("WindowsEditor", "Windows (Editor)"), EPlatformType::Editor, EPlatformFlags::None, FPlatformIconPaths(TEXT("Launcher/WindowsTarget/Platform_Windows_24x"), TEXT("Launcher/WindowsTarget/Platform_Windows_128x")), TEXT(""), TEXT(""), EPlatformSDKStatus::Unknown, TEXT("/Engine/Tutorial/Installation/InstallingVisualStudioTutorial.InstallingVisualStudioTutorial"), IsAvailableOnWindows, TEXT("Win64"), IsAvailableOnWindows, true),
|
|
BuildPlatformInfo(TEXT("WindowsClient"), TEXT("WindowsClient"), LOCTEXT("WindowsClient", "Windows (Client-only)"), EPlatformType::Client, EPlatformFlags::None, FPlatformIconPaths(TEXT("Launcher/WindowsTarget/Platform_Windows_24x"), TEXT("Launcher/WindowsTarget/Platform_Windows_128x")), TEXT(""), TEXT(""), EPlatformSDKStatus::Unknown, TEXT("/Engine/Tutorial/Installation/InstallingVisualStudioTutorial.InstallingVisualStudioTutorial"), IsAvailableOnWindows, TEXT("Win64"), IsAvailableOnWindows, true),
|
|
BuildPlatformInfo(TEXT("WindowsServer"), TEXT("WindowsServer"), LOCTEXT("WindowsServer", "Windows (Dedicated Server)"), EPlatformType::Server, EPlatformFlags::None, FPlatformIconPaths(TEXT("Launcher/WindowsTarget/Platform_WindowsServer_24x"), TEXT("Launcher/WindowsTarget/Platform_WindowsServer_128x")), TEXT(""), TEXT(""), EPlatformSDKStatus::Unknown, TEXT("/Engine/Tutorial/Installation/InstallingVisualStudioTutorial.InstallingVisualStudioTutorial"), IsAvailableOnWindows, TEXT("Win64"), IsAvailableOnWindows, true),
|
|
|
|
BuildPlatformInfo(TEXT("MacNoEditor"), TEXT("MacNoEditor"), LOCTEXT("MacNoEditor", "Mac"), EPlatformType::Game, EPlatformFlags::None, FPlatformIconPaths(TEXT("Launcher/MacTarget/Platform_Mac_24x"), TEXT("Launcher/MacTarget/Platform_Mac_128x")), TEXT("-targetplatform=Mac"), TEXT(""), EPlatformSDKStatus::Unknown, TEXT("/Engine/Tutorial/Installation/InstallingXCodeTutorial.InstallingXCodeTutorial"), IsAvailableOnMac, TEXT("Mac"), IsAvailableOnMac, true),
|
|
BuildPlatformInfo(TEXT("Mac"), TEXT("Mac"), LOCTEXT("MacEditor", "Mac (Editor)"), EPlatformType::Editor, EPlatformFlags::None, FPlatformIconPaths(TEXT("Launcher/MacTarget/Platform_Mac_24x"), TEXT("Launcher/MacTarget/Platform_Mac_128x")), TEXT(""), TEXT(""), EPlatformSDKStatus::Unknown, TEXT("/Engine/Tutorial/Installation/InstallingXCodeTutorial.InstallingXCodeTutorial"), IsAvailableOnMac, TEXT("Mac"), IsAvailableOnMac, true),
|
|
BuildPlatformInfo(TEXT("MacClient"), TEXT("MacClient"), LOCTEXT("MacClient", "Mac (Client-only)"), EPlatformType::Client, EPlatformFlags::None, FPlatformIconPaths(TEXT("Launcher/MacTarget/Platform_Mac_24x"), TEXT("Launcher/MacTarget/Platform_Mac_128x")), TEXT(""), TEXT(""), EPlatformSDKStatus::Unknown, TEXT("/Engine/Tutorial/Installation/InstallingXCodeTutorial.InstallingXCodeTutorial"), IsAvailableOnMac, TEXT("Mac"), IsAvailableOnMac, true),
|
|
BuildPlatformInfo(TEXT("MacServer"), TEXT("MacServer"), LOCTEXT("MacServer", "Mac (Dedicated Server)"), EPlatformType::Server, EPlatformFlags::None, FPlatformIconPaths(TEXT("Launcher/MacTarget/Platform_Mac_24x"), TEXT("Launcher/MacTarget/Platform_Mac_128x")), TEXT(""), TEXT(""), EPlatformSDKStatus::Unknown, TEXT("/Engine/Tutorial/Installation/InstallingXCodeTutorial.InstallingXCodeTutorial"), IsAvailableOnMac, TEXT("Mac"), IsAvailableOnMac, true),
|
|
|
|
BuildPlatformInfo(TEXT("LinuxNoEditor"), TEXT("LinuxNoEditor"), LOCTEXT("LinuxNoEditor", "Linux"), EPlatformType::Game, EPlatformFlags::None, FPlatformIconPaths(TEXT("Launcher/LinuxTarget/Platform_Linux_24x"), TEXT("Launcher/LinuxTarget/Platform_Linux_128x")), TEXT("-targetplatform=Linux"), TEXT("Linux_x64"), EPlatformSDKStatus::Unknown, TEXT("/Platforms/Linux/GettingStarted"), IsAvailableOnLinux || IsAvailableOnWindows, TEXT("Linux"), IsAvailableOnLinux, true),
|
|
BuildPlatformInfo(TEXT("Linux"), TEXT("Linux"), LOCTEXT("LinuxEditor", "Linux (Editor)"), EPlatformType::Editor, EPlatformFlags::None, FPlatformIconPaths(TEXT("Launcher/LinuxTarget/Platform_Linux_24x"), TEXT("Launcher/LinuxTarget/Platform_Linux_128x")), TEXT(""), TEXT("Linux_x64"), EPlatformSDKStatus::Unknown, TEXT("/Platforms/Linux/GettingStarted"), IsAvailableOnLinux, TEXT("Linux"), IsAvailableOnLinux, true),
|
|
BuildPlatformInfo(TEXT("LinuxClient"), TEXT("LinuxClient"), LOCTEXT("LinuxClient", "Linux (Client-only)"), EPlatformType::Client, EPlatformFlags::None, FPlatformIconPaths(TEXT("Launcher/LinuxTarget/Platform_Linux_24x"), TEXT("Launcher/LinuxTarget/Platform_Linux_128x")), TEXT(""), TEXT("Linux_x64"), EPlatformSDKStatus::Unknown, TEXT("/Platforms/Linux/GettingStarted"), IsAvailableOnLinux || IsAvailableOnWindows, TEXT("Linux"), IsAvailableOnLinux, true),
|
|
BuildPlatformInfo(TEXT("LinuxServer"), TEXT("LinuxServer"), LOCTEXT("LinuxServer", "Linux (Dedicated Server)"), EPlatformType::Server, EPlatformFlags::None, FPlatformIconPaths(TEXT("Launcher/LinuxTarget/Platform_Linux_24x"), TEXT("Launcher/LinuxTarget/Platform_Linux_128x")), TEXT(""), TEXT("Linux_x64"), EPlatformSDKStatus::Unknown, TEXT("/Platforms/Linux/GettingStarted"), IsAvailableOnLinux || IsAvailableOnWindows, TEXT("Linux"), IsAvailableOnLinux, true),
|
|
|
|
BuildPlatformInfo(TEXT("IOS"), TEXT("IOS"), LOCTEXT("IOS", "iOS"), EPlatformType::Game, EPlatformFlags::None, FPlatformIconPaths(TEXT("Launcher/iOSTarget/Platform_iOS_24x"), TEXT("Launcher/iOSTarget/Platform_iOS_128x")), TEXT(""), TEXT(""), EPlatformSDKStatus::Unknown, IOSTutorial, IsAvailableOnWindows || IsAvailableOnMac, TEXT("IOS"), false, true),
|
|
|
|
BuildPlatformInfo(TEXT("Android"), TEXT("Android"), LOCTEXT("Android", "Android"), EPlatformType::Game, EPlatformFlags::None, FPlatformIconPaths(TEXT("Launcher/AndroidTarget/Platform_Android_24x"), TEXT("Launcher/AndroidTarget/Platform_Android_128x")), TEXT(""), TEXT("Android"), EPlatformSDKStatus::Unknown, TEXT("/Engine/Tutorial/Mobile/SettingUpAndroidTutorial.SettingUpAndroidTutorial"), IsAvailableOnWindows || IsAvailableOnMac, TEXT("Android"), false, true),
|
|
BuildPlatformInfo(TEXT("Android_All"), TEXT("Android"), LOCTEXT("Android_All", "Android (All)"), EPlatformType::Game, EPlatformFlags::CookFlavor, FPlatformIconPaths(TEXT("Launcher/AndroidTarget/Platform_Android_24x"), TEXT("Launcher/AndroidTarget/Platform_Android_128x")), TEXT(""), TEXT("Android"), EPlatformSDKStatus::Unknown, TEXT("/Engine/Tutorial/Mobile/SettingUpAndroidTutorial.SettingUpAndroidTutorial"), IsAvailableOnWindows || IsAvailableOnMac, TEXT("Android"), false, true),
|
|
BuildPlatformInfo(TEXT("Android_Multi"), TEXT("Android_Multi"), LOCTEXT("Android_Multi", "Android (Multi)"), EPlatformType::Game, EPlatformFlags::CookFlavor, FPlatformIconPaths(TEXT("Launcher/AndroidTarget/Platform_Android_24x"), TEXT("Launcher/AndroidTarget/Platform_Android_128x")), TEXT("-targetplatform=Android -cookflavor=Multi"), TEXT("Android"), EPlatformSDKStatus::Unknown, TEXT("/Engine/Tutorial/Mobile/SettingUpAndroidTutorial.SettingUpAndroidTutorial"), IsAvailableOnWindows || IsAvailableOnMac, TEXT("Android"), false, true),
|
|
BuildPlatformInfo(TEXT("Android_ATC"), TEXT("Android_ATC"), LOCTEXT("Android_ATC", "Android (ATC)"), EPlatformType::Game, EPlatformFlags::CookFlavor, FPlatformIconPaths(TEXT("Launcher/AndroidTarget/Platform_Android_ATC_24x"), TEXT("Launcher/AndroidTarget/Platform_Android_128x")), TEXT("-targetplatform=Android -cookflavor=ATC"), TEXT("Android"), EPlatformSDKStatus::Unknown, TEXT("/Engine/Tutorial/Mobile/SettingUpAndroidTutorial.SettingUpAndroidTutorial"), IsAvailableOnWindows || IsAvailableOnMac, TEXT("Android"), false, true),
|
|
BuildPlatformInfo(TEXT("Android_DXT"), TEXT("Android_DXT"), LOCTEXT("Android_DXT", "Android (DXT)"), EPlatformType::Game, EPlatformFlags::CookFlavor, FPlatformIconPaths(TEXT("Launcher/AndroidTarget/Platform_Android_DXT_24x"), TEXT("Launcher/AndroidTarget/Platform_Android_128x")), TEXT("-targetplatform=Android -cookflavor=DXT"), TEXT("Android"), EPlatformSDKStatus::Unknown, TEXT("/Engine/Tutorial/Mobile/SettingUpAndroidTutorial.SettingUpAndroidTutorial"), IsAvailableOnWindows || IsAvailableOnMac, TEXT("Android"), false, true),
|
|
BuildPlatformInfo(TEXT("Android_ETC1"), TEXT("Android_ETC1"), LOCTEXT("Android_ETC1", "Android (ETC1)"), EPlatformType::Game, EPlatformFlags::CookFlavor, FPlatformIconPaths(TEXT("Launcher/AndroidTarget/Platform_Android_ETC1_24x"), TEXT("Launcher/AndroidTarget/Platform_Android_128x")), TEXT("-targetplatform=Android -cookflavor=ETC1"), TEXT("Android"), EPlatformSDKStatus::Unknown, TEXT("/Engine/Tutorial/Mobile/SettingUpAndroidTutorial.SettingUpAndroidTutorial"), IsAvailableOnWindows || IsAvailableOnMac, TEXT("Android"), false, true),
|
|
BuildPlatformInfo(TEXT("Android_ETC2"), TEXT("Android_ETC2"), LOCTEXT("Android_ETC2", "Android (ETC2)"), EPlatformType::Game, EPlatformFlags::CookFlavor, FPlatformIconPaths(TEXT("Launcher/AndroidTarget/Platform_Android_ETC2_24x"), TEXT("Launcher/AndroidTarget/Platform_Android_128x")), TEXT("-targetplatform=Android -cookflavor=ETC2"), TEXT("Android"), EPlatformSDKStatus::Unknown, TEXT("/Engine/Tutorial/Mobile/SettingUpAndroidTutorial.SettingUpAndroidTutorial"), IsAvailableOnWindows || IsAvailableOnMac, TEXT("Android"), false, true),
|
|
BuildPlatformInfo(TEXT("Android_PVRTC"), TEXT("Android_PVRTC"), LOCTEXT("Android_PVRTC", "Android (PVRTC)"), EPlatformType::Game, EPlatformFlags::CookFlavor, FPlatformIconPaths(TEXT("Launcher/AndroidTarget/Platform_Android_PVRTC_24x"), TEXT("Launcher/AndroidTarget/Platform_Android_128x")), TEXT("-targetplatform=Android -cookflavor=PVRTC"), TEXT("Android"), EPlatformSDKStatus::Unknown, TEXT("/Engine/Tutorial/Mobile/SettingUpAndroidTutorial.SettingUpAndroidTutorial"), IsAvailableOnWindows || IsAvailableOnMac, TEXT("Android"), false, true),
|
|
BuildPlatformInfo(TEXT("Android_ASTC"), TEXT("Android_ASTC"), LOCTEXT("Android_ASTC", "Android (ASTC)"), EPlatformType::Game, EPlatformFlags::CookFlavor, FPlatformIconPaths(TEXT("Launcher/AndroidTarget/Platform_Android_ASTC_24x"), TEXT("Launcher/AndroidTarget/Platform_Android_128x")), TEXT("-targetplatform=Android -cookflavor=ASTC"), TEXT("Android"), EPlatformSDKStatus::Unknown, TEXT("/Engine/Tutorial/Mobile/SettingUpAndroidTutorial.SettingUpAndroidTutorial"), IsAvailableOnWindows || IsAvailableOnMac, TEXT("Android"), false, true),
|
|
|
|
BuildPlatformInfo(TEXT("HTML5"), TEXT("HTML5"), LOCTEXT("HTML5", "HTML5"), EPlatformType::Game, EPlatformFlags::None, FPlatformIconPaths(TEXT("Launcher/HTML5Target/Platform_HTML5_24x"), TEXT("Launcher/HTML5Target/Platform_HTML5_128x")), TEXT(""), TEXT("HTML5"), EPlatformSDKStatus::Unknown, TEXT("/Platforms/HTML5/GettingStarted"), IsAvailableOnWindows || IsAvailableOnMac, TEXT("HTML5"), false, true),
|
|
|
|
BuildPlatformInfo(TEXT("PS4"), TEXT("PS4"), LOCTEXT("PS4", "PlayStation 4"), EPlatformType::Game, EPlatformFlags::None, FPlatformIconPaths(TEXT("Launcher/PS4Target/Platform_PS4_24x"), TEXT("Launcher/PS4Target/Platform_PS4_128x")), TEXT(""), TEXT("PS4"), EPlatformSDKStatus::Unknown, TEXT("/Platforms/PS4/GettingStarted"), IsAvailableOnWindows, TEXT("PS4"), false, false),
|
|
|
|
BuildPlatformInfo(TEXT("XboxOne"), TEXT("XboxOne"), LOCTEXT("XboxOne", "Xbox One"), EPlatformType::Game, EPlatformFlags::None, FPlatformIconPaths(TEXT("Launcher/XboxOneTarget/Platform_XboxOne_24x"), TEXT("Launcher/XboxOneTarget/Platform_XboxOne_128x")), TEXT(""), TEXT("XboxOne"), EPlatformSDKStatus::Unknown, TEXT("/Platforms/XboxOne/GettingStarted"), IsAvailableOnWindows, TEXT("XboxOne"), false, true),
|
|
|
|
BuildPlatformInfo(TEXT("AllDesktop"), TEXT("AllDesktop"), LOCTEXT("DesktopTargetPlatDisplay", "Desktop (Win+Mac+Linux)"), EPlatformType::Game, EPlatformFlags::None, FPlatformIconPaths(TEXT("Launcher/DesktopTarget/Platform_Desktop_24x"), TEXT("Launcher/DesktopTarget/Platform_Desktop_128x")), TEXT(""), TEXT(""), EPlatformSDKStatus::Unknown, TEXT(""), false/* see SProjectTargetPlatformSettings::Construct !!!! IsAvailableOnWindows || IsAvailableOnMac || IsAvailableOnLinux*/, TEXT(""), false, true),
|
|
|
|
//BuildPlatformInfo(TEXT("WinRT"), TEXT("WinRT"), LOCTEXT("WinRT", "Windows RT"), EPlatformType::Game, EPlatformFlags::None, FPlatformIconPaths(TEXT("Launcher/WindowsTarget/Platform_WindowsNoEditor_24x"), TEXT("Launcher/WindowsTarget/Platform_WindowsNoEditor_128x")), TEXT("")),
|
|
};
|
|
|
|
} // anonymous namespace
|
|
|
|
const FPlatformInfo* FindPlatformInfo(const FName& InPlatformName)
|
|
{
|
|
for(const FPlatformInfo& PlatformInfo : PlatformInfoArray)
|
|
{
|
|
if(PlatformInfo.PlatformInfoName == InPlatformName)
|
|
{
|
|
return &PlatformInfo;
|
|
}
|
|
}
|
|
return nullptr;
|
|
}
|
|
|
|
const FPlatformInfo* FindVanillaPlatformInfo(const FName& InPlatformName)
|
|
{
|
|
const FPlatformInfo* const FoundInfo = FindPlatformInfo(InPlatformName);
|
|
return (FoundInfo) ? (FoundInfo->IsVanilla()) ? FoundInfo : FindPlatformInfo(FoundInfo->VanillaPlatformName) : nullptr;
|
|
}
|
|
|
|
const FPlatformInfo* GetPlatformInfoArray(int32& OutNumPlatforms)
|
|
{
|
|
OutNumPlatforms = ARRAY_COUNT(PlatformInfoArray);
|
|
return PlatformInfoArray;
|
|
}
|
|
|
|
void UpdatePlatformSDKStatus(FString InPlatformName, EPlatformSDKStatus InStatus)
|
|
{
|
|
for(const FPlatformInfo& PlatformInfo : PlatformInfoArray)
|
|
{
|
|
if(PlatformInfo.VanillaPlatformName == FName(*InPlatformName))
|
|
{
|
|
const_cast<FPlatformInfo&>(PlatformInfo).SDKStatus = InStatus;
|
|
}
|
|
}
|
|
}
|
|
|
|
void UpdatePlatformDisplayName(FString InPlatformName, FText InDisplayName)
|
|
{
|
|
for (const FPlatformInfo& PlatformInfo : PlatformInfoArray)
|
|
{
|
|
if (PlatformInfo.TargetPlatformName == FName(*InPlatformName))
|
|
{
|
|
const_cast<FPlatformInfo&>(PlatformInfo).DisplayName = InDisplayName;
|
|
}
|
|
}
|
|
}
|
|
|
|
FPlatformEnumerator EnumeratePlatformInfoArray()
|
|
{
|
|
return FPlatformEnumerator(PlatformInfoArray, ARRAY_COUNT(PlatformInfoArray));
|
|
}
|
|
|
|
TArray<FVanillaPlatformEntry> BuildPlatformHierarchy(const EPlatformFilter InFilter)
|
|
{
|
|
TArray<FVanillaPlatformEntry> VanillaPlatforms;
|
|
|
|
// Build up a tree from the platforms we support (vanilla outers, with a list of flavors)
|
|
// PlatformInfoArray should be ordered in such a way that the vanilla platforms always appear before their flavors
|
|
for(const FPlatformInfo& PlatformInfo : PlatformInfoArray)
|
|
{
|
|
if(PlatformInfo.IsVanilla())
|
|
{
|
|
VanillaPlatforms.Add(FVanillaPlatformEntry(&PlatformInfo));
|
|
}
|
|
else
|
|
{
|
|
const bool bHasBuildFlavor = !!(PlatformInfo.PlatformFlags & EPlatformFlags::BuildFlavor);
|
|
const bool bHasCookFlavor = !!(PlatformInfo.PlatformFlags & EPlatformFlags::CookFlavor);
|
|
|
|
const bool bValidFlavor =
|
|
InFilter == EPlatformFilter::All ||
|
|
(InFilter == EPlatformFilter::BuildFlavor && bHasBuildFlavor) ||
|
|
(InFilter == EPlatformFilter::CookFlavor && bHasCookFlavor);
|
|
|
|
if(bValidFlavor)
|
|
{
|
|
const FName VanillaPlatformName = PlatformInfo.VanillaPlatformName;
|
|
FVanillaPlatformEntry* const VanillaEntry = VanillaPlatforms.FindByPredicate([VanillaPlatformName](const FVanillaPlatformEntry& Item) -> bool
|
|
{
|
|
return Item.PlatformInfo->PlatformInfoName == VanillaPlatformName;
|
|
});
|
|
check(VanillaEntry);
|
|
VanillaEntry->PlatformFlavors.Add(&PlatformInfo);
|
|
}
|
|
}
|
|
}
|
|
|
|
return VanillaPlatforms;
|
|
}
|
|
|
|
} // namespace PlatformFamily
|
|
|
|
#undef LOCTEXT_NAMESPACE
|