2014-03-14 14:13:41 -04:00
|
|
|
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
/*=============================================================================
|
2014-04-02 18:09:23 -04:00
|
|
|
LinuxTargetPlatformModule.cpp: Implements the FAndroidTargetPlatformModule class.
|
2014-03-14 14:13:41 -04:00
|
|
|
=============================================================================*/
|
|
|
|
|
|
|
|
|
|
#include "LinuxTargetPlatformPrivatePCH.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define LOCTEXT_NAMESPACE "FLinuxTargetPlatformModule"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Holds the target platform singleton.
|
|
|
|
|
*/
|
2014-04-02 18:09:23 -04:00
|
|
|
static ITargetPlatform* Singleton = NULL;
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Module for the Android target platform.
|
|
|
|
|
*/
|
|
|
|
|
class FLinuxTargetPlatformModule
|
|
|
|
|
: public ITargetPlatformModule
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Destructor.
|
|
|
|
|
*/
|
|
|
|
|
~FLinuxTargetPlatformModule( )
|
|
|
|
|
{
|
2014-04-02 18:09:23 -04:00
|
|
|
Singleton = NULL;
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
// Begin ITargetPlatformModule interface
|
|
|
|
|
|
|
|
|
|
virtual ITargetPlatform* GetTargetPlatform( ) OVERRIDE
|
|
|
|
|
{
|
2014-04-02 18:09:23 -04:00
|
|
|
if (Singleton == NULL)
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
2014-04-02 18:09:23 -04:00
|
|
|
Singleton = new TLinuxTargetPlatform<false, false>();
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
2014-04-02 18:09:23 -04:00
|
|
|
return Singleton;
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// End ITargetPlatformModule interface
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
// Begin IModuleInterface interface
|
|
|
|
|
|
|
|
|
|
virtual void StartupModule() OVERRIDE
|
|
|
|
|
{
|
|
|
|
|
TargetSettings = ConstructObject<ULinuxTargetSettings>(ULinuxTargetSettings::StaticClass(), GetTransientPackage(), "LinuxTargetSettings", RF_Standalone);
|
|
|
|
|
TargetSettings->AddToRoot();
|
|
|
|
|
|
|
|
|
|
ISettingsModule* SettingsModule = ISettingsModule::Get();
|
|
|
|
|
|
|
|
|
|
if (SettingsModule != nullptr)
|
|
|
|
|
{
|
|
|
|
|
SettingsModule->RegisterSettings("Project", "Platforms", "Linux",
|
|
|
|
|
LOCTEXT("TargetSettingsName", "Linux"),
|
|
|
|
|
LOCTEXT("TargetSettingsDescription", "Linux platform settings description text here"),
|
|
|
|
|
TargetSettings
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual void ShutdownModule() OVERRIDE
|
|
|
|
|
{
|
|
|
|
|
TargetSettings->RemoveFromRoot();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// End IModuleInterface interface
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
// Holds the target settings.
|
|
|
|
|
ULinuxTargetSettings* TargetSettings;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#undef LOCTEXT_NAMESPACE
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IMPLEMENT_MODULE( FLinuxTargetPlatformModule, LinuxTargetPlatform);
|