You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rb PJ.Kack #rnx #preflight 61af1090c6650f98a97782a4 - The source control backend will now attempt to create the temporary workspace as a partitioned workspace by default. - This can be overriden via the config file when defining the virtualization graph. #ROBOMERGE-AUTHOR: paul.chipchase #ROBOMERGE-SOURCE: CL 18392795 in //UE5/Release-5.0/... via CL 18392806 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v896-18170469) [CL 18392807 by paul chipchase in ue5-release-engine-test branch]
62 lines
2.0 KiB
C++
62 lines
2.0 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "IVirtualizationBackend.h"
|
|
|
|
#include "Containers/StringView.h"
|
|
|
|
namespace UE::Virtualization
|
|
{
|
|
|
|
/**
|
|
* This backend can be used to access payloads stored in source control.
|
|
* The backend doesn't 'check out' a payload file but instead will just download the payload as
|
|
* a binary blob.
|
|
* It is assumed that the files are stored with the same path convention as the file system
|
|
* backend, found in Utils::PayloadIdToPath.
|
|
*
|
|
* Ini file setup:
|
|
* 'Name'=(Type=SourceControl, DepotRoot="//XXX/")
|
|
* Where 'Name' is the backend name in the hierarchy and 'XXX' is the path in the source control
|
|
* depot where the payload files are being stored.
|
|
*
|
|
* Optional Values:
|
|
* UsePartitionedClient: When true the temporary workspace client created to submit payloads
|
|
* from will be created as a partitioned workspace which is less overhead
|
|
* on the source control server. If your server does not support this then
|
|
* use false. [Default=True]
|
|
*/
|
|
class FSourceControlBackend final : public IVirtualizationBackend
|
|
{
|
|
public:
|
|
explicit FSourceControlBackend(FStringView ConfigName, FStringView InDebugName);
|
|
virtual ~FSourceControlBackend() = default;
|
|
|
|
private:
|
|
/* IVirtualizationBackend implementation */
|
|
|
|
virtual bool Initialize(const FString& ConfigEntry) override;
|
|
|
|
virtual EPushResult PushData(const FPayloadId& Id, const FCompressedBuffer& Payload, const FPackagePath& PackageContext) override;
|
|
|
|
virtual FCompressedBuffer PullData(const FPayloadId& Id) override;
|
|
|
|
virtual bool DoesPayloadExist(const FPayloadId& Id) override;
|
|
|
|
virtual bool DoPayloadsExist(TArrayView<const FPayloadId> PayloadIds, TArray<bool>& OutResults) override;
|
|
|
|
private:
|
|
|
|
void CreateDepotPath(const FPayloadId& PayloadId, FStringBuilderBase& OutPath);
|
|
|
|
/** The root where the virtualized payloads are stored in source control */
|
|
FString DepotRoot;
|
|
|
|
/** Should we try to make the temp client partitioned or not? */
|
|
bool bUsePartitionedClient = true;
|
|
|
|
};
|
|
|
|
} // namespace UE::Virtualization
|