Files
UnrealEngineUWP/Engine/Source/Developer/Linux/LinuxTargetPlatform/Private/LinuxTargetPlatform.h
Jack Porter e7c737c0cf Copying //UE4/Dev-Mobile to //UE4/Dev-Main (Source: //UE4/Dev-Mobile @ 3627362)
#lockdown Nick.Penwarden
#rb None

============================
  MAJOR FEATURES & CHANGES
============================

Change 3600639 by Nick.Shin

	HTML5 remove old emscripten toolchain

	forgot to remove this (was checked out in another changelist)

	#jira UE-47813

Change 3600641 by Nick.Shin

	HTML5 TM-Core crash fixes

	new PhysX HTML5 libs

	#jira UE-47813  Index Out Of Bounds crash running "GC and Level Load Stress Test" in TM-Core on Firefox

Change 3600644 by Nick.Shin

	HTML5 TM-Core crash fixes

	emscripten doesn't seem to know how to look at <PxRigidActor> from the PxActor class...

	#jira UE-47813  Index Out Of Bounds crash running "GC and Level Load Stress Test" in TM-Core on Firefox

Change 3600647 by Nick.Shin

	HTML5 UInterpTrackInst::GetGroupActor()

	pre-null check

	#jira UE-47485  ( Pri:1 - 4.18 )  Crash running Stat Command test in TM-Core on Firefox

Change 3601439 by Dmitriy.Dyomin

	Fixed: Protostar leads to device reboot in Galaxy S7 Adreno device. (SM-G930V)
	#jira UE-48323

Change 3601440 by Dmitriy.Dyomin

	Fixed: Texture streaming after world origin was rebased

Change 3601456 by Dmitriy.Dyomin

	Added: Async loading bytecode from shader library
	- Shader library will be packed into single file
	- Shader library will be created only when packaging project by the book
	#jira UEMOB-381

Change 3601624 by Jack.Porter

	Fix landscape crash on HTML5 Exception !IsInRenderingThread() failed.
	#jira UE-48527

Change 3603890 by Dmitriy.Dyomin

	GitHub 3905 : Engine crash in LandscapeComponent when streaming levels
	#3905
	#jira UE-48422

Change 3603933 by Dmitriy.Dyomin

	Fixed: Crash after Splash Screen on Android (ETC2) when Adding r.UseShaderCaching and r.UseShaderPredraw

	- Added r.SaveShaderCache command to save current cache on demand
	- Removed support for caching multiple platfroms at the same time, each platform now uses separate cache/file
	- Significantly reduced size of draw log on disk
	- Mobile platfroms support only basic caching, logging shaders and bound shader states without full gfx state

	#jira UE-47553

Change 3604050 by Sorin.Gradinaru

	#jira UE-47428 Android virtual keyboard polishing

	 Done:
	Multiline should be disabled when not needed
	Hide suggestions and autocorrect
	"Done" / back button behavior to make it feel natural - Done/Enter and the Back key event sent to the engine
	If the keyboard is up and you click on the same control you're currently inputting into, it will hide the keyboard.
	Look into animation - not critical.
	S6 with Swiftkey. The numbers don't show up in our textedit but the string is updated (we see dots in the Slate control) with the password entry

	Could not reproduce/test:
	Make sure we don't use negative coords for the input box if the keyboard is at the top of the screen

Change 3604081 by Allan.Bentham

	Reduce redundant log spam from SustainedPerformanceMode on android.

Change 3604152 by Allan.Bentham

	Improved vulkanRHI availability and selection reporting.

Change 3604186 by Dmitriy.Dyomin

	Vulkan: Write to buffers directly on UMA devices (no staging)

