You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Headers are updated to contain any missing #includes needed to compile and #includes are sorted. Nothing is removed. #ushell-cherrypick of 21065896 by bryan.sefcik #preflight 62d4b1a5a6141b6adfb0c892 #jira #ROBOMERGE-OWNER: Bryan.sefcik #ROBOMERGE-AUTHOR: bryan.sefcik #ROBOMERGE-SOURCE: CL 21150156 via CL 21151754 via CL 21154719 #ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824) #ROBOMERGE-CONFLICT from-shelf [CL 21181076 by Bryan sefcik in ue5-main branch]
78 lines
2.0 KiB
C++
78 lines
2.0 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
#pragma once
|
|
|
|
#include "Containers/UnrealString.h"
|
|
#include "CoreGlobals.h"
|
|
#include "HAL/Platform.h"
|
|
#include "InstallBundleManagerInterface.h"
|
|
#include "Misc/AssertionMacros.h"
|
|
#include "Misc/ConfigCacheIni.h"
|
|
#include "Modules/ModuleInterface.h"
|
|
#include "Modules/ModuleManager.h"
|
|
#include "Templates/SharedPointer.h"
|
|
|
|
class IInstallBundleManager;
|
|
|
|
/**
|
|
* Currently empty implementation for InstallBundleModule until things are moved in here.
|
|
*/
|
|
class FInstallBundleManagerModule : public IModuleInterface
|
|
{
|
|
public:
|
|
// IModuleInterface interface
|
|
virtual void StartupModule() override
|
|
{
|
|
}
|
|
|
|
virtual void ShutdownModule() override
|
|
{
|
|
}
|
|
};
|
|
|
|
/**
|
|
* Base Module Interface for InstallBundleManager implementation modules
|
|
*/
|
|
class IInstallBundleManagerModule : public IModuleInterface
|
|
{
|
|
public:
|
|
virtual void PreUnloadCallback() override
|
|
{
|
|
InstallBundleManager = nullptr;
|
|
}
|
|
|
|
TSharedPtr<IInstallBundleManager> GetInstallBundleManager()
|
|
{
|
|
return InstallBundleManager;
|
|
}
|
|
|
|
protected:
|
|
TSharedPtr<IInstallBundleManager> InstallBundleManager;
|
|
TWeakPtr<IInstallBundleManager> LastInstallBundleManager;
|
|
};
|
|
|
|
/**
|
|
* Module Interface for InstallBundleManager implementation modules
|
|
*/
|
|
template<class InstallBundleManagerModuleImpl>
|
|
class TInstallBundleManagerModule : public IInstallBundleManagerModule
|
|
{
|
|
public:
|
|
virtual void StartupModule() override
|
|
{
|
|
// Only instantiate the bundle manager if this is the version the game has been configured to use
|
|
FString ModuleName;
|
|
#if WITH_EDITOR
|
|
GConfig->GetString(TEXT("InstallBundleManager"), TEXT("EditorModuleName"), ModuleName, GEngineIni);
|
|
#else
|
|
GConfig->GetString(TEXT("InstallBundleManager"), TEXT("ModuleName"), ModuleName, GEngineIni);
|
|
#endif // WITH_EDITOR
|
|
|
|
if (FModuleManager::Get().GetModule(*ModuleName) == this)
|
|
{
|
|
check(LastInstallBundleManager == nullptr);
|
|
InstallBundleManager = MakeShared<InstallBundleManagerModuleImpl>();
|
|
LastInstallBundleManager = InstallBundleManager;
|
|
}
|
|
}
|
|
};
|