Files
UnrealEngineUWP/Engine/Source/Developer/HTML5/HTML5TargetPlatform/Private/HTML5TargetPlatformModule.cpp
James Moran f1320865f9 Many improvements to HTML5.
- Fixes to the Mac HTML5 Device selection. .app files now work correctly.
- Re-enabled HTML5 in Mac Editor.
- Added HTML5LaunchHelper executable to clean up the process of LaunchOn for HTML5.
- Improve HTML5 SDK Settings Editor interface. Only the emscripten install directory is needed now, SDK version are automatically picked up and selected for use.
- Change UnrealPak to also account for bytes saved (>64KB) and percentage size of original file (<90%) when choosing to automatically turn off compression.
- Added Server Port option for HTML5 deploy to stop clashes on port 8000
- Adding more logging for use during debugging & tracing.
- Added an option to turn on HTML5 tracing api and added calls to the api.
- Fix up check() macros to throw alert messages and be more clear that something has gone wrong on HTML5.

#codereview Ankit.Khare

[CL 2452979 by James Moran in Main branch]
2015-02-20 04:41:01 -05:00

93 lines
1.5 KiB
C++

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#include "HTML5TargetPlatformPrivatePCH.h"
#include "ISettingsModule.h"
#include "ModuleManager.h"
#define LOCTEXT_NAMESPACE "FHTML5TargetPlatformModule"
// Holds the target platform singleton.
static ITargetPlatform* Singleton = NULL;
/**
* Module for the HTML5 target platform.
*/
class FHTML5TargetPlatformModule
: public IHTML5TargetPlatformModule
{
public:
/**
* Destructor.
*/
~FHTML5TargetPlatformModule( )
{
Singleton = NULL;
}
public:
// Begin ITargetPlatformModule interface
virtual ITargetPlatform* GetTargetPlatform( ) override
{
if (Singleton == NULL)
{
// finally, make the interface object
Singleton = new FHTML5TargetPlatform();
FString OutPath;
if (!Singleton->IsSdkInstalled(false, OutPath))
{
delete Singleton;
Singleton = NULL;
}
}
return Singleton;
}
// End ITargetPlatformModule interface
virtual void RefreshAvailableDevices() override
{
if (Singleton)
{
((FHTML5TargetPlatform*)Singleton)->RefreshAvailableDevices();
}
}
virtual void GetInstalledSDKVersions(const TCHAR* SDKDirectory, TArray<FHTML5SDKVersionNumber>& OutSDKs)
{
FHTML5TargetPlatform::GetInstalledSDKVersions(SDKDirectory, OutSDKs);
}
public:
// Begin IModuleInterface interface
virtual void StartupModule() override
{
}
virtual void ShutdownModule() override
{
}
// End IModuleInterface interface
private:
};
#undef LOCTEXT_NAMESPACE
IMPLEMENT_MODULE( FHTML5TargetPlatformModule, HTML5TargetPlatform);