2014-12-07 19:09:38 -05:00
|
|
|
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
#include "HTML5TargetPlatformPrivatePCH.h"
|
2014-10-27 07:53:18 -04:00
|
|
|
#include "ISettingsModule.h"
|
|
|
|
|
#include "ModuleManager.h"
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
#define LOCTEXT_NAMESPACE "FHTML5TargetPlatformModule"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Holds the target platform singleton.
|
|
|
|
|
static ITargetPlatform* Singleton = NULL;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Module for the HTML5 target platform.
|
|
|
|
|
*/
|
|
|
|
|
class FHTML5TargetPlatformModule
|
2015-01-26 10:22:57 -05:00
|
|
|
: public IHTML5TargetPlatformModule
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Destructor.
|
|
|
|
|
*/
|
|
|
|
|
~FHTML5TargetPlatformModule( )
|
|
|
|
|
{
|
|
|
|
|
Singleton = NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
// Begin ITargetPlatformModule interface
|
|
|
|
|
|
2014-06-13 06:14:46 -04:00
|
|
|
virtual ITargetPlatform* GetTargetPlatform( ) override
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
if (Singleton == NULL)
|
|
|
|
|
{
|
|
|
|
|
// finally, make the interface object
|
|
|
|
|
Singleton = new FHTML5TargetPlatform();
|
2014-06-20 12:07:15 -04:00
|
|
|
FString OutPath;
|
|
|
|
|
if (!Singleton->IsSdkInstalled(false, OutPath))
|
|
|
|
|
{
|
|
|
|
|
delete Singleton;
|
|
|
|
|
Singleton = NULL;
|
|
|
|
|
}
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return Singleton;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// End ITargetPlatformModule interface
|
|
|
|
|
|
2015-01-26 10:22:57 -05:00
|
|
|
virtual void RefreshAvailableDevices() override
|
|
|
|
|
{
|
|
|
|
|
if (Singleton)
|
|
|
|
|
{
|
|
|
|
|
((FHTML5TargetPlatform*)Singleton)->RefreshAvailableDevices();
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-03-14 14:13:41 -04:00
|
|
|
|
2015-04-01 07:20:55 -04:00
|
|
|
virtual void GetInstalledSDKVersions(const TCHAR* SDKDirectory, TArray<FHTML5SDKVersionNumber>& OutSDKs) override
|
2015-02-20 04:41:01 -05:00
|
|
|
{
|
|
|
|
|
FHTML5TargetPlatform::GetInstalledSDKVersions(SDKDirectory, OutSDKs);
|
|
|
|
|
}
|
|
|
|
|
|
2014-03-14 14:13:41 -04:00
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
// Begin IModuleInterface interface
|
|
|
|
|
|
2014-06-13 06:14:46 -04:00
|
|
|
virtual void StartupModule() override
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-13 06:14:46 -04:00
|
|
|
virtual void ShutdownModule() override
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// End IModuleInterface interface
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#undef LOCTEXT_NAMESPACE
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IMPLEMENT_MODULE( FHTML5TargetPlatformModule, HTML5TargetPlatform);
|