Files
UnrealEngineUWP/Engine/Source/Editor/GameProjectGeneration/Private/GameProjectGenerationModule.cpp
Andrew Copland babb59df1e Change the name length check to launch a descriptive warning after opening a project rather than error out on the request to open.
#ttp 333947 the landscape_worldmachine project cannot be opened on my machine because the project name is longer than 20 characters.
reviewed by Thomas.Sarkanen

[CL 2061059 by Andrew Copland in Main branch]
2014-05-01 10:58:35 -04:00

86 lines
2.3 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();
}
#undef LOCTEXT_NAMESPACE