You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- This feature allows different chunk layout on different platforms. - Most mapping work is done in AssetRegistryGenerator. - Terminology of ChunkID and Pakchunk Index are now separated and they are no longer the same if chunk id to pakchunk index mapping is defined. The ChunkIDs in FAssetData is not renamed to keep consistency, but it actually is pakchunk index. FAssetData.ChunkIDs is used for ChunkInstall. - Chunks with encryption key guid or unique assetregistry name are not allowed to be mapped. There are code to filter out those chunks and log errors while initializing mapping - CheckChunkAssetsAreNotInChild() and ResolveChunkDependencyGraph() is skipped when making build for XboxOne and PS4, since they are not needed. If for some reason, we need chunk dependency on console builds, we need to implement per-platform dependency graph, since now we support different chunk layout on different platforms. - Disabled a few pak file overide rules for console builds, since they should only be applied to builds with Kairos chunk layout. #test A preflight was kicked and tested on PS4 and XboxOne. No new issue was found. #rb Daniel.Lamb #ROBOMERGE-OWNER: ryan.vance #ROBOMERGE-AUTHOR: hongyi.yu #ROBOMERGE-SOURCE: CL 5470414 via CL 5474050 via CL 5474308 #ROBOMERGE-BOT: DEVVR (Main -> Dev-VR) [CL 5506163 by hongyi yu in Dev-VR branch]
188 lines
4.6 KiB
C++
188 lines
4.6 KiB
C++
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
|
|
|
|
/*=============================================================================
|
|
AllDesktopTargetPlatform.h: Declares the FDesktopTargetPlatform class.
|
|
=============================================================================*/
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Misc/ConfigCacheIni.h"
|
|
#include "Interfaces/ITargetPlatform.h"
|
|
#include "Common/TargetPlatformBase.h"
|
|
|
|
|
|
#if WITH_ENGINE
|
|
#include "AudioCompressionSettings.h"
|
|
#include "StaticMeshResources.h"
|
|
#endif // WITH_ENGINE
|
|
|
|
class UTextureLODSettings;
|
|
|
|
class FAllDesktopPlatformProperties : public FGenericPlatformProperties
|
|
{
|
|
public:
|
|
static FORCEINLINE const char* PlatformName()
|
|
{
|
|
return "AllDesktop";
|
|
}
|
|
static FORCEINLINE const char* IniPlatformName()
|
|
{
|
|
// this uses generic, non-platform-specific .ini files
|
|
return "";
|
|
}
|
|
static FORCEINLINE bool HasEditorOnlyData()
|
|
{
|
|
return false;
|
|
}
|
|
static FORCEINLINE bool RequiresCookedData()
|
|
{
|
|
return true;
|
|
}
|
|
};
|
|
|
|
/**
|
|
* FDesktopTargetPlatform, abstraction for cooking iOS platforms
|
|
*/
|
|
class FAllDesktopTargetPlatform
|
|
: public TTargetPlatformBase<FAllDesktopPlatformProperties>
|
|
{
|
|
public:
|
|
|
|
/**
|
|
* Default constructor.
|
|
*/
|
|
FAllDesktopTargetPlatform();
|
|
|
|
/**
|
|
* Destructor.
|
|
*/
|
|
~FAllDesktopTargetPlatform();
|
|
|
|
public:
|
|
|
|
//~ Begin TTargetPlatformBase Interface
|
|
|
|
virtual bool IsServerOnly( ) const override
|
|
{
|
|
return false;
|
|
}
|
|
|
|
//~ End TTargetPlatformBase Interface
|
|
|
|
public:
|
|
|
|
//~ Begin ITargetPlatform Interface
|
|
|
|
virtual void EnableDeviceCheck(bool OnOff) override
|
|
{
|
|
}
|
|
|
|
virtual void GetAllDevices( TArray<ITargetDevicePtr>& OutDevices ) const override
|
|
{
|
|
}
|
|
|
|
virtual bool GenerateStreamingInstallManifest(const TMultiMap<FString, int32>& PakchunkMap, const TSet<int32>& PakchunkIndicesInUse) const override
|
|
{
|
|
return true;
|
|
}
|
|
|
|
virtual ITargetDevicePtr GetDefaultDevice( ) const override
|
|
{
|
|
return NULL;
|
|
}
|
|
|
|
virtual ITargetDevicePtr GetDevice( const FTargetDeviceId& DeviceId ) override
|
|
{
|
|
return NULL;
|
|
}
|
|
|
|
virtual bool IsRunningPlatform( ) const override
|
|
{
|
|
return false;
|
|
}
|
|
|
|
virtual bool SupportsFeature( ETargetPlatformFeatures Feature ) const override
|
|
{
|
|
return TTargetPlatformBase<FAllDesktopPlatformProperties>::SupportsFeature(Feature);
|
|
}
|
|
|
|
virtual bool IsSdkInstalled(bool bProjectHasCode, FString& OutTutorialPath) const override
|
|
{
|
|
return true;
|
|
}
|
|
|
|
virtual int32 CheckRequirements(const FString& ProjectPath, bool bProjectHasCode, FString& OutTutorialPath, FString& OutDocumenationPath, FText& CustomizedLogMessage) const override
|
|
{
|
|
return ETargetPlatformReadyStatus::Ready;
|
|
}
|
|
|
|
|
|
#if WITH_ENGINE
|
|
|
|
virtual void GetAllPossibleShaderFormats( TArray<FName>& OutFormats ) const override;
|
|
|
|
virtual void GetAllTargetedShaderFormats( TArray<FName>& OutFormats ) const override;
|
|
|
|
virtual const class FStaticMeshLODSettings& GetStaticMeshLODSettings( ) const override
|
|
{
|
|
return StaticMeshLODSettings;
|
|
}
|
|
|
|
virtual void GetTextureFormats(const UTexture* Texture, TArray<FName>& OutFormats) const override;
|
|
|
|
virtual void GetAllTextureFormats(TArray<FName>& OutFormats) const override;
|
|
|
|
|
|
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;
|
|
virtual void GetAllWaveFormats(TArray<FName>& OutFormats) const override;
|
|
|
|
virtual FPlatformAudioCookOverrides* GetAudioCompressionSettings() const override
|
|
{
|
|
return nullptr;
|
|
}
|
|
#endif // WITH_ENGINE
|
|
|
|
|
|
DECLARE_DERIVED_EVENT(FAllDesktopTargetPlatform, ITargetPlatform::FOnTargetDeviceDiscovered, FOnTargetDeviceDiscovered);
|
|
virtual FOnTargetDeviceDiscovered& OnDeviceDiscovered( ) override
|
|
{
|
|
return DeviceDiscoveredEvent;
|
|
}
|
|
|
|
DECLARE_DERIVED_EVENT(FAllDesktopTargetPlatform, ITargetPlatform::FOnTargetDeviceLost, FOnTargetDeviceLost);
|
|
virtual FOnTargetDeviceLost& OnDeviceLost( ) override
|
|
{
|
|
return DeviceLostEvent;
|
|
}
|
|
|
|
private:
|
|
|
|
#if WITH_ENGINE
|
|
// Holds the Engine INI settings, for quick use.
|
|
FConfigFile EngineSettings;
|
|
|
|
// Holds the cache of the target LOD settings.
|
|
const UTextureLODSettings* TextureLODSettings;
|
|
|
|
// Holds the static mesh LOD settings.
|
|
FStaticMeshLODSettings StaticMeshLODSettings;
|
|
#endif // WITH_ENGINE
|
|
|
|
// 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;
|
|
};
|