Change 3604396 by Nick.Shin

	HTML5 - stats and multi-threading checks

	more null & multi-threading - and some functions flat out disabled for HTML5 platform

	the big "don't use on HTML5" is TLockFreeFixedSizeAllocator_TLSCacheBase's manual TLS.PartialBundle memory handler...  i'm not sure it's working properly...  switched on USE_NIEVE_TLockFreeFixedSizeAllocator_TLSCacheBase sections of code (i.e. basic malloc and free) for PLATFORM_HTML5
	- it seems only the stats function was exacerbating the memory bug ... but, shutting this completely out for HTML5...  don't know if it's an emscripten compiler/corruption that's causing this...
	- will send this to emscripten makers as another test case for them to help see what's going on...

	#jira UE-47485  ( Pri:1 - 4.18 )  Crash running Stat Command test in TM-Core on Firefox

Change 3604752 by Allan.Bentham

	Reduce battery status log spam.

Change 3604825 by Nick.Shin

	HTML5 emscripten 1.37.19 updated license file

	#jira UE-47813

Change 3606486 by Jack.Porter

	Enabled refraction on tvOS

	#jira UE-47229

Change 3606546 by Dmitriy.Dyomin

	Vulkan: Missed null check from CL# 3601439

Change 3606654 by Allan.Bentham

	mobile post process shaders will not attempt depth buffer fetch, instead they will always read from the depth texture.
	#jira UE-41919

Change 3606672 by Dmitriy.Dyomin

	Fixed: Vulkan mode crashes without error on Tegra K1 Nvidia Shield due to OOM
	- fixed r.MobileReduceLoadedMips has no effect
	- added r.MobileMaxLoadedMips to set a limit to a number of mips
	- reduced size of vulkan allocation pages on android
	#jira UE-42838

Change 3607204 by Allan.Bentham

	Do not attempt getprocaddress for GL_EXT_DEBUG_LABEL functions when the extension is not declared.

Change 3607214 by Nick.Shin

	HTML5 - stats font crash fix

	#jira UE-47485  ( Pri:1 - 4.18 )  Crash running Stat Command test in TM-Core on Firefox

Change 3609164 by Chris.Babcock

	More informative Android SDK license requirements and errors
	#jra UE-48837
	#ue4
	#android

Change 3609175 by Chris.Babcock

	Linux build fix
	#jira none

Change 3609516 by Dmitriy.Dyomin

	Fixed: Decals in TM-ShaderModels appearing and disappearing when viewed at certain angles on Android
	#jira UE-45342

Change 3609618 by Dmitriy.Dyomin

	Back out changelist 3603933, to help merge from main

Change 3610979 by Peter.Sauerbrei

	addition of asset catalogs for icons on Xcode 9 for iOS 11

Change 3612145 by Dmitriy.Dyomin

	Resubmitting CL #3603933 (shader cache fixes)

Change 3613981 by Chris.Babcock

	Fix issue with Android password keyboard input
	#jira WEX-7343
	#ue4
	#android

Change 3614375 by Sorin.Gradinaru

	#jira UE-44656  StrategyGame Crashes on launch on KindleFire 5th Gen.

	Kindle Fire HD7 5th (CPU Mali 450) seems to have problems with thread rendering, crashing when returning to the main thread.

	Added new device profile [Android_Mali_4xx_KindleFire] with a new cvar r.AndroidDisableThreadedRenderingFirstLoad=1, disabling movie player rendering on the intial screen. For subsequent loading screens, the (same) code apparently runs Ok.

	A warning "Initial loading screen disabled from BaseDeviceProfiles.ini: r.AndroidDisableThreadedRenderingFirstLoad=1" should appear when the thread rendering is disabled

Change 3614971 by Cosmin.Sulea

	UE-46769 - GitHub 3745 : bForcePVRTC4 was ignored.
	#jira UE-46769

Change 3616431 by Peter.Sauerbrei

	PR3657,3658 - fixes for InApp purchase bugs courtesy of nverenik

Change 3617306 by Jack.Porter

	Fix issue where undocked tabs had no way to be made visible again when hidden
	#jira UE-12044

Change 3617312 by Jack.Porter

	Find a new best MobileDirectionalLights[channel] when then current one is removed from the world (eg by a level streaming operation)
	#jira UE-47135

	#3785

