Files
UnrealEngineUWP/Engine/Source/Editor/GameProjectGeneration/Private/GameProjectGenerationModule.cpp
Jamie Dale 0cfe5f0651 Added PlatformInfo to DesktopPlatform and improved the editors Supported Platform UI
TTP# 337136 - SETTINGS: Target Platform settings polish
TTP# 337652 - EDITOR: Limit Project supported Android icons down to 1
TTP# 337650 - EDITOR: There is only 1 icon for Apple for Project Supported Platforms

DesktopPlatform now contains a static array of FPlatformInfo. This can be used to query UE4 about its available platforms, even when they're not available as a target platform.

FPlatformInfo contains the information required by the editor (such as a localized display name and icon), as well as whether a platform is a variation ("flavor") of another, and if so, whether the flavor affects the build output (eg, Win32 or Win64), or the cook output (eg, Android_XYZ). This lets the editor build up nested menus for the "Package Project" and "Cook Project" options, rather than just showing everything as a flat list.

ReviewedBy Thomas.Sarkanen, Max.Preussner

[CL 2095796 by Jamie Dale in Main branch]
2014-06-05 12:13:44 -04:00

98 lines
2.6 KiB
C++

// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
#include "GameProjectGenerationPrivatePCH.h"
#include "ModuleManager.h"
#include "GameProjectGenerationModule.h"
IMPLEMENT_MODULE( FGameProjectGenerationModule, GameProjectGeneration );
DEFINE_LOG_CATEGORY(LogGameProjectGeneration);
#define LOCTEXT_NAMESPACE "GameProjectGeneration"
void FGameProjectGenerationModule::StartupModule()
{
}
void FGameProjectGenerationModule::ShutdownModule()
{
}
TSharedRef<class SWidget> FGameProjectGenerationModule::CreateGameProjectDialog(bool bAllowProjectOpening, bool bAllowProjectCreate)
{
return SNew(SGameProjectDialog)
.AllowProjectOpening(bAllowProjectOpening)
.AllowProjectCreate(bAllowProjectCreate);
}
TSharedRef<class SWidget> FGameProjectGenerationModule::CreateNewClassDialog(class UClass* InClass)
{
return SNew(SNewClassDialog).Class(InClass);
}
void FGameProjectGenerationModule::OpenAddCodeToProjectDialog()
{
GameProjectUtils::OpenAddCodeToProjectDialog();
AddCodeToProjectDialogOpenedEvent.Broadcast();
}
void FGameProjectGenerationModule::CheckForOutOfDateGameProjectFile()
{
GameProjectUtils::CheckForOutOfDateGameProjectFile();
}
bool FGameProjectGenerationModule::UpdateGameProject(const FString& EngineIdentifier)
{
return GameProjectUtils::UpdateGameProject(EngineIdentifier);
}
bool FGameProjectGenerationModule::UpdateCodeProject(FText& OutFailReason)
{
const bool bAllowNewSlowTask = true;
FStatusMessageContext SlowTaskMessage( LOCTEXT( "UpdatingCodeProject", "Updating code project..." ), bAllowNewSlowTask );
return GameProjectUtils::GenerateCodeProjectFiles(FPaths::GetProjectFilePath(), OutFailReason);
}
int32 FGameProjectGenerationModule::GetProjectCodeFileCount()
{
return GameProjectUtils::GetProjectCodeFileCount();
}
bool FGameProjectGenerationModule::UpdateCodeResourceFiles(TArray<FString>& OutCreatedFiles, FText& OutFailReason)
{
const FString GameModuleSourcePath = FPaths::GetPath(FPaths::GetProjectFilePath()) / TEXT("Source") / FApp::GetGameName();
return GameProjectUtils::GenerateGameResourceFiles(GameModuleSourcePath, FApp::GetGameName(), OutCreatedFiles, OutFailReason);
}
void FGameProjectGenerationModule::CheckAndWarnProjectFilenameValid()
{
GameProjectUtils::CheckAndWarnProjectFilenameValid();
}
void FGameProjectGenerationModule::UpdateSupportedTargetPlatforms(const FName& InPlatformName, const bool bIsSupported)
{
GameProjectUtils::UpdateSupportedTargetPlatforms(InPlatformName, bIsSupported);
}
void FGameProjectGenerationModule::ClearSupportedTargetPlatforms()
{
GameProjectUtils::ClearSupportedTargetPlatforms();
}
#undef LOCTEXT_NAMESPACE