You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#lockdown Nick.Penwarden
#rb none
==========================
MAJOR FEATURES + CHANGES
==========================
Change 3235199 on 2016/12/14 by Joe.Barnes
Fix new compile error for missing #define
Change 3235340 on 2016/12/14 by Arciel.Rekman
Linux: refactor of some PlatformMisc functions.
- RootDir() removed since it was a no-op.
- Old EngineDir() implementation removed in favor of more generic one that should handle foreign engine dir.
- Change by CengizT,
Change 3237014 on 2016/12/15 by Michael.Trepka
Fixed a crash in FChunkCacheWorker constructor
Change 3238305 on 2016/12/16 by Josh.Adams
- Added a None option to the FKey customization, unless the FKey property had NoClear on it
Change 3240823 on 2016/12/20 by Josh.Stoddard
Device profiles don't work for iPadPro 9.7 and 12.9
#jira UE-39943
Change 3241103 on 2016/12/20 by Alicia.Cano
Android support from Visual Studio
#jira UEPLAT-1421
#android
Change 3241357 on 2016/12/20 by Chris.Babcock
Add gameActivityOnNewIntentAddtions section to Android UPL
#jira UE-38986
#PR #2969
#ue4
#android
Change 3241941 on 2016/12/21 by Alicia.Cano
Build Fix
Change 3249832 on 2017/01/06 by Nick.Shin
refetch on timed out GET/POST requests
#jira UE-39992 Quicklaunch UFE HTML5 fails with "NS_ERROR_Failure"
Change 3249837 on 2017/01/06 by Nick.Shin
black box issues fixed:
use device pixel ratio during width and height checks
and use canvas dimensions if in full screen -- otherwise store SDL_window dimensions for future use
#jira UE-36341 HTML5 - View is incorrectly drawn
#jira UE-32311 Templates on Firefox/Chrome on HTML5 are not full screen during Launch On
Change 3249988 on 2017/01/06 by Josh.Adams
- Disable the HeartBeat() function on platforms that don't actually want to use the HeartbeatThread
#jira UE-40305, UE-39291, UE-40113
Change 3253720 on 2017/01/11 by Josh.Adams
- Added support for a config class to use a specific platform's config hierarchy, so that the editor can read NDA'd platform default settings without needing the settings to in Base*.ini
- See SwitchRuntimeSettings.h / GetConfigOverridePlatform()
- Addiontally made it so that NDAd platforms are saved to Project/Platform/Platform*.ini, instead of Project/Default*.ini (to keep samples .ini files free of NDAd platform settings).
- See UObject::GetDefaultConfigFilename()
- Updated some minor ShooterGame switch settings while cleaning this up
Change 3254162 on 2017/01/11 by Daniel.Lamb
Avoid trying to load empty package names.
Fixed issue with iterative ini files being unparseable if they inlcude a colon in them.
#jira UE-40257, UE-35001
#test Cook QAGame
Change 3255309 on 2017/01/12 by Daniel.Lamb
In the derived datacache commandlet wait for texture building to finish before we GC.
#test DDC QAGame
Change 3255311 on 2017/01/12 by Daniel.Lamb
Removed debug logging for shader compilation.
Issue hasn't occured in a while and the logging is annoying.
#test Cook QAGame
Change 3257024 on 2017/01/13 by Josh.Adams
- Reread in the target RHIs array every time the list of shader types is needed, instead of caching, because the user could change the settings in the editor, then click cook.
#jira UE-38691
Change 3259636 on 2017/01/16 by Josh.Adams
- Fixed split screen render issue with payer 2 getting no geometry
#jira UE-40684
Change 3260159 on 2017/01/17 by Ben.Marsh
Added extra logging when deleting a directory fails during ReconcileWorkspace.
Change 3260300 on 2017/01/17 by Ben.Marsh
More logging for cleaning workspaces.
Change 3261056 on 2017/01/17 by Daniel.Lamb
Cook on the fly builds now resolve string asset references.
#test Trivial
Change 3262803 on 2017/01/18 by Joe.Graf
Added missing support for compiling plugins external to Engine/Plugins & Game/Plugins
Change 3262852 on 2017/01/18 by Joe.Graf
Fixed the bad robomerge
Don't try to regenerate projects when adding a content only plugin to a content only project
Change 3264930 on 2017/01/19 by Joe.Barnes
#include some header files needed when building UFE.
Change 3265728 on 2017/01/20 by Will.Fissler
PlatformShowcase - Added TestBed_MobileFeatures .umap and related test content.
Change 3267188 on 2017/01/21 by Josh.Adams
Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform)
Change 3267439 on 2017/01/22 by Arciel.Rekman
Fix Dev-Platform build.
- Fixed just to have it compile; perhaps a proper fix is needed.
- Seems to be caused by CL 3265587 (delegate was changed to return an array of search results instead of a single one).
Change 3267556 on 2017/01/23 by Arciel.Rekman
Linux: fix MoveFile to work across file systems.
- PR #3141 with slight changes.
Change 3267843 on 2017/01/23 by Arciel.Rekman
Remove name collision (macro vs libc++).
- Redoing CL 3259310.
Change 3267850 on 2017/01/23 by Arciel.Rekman
Fix wrong always true condition.
- PLATFORM_LINUX is always defined, but can be 0.
Change 3268048 on 2017/01/23 by Daniel.Lamb
Integrated fix for rebuild lighting commandlet from Greg Korman @ Impulse Gear.
#test Rebuild lighting Paragon
Change 3268403 on 2017/01/23 by Josh.Adams
#BUILDUPGRADENOTES
- Moved XboxOne and PS4 settings into platform specific .ini files (after using GetConfigOverridePlatform() in their class delcarations)
- Licensee games that have PS4, XboxOne, Switch settings in DefaultEngine.ini will have those settings saved in the platform version next time the project settings are edited. DOCUMENT THIS!
Change 3272441 on 2017/01/25 by Chris.Babcock
Fixed documentation error in UnrealPluginLanguage
#ue4
#android
Change 3272478 on 2017/01/25 by Chris.Babcock
Fix another documentation error in UnrealPluginLanguage
#ue4
Change 3272826 on 2017/01/25 by Chris.Babcock
Google Cloud Messaging plugin for Android
#jira UEPLAT-1458
#ue4
#android
Change 3272839 on 2017/01/25 by Chris.Babcock
Fix name of Google Cloud Messaging Sender ID
#ue4
#android
Change 3273837 on 2017/01/26 by Daniel.Lamb
Added check to ensure editor never saves source texture data which has had ReleaseSourceMemory called on it.
Instead crash as this is a loss of content situation.
#test Cook paragon cook qagame
Change 3274122 on 2017/01/26 by Alicia.Cano
Runtime permissions support on Android
- Removing certain permissions
#jira UE-38512
#android
Change 3274311 on 2017/01/26 by Josh.Adams
Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform)
Change 3274794 on 2017/01/27 by Arciel.Rekman
Linux: fix installed SDK check (UE-40392).
- Pull request #3111 by rubu.
Change 3274803 on 2017/01/27 by Arciel.Rekman
Linux: added few more exceptions to .gitignore (UE-39612).
- Pull request #3026 by ardneran.
Change 3276247 on 2017/01/27 by Nick.Shin
HTML5 HeapSize settings - make use of it from UE4 Editor:Platforms:HTML5:Memory:HeapSize
note: emscripten says this is really no longer needed when using [ -s ALLOW_MEMORY_GROWTH=1 ] -- but tests have shown when using that, the game load/compile times takes longer
#jira UE-34753 Zen Garden cannot compile in HTML5
#jira UE-40815 Launching QAGame for HTML5 creates an 'uncaught exception: out of memory'.
Change 3276347 on 2017/01/27 by dan.reynolds
Android Streaming Test Content
Change 3276682 on 2017/01/29 by Nick.Shin
HTML5 thirdparty build scripts
- fix up what looks like a bad merge
- allow linux to also build these libs
- fixed harfbuzz to use freetype2-2.6 when building HTML5 libs
- tested on mac, linux, and windows (git-bash)
Change 3276796 on 2017/01/29 by Nick.Shin
HTML5 thirdparty (python) build scripts
- linux patches from mozilla's jukka
- tested on mac and, linux, and windows (git-bash)
part of:
#jira UEPLAT-1437 (4.16) Switch [to] web assembly
Change 3276803 on 2017/01/29 by Nick.Shin
HTML5 thirdparty build scripts
- getting ready to build with (new toolchain that has) wasm support
- minor fix to handle whitespace in project path
- tested on mac and, linux, and windows (git-bash)
part of:
#jira UEPLAT-1437 (4.16) Switch [to] web assembly
Change 3278007 on 2017/01/30 by Arciel.Rekman
SteamVR: whitelist for Linux.
- Makes Blueprint functions available in Linux builds, even if stubbed.
- Can be probably whitelisted for Mac too.
Change 3278172 on 2017/01/30 by Arciel.Rekman
Do not rebuild UnrealPak locally (UE-41285).
Change 3279873 on 2017/01/31 by Brent.Pease
+ Implement streaming in Vorbis
+ Add streaming to Android audio
+ Fix audio streaming chunk race condition
Change 3280063 on 2017/01/31 by Brent.Pease
GitHub 2949 : Fix for crashes when backgrounding/sleeping on iOS metal devices
#2949
#jira UE-38829
Change 3280072 on 2017/01/31 by Brent.Pease
PR #2889: Add -distribution when iOS distribution Packaging. with IPhonePackage.exe (Contributed by sangpan)
https://github.com/EpicGames/UnrealEngine/pull/2889
#jira ue-37874
#2889
Change 3280091 on 2017/01/31 by Arciel.Rekman
Linux: fix "unable to make writable" toast (UE-37228).
- Also fixed other platforms that returned inverted the error result.
Change 3280624 on 2017/01/31 by Brent.Pease
PR #2891: iOS IDFV string allocation fix (Contributed by robertfsegal)
https://github.com/EpicGames/UnrealEngine/pull/2891
#2891
#jira ue-37891
Change 3280625 on 2017/01/31 by Brent.Pease
GitHub 2576 - Fix UIImagePickerController crash
#2576
#jira UE-328888
Change 3281618 on 2017/02/01 by Josh.Adams
- Fixed hopeful compile error with missing inlcude
#jira UE-41415
Change 3282277 on 2017/02/01 by Josh.Adams
- Support 0.12.16 and 1.1.1 (the first versions that can share Oasis)
Change 3282441 on 2017/02/01 by Arciel.Rekman
Fix Linux editor splash screen (UE-28123).
Change 3282580 on 2017/02/01 by Nick.Shin
HTML5 - fix "firefox nighly" issue with:
failed to compile wasm module: CompileError: at offset XXX: initial memory size too big:
WARNING: this greatly impacts (in browser) compile times
Change 3285991 on 2017/02/03 by Chris.Babcock
Fix executable path for stripping Android debug symbols (handle non-Windows properly)
#jira UE-41238
#ue4
#android
Change 3286406 on 2017/02/03 by Chris.Babcock
Save and restore texture filtering for movie playback in all cases
#jira UE-41565
#ue4
#android
Change 3286800 on 2017/02/04 by Chris.Babcock
Fix executable path for stripping Android debug symbols (handle non-Windows properly)
#jira UE-41238
#ue4
#android
Change 3288598 on 2017/02/06 by Arciel.Rekman
CodeLite fixes.
- Use *-Linux-Debug binary for Debug configuration.
- Fix virtual paths.
Change 3288864 on 2017/02/06 by Josh.Adams
Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform)
- Note, Switch is known to not boot with this, fix coming next
Change 3289364 on 2017/02/06 by Josh.Adams
[BUILDUPGRADENOTES] - Fixed the "type" of the desktop device profiles to be Windows, not WindowsNoEditor, etc. It should be the platform, not a random string.
- Updated how DeviceProfiles are loaded, especially in the editor, so that we can have NDAd platforms have their default DP values in platform-hidden files
- This makes use of the ability for a class to override the platform hierarchy in the editor (like we do with other editor-exposed platform objects)
- Added Config/[PS4|XboxOne|Switch]/ConfidentialPlatform.ini files so that the DP loading code knows to look in their directories for DPs. See FGenericPlatformMisc::GetConfidentialPlatforms() for more information
- Note that saving still saves the entire DP to the .ini. Next DP change is to have them properly save against their 2(!) parents - the .ini file earlier in the hierarchy, and the parent DP object. Makes it tricky, for sure.
- Added FConfigFile::GetArray (previous was only on FConfigCacheIni)
Change 3289796 on 2017/02/07 by Arciel.Rekman
Linux: remove leftover CEF build script.
Change 3289872 on 2017/02/07 by Arciel.Rekman
Linux: install MIME types (UE-40954).
- Pull request #3154 by RicardoEPRodrigues.
Change 3289915 on 2017/02/07 by Josh.Adams
- Fixed CIS warnings
Change 3289916 on 2017/02/07 by Arciel.Rekman
Linux: remove -opengl4 from the default invocation.
Change 3290009 on 2017/02/07 by Gil.Gribb
UE4 - Fixed boot time EDL causing some issues even when it wasn't being used.
Change 3290120 on 2017/02/07 by Josh.Adams
Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform)
Change 3290948 on 2017/02/07 by Arciel.Rekman
Linux: fix crash when clicking on question mark (UE-41634).
- Symbol interposition problem (proper fix is still to be investigated).
(Edigrating part of CL 3290683 from Release-4.15 to Dev-Platform)
Change 3291074 on 2017/02/07 by Arciel.Rekman
Speculative build fix.
Change 3292028 on 2017/02/08 by Josh.Adams
- Fixed Incremental CIS build failures
Change 3292105 on 2017/02/08 by Nick.Shin
emcc.py - change warning to info
#jira UE-41747 //UE4/Dev-Platform Compile UE4Game HTML5 completed with 50 warnings
Change 3292201 on 2017/02/08 by JohnHenry.Carawon
Change comment to fix XML warning when generating project files on Linux
Change 3292242 on 2017/02/08 by Arciel.Rekman
Linux: avoid unnecessary dependency on CEF (UE-41634).
- Do not apply CEF workaround to monolithic builds (eg. stock Game/Server targets).
- Also disable CEF compilation for ShaderCompileWorker.
- Based on CL 3292077 in 4.15.
Change 3292559 on 2017/02/08 by Josh.Adams
- Added more platforms to disable the file handle caching (all the ones that use MANAGED_FILE_HANDLES)
Change 3294333 on 2017/02/09 by Josh.Adams
Merging //UE4/Dev-Main to Dev-Platform (//UE4/Dev-Platform)
Change 3294506 on 2017/02/09 by Josh.Adams
- Fixed GoogleCloudMessaging.uplugin to fix the Installed flag. Every other plugin had false, this one had true, which caused various checks to go haywire
#jira UE-41710
Change 3294984 on 2017/02/09 by Josh.Adams
- Worked around the remote compiling issue with code-based projects on a different drive than the engine
#jira UE-41704
Change 3295056 on 2017/02/09 by Josh.Adams
- Fixed the remote compiling issue by unconverting the path back to host when reading from the module filename
Change 3295161 on 2017/02/09 by Josh.Adams
- Fixed new bug when buildin native ios that was caused by a remote compile break
Change 3295229 on 2017/02/09 by Josh.Adams
- Fixed a crash in clothing on platforms that don't support clothing
#jira UE-41830
[CL 3295859 by Josh Adams in Main branch]
479 lines
13 KiB
C++
479 lines
13 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& OutDocumentationPath) const override
|
|
{
|
|
int32 ReadyToBuild = TSuper::CheckRequirements(ProjectPath, bProjectHasCode, OutDocumentationPath);
|
|
|
|
// 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"));
|
|
|
|
OutFormats.AddUnique(NAME_GLSL_150);
|
|
OutFormats.AddUnique(NAME_GLSL_430);
|
|
}
|
|
}
|
|
|
|
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 void GetAllCachedShaderFormats( TArray<FName>& OutFormats ) const override {}
|
|
|
|
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 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"));
|
|
static FName NAME_OPUS(TEXT("OPUS"));
|
|
|
|
if (Wave->IsStreaming())
|
|
{
|
|
return NAME_OPUS;
|
|
}
|
|
|
|
return 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
|