Change 3617383 by Dmitriy.Dyomin

	Vk - only dynamic buffers in HostVisible on UMA devices

Change 3617437 by Dmitriy.Dyomin

	Vk - SRV allocates one BufferView for each buffer in FVulkanResourceMultiBuffer, so they can be reused (contributed by Samsung)

Change 3617474 by Dmitriy.Dyomin

	Vk - Don't use fences on image acquire on Android

Change 3617483 by Dmitriy.Dyomin

	Vk - Remove redundant dynamic state setup (viewport, scissor, stencilref) (contributed by Samsung)

Change 3617521 by Dmitriy.Dyomin

	Fix CIS warnings

Change 3617574 by Dmitriy.Dyomin

	Vk - Optimized RenderPass pool and Framebuffer pool (reduced vkObject count) (contributed by Samsung)
	ProtoStar: Framebuffer count : 133 -> 108, Renderpass count : 21 -> 18

Change 3617585 by Dmitriy.Dyomin

	compile fix for CL# 3617574

Change 3617849 by Allan.Bentham

	Log UnsatisfiedLinkError's content when loadlibrary fails.

Change 3617945 by Chris.Babcock

	Allow UPL variable expansion in addPermission, addFeature, and addLibrary
	#jira UE-47421
	#ue4
	#android

Change 3618097 by Allan.Bentham

	Fix Y axis switch with android GLES when rendering triangles to canvas.
	#jira UE-44510

Change 3618733 by Peter.Sauerbrei

	fix from Dev-Rendering for tvOS shader compilation

Change 3618761 by Peter.Sauerbrei

	fix for shader crash on startup on iOS

Change 3618769 by Peter.Sauerbrei

	bump metal shader guid to force a rebuild of shaders

Change 3620061 by Peter.Sauerbrei

	fix for resource directory on Asset catalogs
	#jira UE-49074

Change 3620520 by Peter.Sauerbrei

	remove the texture warning, the logic was incorrect and in the end we don't need the warning

	#jira UE-49057

Change 3621811 by Allan.Bentham

	Add mipindex and array slice index to framebuffer hashing code.
	#jira UE-49171

Change 3624410 by Jack.Porter

	Fix issue where the Shared Material Native Libraries checkbox causes packaging for Android to fail
	#jira UE-49105

Change 3627361 by Jack.Porter

	Fixing case on iOS files
	#jira None

Change 3627362 by Jack.Porter

	Fixed case on IOS files
	#jira None

[CL 3627373 by Jack Porter in Main branch]
2017-09-06 01:04:25 -04:00

491 lines
14 KiB
C++

// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
/*=============================================================================
LinuxTargetPlatform.h: Declares the FLinuxTargetPlatform class.
=============================================================================*/
#pragma once
#include "CoreMinimal.h"
#include "Interfaces/TargetDeviceId.h"
#include "Misc/Paths.h"
#include "Misc/ConfigCacheIni.h"
#include "Interfaces/ITargetPlatform.h"
#include "Common/TargetPlatformBase.h"
#if WITH_ENGINE
#include "Sound/SoundWave.h"
#include "StaticMeshResources.h"
#endif // WITH_ENGINE
#include "Interfaces/IProjectManager.h"
#include "InstalledPlatformInfo.h"
#include "LinuxTargetDevice.h"
#include "Linux/LinuxPlatformProperties.h"
#define LOCTEXT_NAMESPACE "TLinuxTargetPlatform"
class UTextureLODSettings;
/**
* Template for Linux target platforms
*/
template<bool HAS_EDITOR_DATA, bool IS_DEDICATED_SERVER, bool IS_CLIENT_ONLY>
class TLinuxTargetPlatform
: public TTargetPlatformBase<FLinuxPlatformProperties<HAS_EDITOR_DATA, IS_DEDICATED_SERVER, IS_CLIENT_ONLY> >
{
public:
typedef FLinuxPlatformProperties<HAS_EDITOR_DATA, IS_DEDICATED_SERVER, IS_CLIENT_ONLY> TProperties;
typedef TTargetPlatformBase<TProperties> TSuper;
/**
* Default constructor.
*/
TLinuxTargetPlatform( )
#if WITH_ENGINE
: bChangingDeviceConfig(false)
#endif // WITH_ENGINE
{
#if PLATFORM_LINUX
// only add local device if actually running on Linux
LocalDevice = MakeShareable(new FLinuxTargetDevice(*this, FPlatformProcess::ComputerName(), nullptr));
#endif
#if WITH_ENGINE
FConfigCacheIni::LoadLocalIniFile(EngineSettings, TEXT("Engine"), true, *this->PlatformName());
TextureLODSettings = nullptr;
StaticMeshLODSettings.Initialize(EngineSettings);
InitDevicesFromConfig();
#endif // WITH_ENGINE
}
public:
//~ Begin ITargetPlatform Interface
virtual void EnableDeviceCheck(bool OnOff) override {}
virtual bool AddDevice(const FString& DeviceName, bool bDefault) override
{
FLinuxTargetDevicePtr& Device = Devices.FindOrAdd(DeviceName);
if (Device.IsValid())
{
// do not allow duplicates
return false;
}
FTargetDeviceId UATFriendlyId(TEXT("Linux"), DeviceName);
Device = MakeShareable(new FLinuxTargetDevice(*this, DeviceName,
#if WITH_ENGINE
[&]() { SaveDevicesToConfig(); }));
SaveDevicesToConfig(); // this will do the right thing even if AddDevice() was called from InitDevicesFromConfig
#else
nullptr));
#endif // WITH_ENGINE
DeviceDiscoveredEvent.Broadcast(Device.ToSharedRef());
return true;
}
virtual void GetAllDevices( TArray<ITargetDevicePtr>& OutDevices ) const override
{
// TODO: ping all the machines in a local segment and/or try to connect to port 22 of those that respond
OutDevices.Reset();
if (LocalDevice.IsValid())
{
OutDevices.Add(LocalDevice);
}
for (const auto & DeviceIter : Devices)
{
OutDevices.Add(DeviceIter.Value);
}
}
virtual ECompressionFlags GetBaseCompressionMethod( ) const override
{
return COMPRESS_ZLIB;
}
virtual bool GenerateStreamingInstallManifest(const TMultiMap<FString, int32>& ChunkMap, const TSet<int32>& ChunkIDsInUse) const override
{
return true;
}
virtual ITargetDevicePtr GetDefaultDevice( ) const override
{
if (LocalDevice.IsValid())
{
return LocalDevice;
}
return nullptr;
}
virtual ITargetDevicePtr GetDevice( const FTargetDeviceId& DeviceId ) override
{
if (LocalDevice.IsValid() && (DeviceId == LocalDevice->GetId()))
{
return LocalDevice;
}
for (const auto & DeviceIter : Devices)
{
if (DeviceId == DeviceIter.Value->GetId())
{
return DeviceIter.Value;
}
}
return nullptr;
}
virtual bool IsRunningPlatform( ) const override
{
// Must be Linux platform as editor for this to be considered a running platform
return PLATFORM_LINUX && !UE_SERVER && !UE_GAME && WITH_EDITOR && HAS_EDITOR_DATA;
}
virtual bool SupportsFeature(ETargetPlatformFeatures Feature) const override
{
if (Feature == ETargetPlatformFeatures::UserCredentials || Feature == ETargetPlatformFeatures::Packaging)
{
return true;
}
return TTargetPlatformBase<FLinuxPlatformProperties<HAS_EDITOR_DATA, IS_DEDICATED_SERVER, IS_CLIENT_ONLY>>::SupportsFeature(Feature);
}
virtual bool IsSdkInstalled(bool bProjectHasCode, FString& OutDocumentationPath) const override
{
if (!PLATFORM_LINUX)
{
// check for LINUX_MULTIARCH_ROOT or for legacy LINUX_ROOT when targeting Linux from Win/Mac
TCHAR ToolchainRoot[32768] = { 0 };
FPlatformMisc::GetEnvironmentVariable(TEXT("LINUX_MULTIARCH_ROOT"), ToolchainRoot, ARRAY_COUNT(ToolchainRoot));
// proceed with any value for MULTIARCH root, because checking exact architecture is not possible at this point
FString ToolchainMultiarchRoot = ToolchainRoot;
if (ToolchainMultiarchRoot.Len() > 0 && FPaths::DirectoryExists(ToolchainMultiarchRoot))
{
return true;
}
// else check for legacy LINUX_ROOT
ToolchainRoot[ 0 ] = 0;
FPlatformMisc::GetEnvironmentVariable(TEXT("LINUX_ROOT"), ToolchainRoot, ARRAY_COUNT(ToolchainRoot));
FString ToolchainCompiler = ToolchainRoot;
if (PLATFORM_WINDOWS)
{
ToolchainCompiler += "/bin/clang++.exe";
}
else if (PLATFORM_MAC)
{
ToolchainCompiler += "/bin/clang++";
}
else
{
checkf(false, TEXT("Unable to target Linux on an unknown platform."));
return false;
}
return FPaths::FileExists(ToolchainCompiler);
}
return true;
}
virtual int32 CheckRequirements(const FString& ProjectPath, bool bProjectHasCode, FString& OutTutorialPath, FString& OutDocumentationPath, FText& CustomizedLogMessage) const override
{
int32 ReadyToBuild = TSuper::CheckRequirements(ProjectPath, bProjectHasCode, OutTutorialPath, OutDocumentationPath, CustomizedLogMessage);
// do not support code/plugins in Installed builds if the required libs aren't bundled (on Windows/Mac)
if (!PLATFORM_LINUX && !FInstalledPlatformInfo::Get().IsValidPlatform(TSuper::GetPlatformInfo().BinaryFolderName, EProjectType::Code))
{
if (bProjectHasCode)
{
ReadyToBuild |= ETargetPlatformReadyStatus::CodeUnsupported;
}
if (IProjectManager::Get().IsNonDefaultPluginEnabled())
{
ReadyToBuild |= ETargetPlatformReadyStatus::PluginsUnsupported;
}
}
return ReadyToBuild;
}
#if WITH_ENGINE
virtual void GetAllPossibleShaderFormats( TArray<FName>& OutFormats ) const override
{
// no shaders needed for dedicated server target
if (!IS_DEDICATED_SERVER)
{
static FName NAME_GLSL_150(TEXT("GLSL_150"));
static FName NAME_GLSL_430(TEXT("GLSL_430"));
static FName NAME_VULKAN_SM4(TEXT("SF_VULKAN_SM4"));
static FName NAME_VULKAN_SM5(TEXT("SF_VULKAN_SM5"));
static FName NAME_VULKAN_ES31(TEXT("SF_VULKAN_ES31"));
OutFormats.AddUnique(NAME_GLSL_150);
OutFormats.AddUnique(NAME_GLSL_430);
OutFormats.AddUnique(NAME_VULKAN_SM4);
OutFormats.AddUnique(NAME_VULKAN_SM5);
OutFormats.AddUnique(NAME_VULKAN_ES31);
}
}
virtual void GetAllTargetedShaderFormats( TArray<FName>& OutFormats ) const override
{
// Get the Target RHIs for this platform, we do not always want all those that are supported. (reload in case user changed in the editor)
TArray<FString>TargetedShaderFormats;
GConfig->GetArray(TEXT("/Script/LinuxTargetPlatform.LinuxTargetSettings"), TEXT("TargetedRHIs"), TargetedShaderFormats, GEngineIni);
// Gather the list of Target RHIs and filter out any that may be invalid.
TArray<FName> PossibleShaderFormats;
GetAllPossibleShaderFormats(PossibleShaderFormats);
for (int32 ShaderFormatIdx = TargetedShaderFormats.Num() - 1; ShaderFormatIdx >= 0; ShaderFormatIdx--)
{
FString ShaderFormat = TargetedShaderFormats[ShaderFormatIdx];
if (PossibleShaderFormats.Contains(FName(*ShaderFormat)) == false)
{
TargetedShaderFormats.RemoveAt(ShaderFormatIdx);
}
}
for(const FString& ShaderFormat : TargetedShaderFormats)
{
OutFormats.AddUnique(FName(*ShaderFormat));
}
}
virtual const class FStaticMeshLODSettings& GetStaticMeshLODSettings( ) const override
{
return StaticMeshLODSettings;
}
virtual void GetTextureFormats( const UTexture* InTexture, TArray<FName>& OutFormats ) const override
{
if (!IS_DEDICATED_SERVER)
{
// just use the standard texture format name for this texture
FName TextureFormatName = GetDefaultTextureFormatName(this, InTexture, EngineSettings, false);
OutFormats.Add(TextureFormatName);
}
}
virtual void GetAllTextureFormats(TArray<FName>& OutFormats) const override
{
if (!IS_DEDICATED_SERVER)
{
// just use the standard texture format name for this texture
GetAllDefaultTextureFormats(this, OutFormats, false);
}
}
virtual const UTextureLODSettings& GetTextureLODSettings() const override
{
return *TextureLODSettings;
}
virtual void RegisterTextureLODSettings(const UTextureLODSettings* InTextureLODSettings) override
{
TextureLODSettings = InTextureLODSettings;
}
virtual FName GetWaveFormat( const class USoundWave* Wave ) const override
{
static FName NAME_OGG(TEXT("OGG"));
return NAME_OGG;
}
virtual void GetAllWaveFormats(TArray<FName>& OutFormats) const override
{
static FName NAME_OGG(TEXT("OGG"));
OutFormats.Add(NAME_OGG);
}
#endif //WITH_ENGINE
virtual bool SupportsVariants() const override
{
return true;
}
virtual FText GetVariantDisplayName() const override
{
if (IS_DEDICATED_SERVER)
{
return LOCTEXT("LinuxServerVariantTitle", "Dedicated Server");
}
if (HAS_EDITOR_DATA)
{
return LOCTEXT("LinuxClientEditorDataVariantTitle", "Client with Editor Data");
}
if (IS_CLIENT_ONLY)
{
return LOCTEXT("LinuxClientOnlyVariantTitle", "Client only");
}
return LOCTEXT("LinuxClientVariantTitle", "Client");
}
virtual FText GetVariantTitle() const override
{
return LOCTEXT("LinuxVariantTitle", "Build Type");
}
virtual float GetVariantPriority() const override
{
return TProperties::GetVariantPriority();
}
DECLARE_DERIVED_EVENT(TLinuxTargetPlatform, ITargetPlatform::FOnTargetDeviceDiscovered, FOnTargetDeviceDiscovered);
virtual FOnTargetDeviceDiscovered& OnDeviceDiscovered( ) override
{
return DeviceDiscoveredEvent;
}
DECLARE_DERIVED_EVENT(TLinuxTargetPlatform, ITargetPlatform::FOnTargetDeviceLost, FOnTargetDeviceLost);
virtual FOnTargetDeviceLost& OnDeviceLost( ) override
{
return DeviceLostEvent;
}
//~ End ITargetPlatform Interface
private:
#if WITH_ENGINE
/** Whether we're in process of changing device config - if yes, we will prevent recurrent calls. */
bool bChangingDeviceConfig;
void InitDevicesFromConfig()
{
if (bChangingDeviceConfig)
{
return;
}
bChangingDeviceConfig = true;
int NumDevices = 0;
for (;; ++NumDevices)
{
FString DeviceName, DeviceUser, DevicePass;
FString DeviceBaseKey(FString::Printf(TEXT("LinuxTargetPlatfrom_%s_Device_%d"), *TSuper::PlatformName(), NumDevices));
FString DeviceNameKey = DeviceBaseKey + TEXT("_Name");
if (!GConfig->GetString(TEXT("/Script/LinuxTargetPlatform.LinuxTargetSettings"), *DeviceNameKey, DeviceName, GEngineIni))
{
// no such device
break;
}
if (!AddDevice(DeviceName, false))
{
break;
}
// set credentials, if any
FString DeviceUserKey = DeviceBaseKey + TEXT("_User");
if (GConfig->GetString(TEXT("/Script/LinuxTargetPlatform.LinuxTargetSettings"), *DeviceUserKey, DeviceUser, GEngineIni))
{
FString DevicePassKey = DeviceBaseKey + TEXT("_Pass");
if (GConfig->GetString(TEXT("/Script/LinuxTargetPlatform.LinuxTargetSettings"), *DevicePassKey, DevicePass, GEngineIni))
{
for (const auto & DeviceIter : Devices)
{
ITargetDevicePtr Device = DeviceIter.Value;
if (Device.IsValid() && Device->GetId().GetDeviceName() == DeviceName)
{
Device->SetUserCredentials(DeviceUser, DevicePass);
}
}
}
}
}
bChangingDeviceConfig = false;
}
void SaveDevicesToConfig()
{
if (bChangingDeviceConfig)
{
return;
}
bChangingDeviceConfig = true;
int DeviceIndex = 0;
for (const auto & DeviceIter : Devices)
{
ITargetDevicePtr Device = DeviceIter.Value;
FString DeviceBaseKey(FString::Printf(TEXT("LinuxTargetPlatfrom_%s_Device_%d"), *TSuper::PlatformName(), DeviceIndex));
FString DeviceNameKey = DeviceBaseKey + TEXT("_Name");
if (Device.IsValid())
{
FString DeviceName = Device->GetId().GetDeviceName();
// do not save a local device on Linux or it will be duplicated
if (PLATFORM_LINUX && DeviceName == FPlatformProcess::ComputerName())
{
continue;
}
GConfig->SetString(TEXT("/Script/LinuxTargetPlatform.LinuxTargetSettings"), *DeviceNameKey, *DeviceName, GEngineIni);
FString DeviceUser, DevicePass;
if (Device->GetUserCredentials(DeviceUser, DevicePass))
{
FString DeviceUserKey = DeviceBaseKey + TEXT("_User");
FString DevicePassKey = DeviceBaseKey + TEXT("_Pass");
GConfig->SetString(TEXT("/Script/LinuxTargetPlatform.LinuxTargetSettings"), *DeviceUserKey, *DeviceUser, GEngineIni);
GConfig->SetString(TEXT("/Script/LinuxTargetPlatform.LinuxTargetSettings"), *DevicePassKey, *DevicePass, GEngineIni);
}
++DeviceIndex; // needs to be incremented here since we cannot allow gaps
}
}
bChangingDeviceConfig = false;
}
#endif // WITH_ENGINE
// Holds the local device.
FLinuxTargetDevicePtr LocalDevice;
// Holds a map of valid devices.
TMap<FString, FLinuxTargetDevicePtr> Devices;
#if WITH_ENGINE
// Holds the Engine INI settings for quick use.
FConfigFile EngineSettings;
// Holds the texture LOD settings.
const UTextureLODSettings* TextureLODSettings;
// Holds static mesh LOD settings.
FStaticMeshLODSettings StaticMeshLODSettings;
#endif // WITH_ENGINE
private:
// Holds an event delegate that is executed when a new target device has been discovered.
FOnTargetDeviceDiscovered DeviceDiscoveredEvent;
// Holds an event delegate that is executed when a target device has been lost, i.e. disconnected or timed out.
FOnTargetDeviceLost DeviceLostEvent;
};
#undef LOCTEXT_NAMESPACE