You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Staged builds are explicitly assigned a project id via the persistent UECommandline.txt file. This works on mobile/consoles, but isn't implemented for Windows/Linux/Mac, so staged builds for those platforms don't have a persistent assignment of project id and instead rely on the launch by the editor including the appropriate commandlines. Unstaged builds on Windows/Mac/Linux now determine project id independently after they have determined the project file path. This happens after the project file has been determined and has had case corrected. This ensures it is different/unique for multiple blueprint projects that share the same executable. Fix a bug where second cook in editor to zen would stall because the queue thinks all additions are finished due to a boolean that isn't reset. #rb devin.doucette #rb per.larsson #preflight 61b39a35a2562c8b1c40f81e #ROBOMERGE-AUTHOR: zousar.shaker #ROBOMERGE-SOURCE: CL 18432317 in //UE5/Release-5.0/... via CL 18435404 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271) [CL 18435895 by zousar shaker in ue5-release-engine-test branch]
87 lines
2.7 KiB
C++
87 lines
2.7 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "Async/Future.h"
|
|
#include "Containers/Array.h"
|
|
#include "Containers/StringView.h"
|
|
#include "HAL/CriticalSection.h"
|
|
#include "HAL/Platform.h"
|
|
#include "IO/IoDispatcher.h"
|
|
#include "Misc/StringBuilder.h"
|
|
#include "Serialization/CompactBinaryPackage.h"
|
|
#include "Templates/UniquePtr.h"
|
|
#include "ZenServerInterface.h"
|
|
|
|
class FCbPackage;
|
|
class FCbObject;
|
|
|
|
namespace UE {
|
|
namespace Zen {
|
|
struct FZenHttpRequestPool;
|
|
}
|
|
|
|
/**
|
|
* HTTP protocol implementation of Zen Store client interface
|
|
*/
|
|
class IOSTOREUTILITIES_API FZenStoreHttpClient
|
|
{
|
|
public:
|
|
FZenStoreHttpClient();
|
|
FZenStoreHttpClient(FStringView HostName, uint16 Port);
|
|
FZenStoreHttpClient(UE::Zen::FServiceSettings&& InSettings);
|
|
~FZenStoreHttpClient();
|
|
|
|
bool TryCreateProject(FStringView InProjectId, FStringView InOplogId, FStringView ServerRoot,
|
|
FStringView EngineRoot, FStringView ProjectRoot);
|
|
bool TryCreateOplog(FStringView InProjectId, FStringView InOplogId, bool bFullBuild);
|
|
|
|
void InitializeReadOnly(FStringView InProjectId, FStringView InOplogId);
|
|
|
|
bool IsConnected() const;
|
|
|
|
void StartBuildPass();
|
|
TIoStatusOr<uint64> EndBuildPass(FCbPackage OpEntry);
|
|
|
|
TIoStatusOr<uint64> AppendOp(FCbPackage OpEntry);
|
|
|
|
TIoStatusOr<uint64> GetChunkSize(const FIoChunkId& Id);
|
|
TIoStatusOr<FIoBuffer> ReadChunk(const FIoChunkId& Id, uint64 Offset = 0, uint64 Size = ~0ull);
|
|
TIoStatusOr<FIoBuffer> ReadOpLogAttachment(FStringView Id);
|
|
|
|
#if UE_WITH_ZEN
|
|
const TCHAR* GetHostName() const { return ZenService.GetInstance().GetHostName(); }
|
|
uint16 GetPort() const { return ZenService.GetInstance().GetPort(); }
|
|
const UE::Zen::FZenServiceInstance& GetZenServiceInstance() const { return ZenService.GetInstance(); }
|
|
#else // Default to localhost:1337 for platforms where Zen wouldn't be supported yet
|
|
const TCHAR* GetHostName() const { return TEXT("localhost"); }
|
|
uint16 GetPort() const { return 1337; }
|
|
#endif
|
|
|
|
TFuture<TIoStatusOr<FCbObject>> GetOplog();
|
|
TFuture<TIoStatusOr<FCbObject>> GetFiles();
|
|
|
|
static const UTF8CHAR* FindOrAddAttachmentId(FUtf8StringView AttachmentText);
|
|
static const UTF8CHAR* FindAttachmentId(FUtf8StringView AttachmentText);
|
|
|
|
static FString GenerateDefaultProjectId();
|
|
private:
|
|
TIoStatusOr<FIoBuffer> ReadOpLogUri(FStringBuilderBase& ChunkUri, uint64 Offset = 0, uint64 Size = ~0ull);
|
|
|
|
static const uint32 PoolEntryCount;
|
|
#if UE_WITH_ZEN
|
|
UE::Zen::FScopeZenService ZenService;
|
|
#endif
|
|
TUniquePtr<Zen::FZenHttpRequestPool> RequestPool;
|
|
FString OplogPath;
|
|
FString OplogNewEntryPath;
|
|
FString OplogPrepNewEntryPath;
|
|
FString TempDirPath;
|
|
uint64 StandaloneThresholdBytes = 1 * 1024 * 1024;
|
|
bool bAllowRead = false;
|
|
bool bAllowEdit = false;
|
|
bool bConnectionSucceeded = false;
|
|
};
|
|
|
|
}
|