diff --git a/Code/Tools/FBuild/FBuildCore/Protocol/Client.cpp b/Code/Tools/FBuild/FBuildCore/Protocol/Client.cpp index 2a5865a0a..6f4f89f99 100644 --- a/Code/Tools/FBuild/FBuildCore/Protocol/Client.cpp +++ b/Code/Tools/FBuild/FBuildCore/Protocol/Client.cpp @@ -16,6 +16,7 @@ #include #include "Tools/FBuild/FBuildCore/WorkerPool/Job.h" #include "Tools/FBuild/FBuildCore/WorkerPool/JobQueue.h" +#include "Tools/FBuild/FBuildCore/Helpers/Compressor.h" #include "Core/Env/ErrorFormat.h" #include "Core/FileIO/ConstMemoryStream.h" @@ -500,6 +501,9 @@ void Client::Process( const ConnectionInfo * connection, const Protocol::MsgJobR uint32_t buildTime; ms.Read( buildTime ); + bool isDataCompressed = false; + ms.Read( isDataCompressed ); + uint16_t remoteThreadId = 0; ms.Read( remoteThreadId ); @@ -547,6 +551,16 @@ void Client::Process( const ConnectionInfo * connection, const Protocol::MsgJobR if ( result == true ) { // built ok - serialize to disc + + + Compressor c; + if (isDataCompressed) + { + c.Decompress(data); + data = c.GetResult(); + dataSize = (uint32_t)c.GetResultSize(); + } + MultiBuffer mb( data, dataSize ); ObjectNode * objectNode = job->GetNode()->CastTo< ObjectNode >(); diff --git a/Code/Tools/FBuild/FBuildCore/Protocol/Server.cpp b/Code/Tools/FBuild/FBuildCore/Protocol/Server.cpp index cec9ab41a..8ca2372dd 100644 --- a/Code/Tools/FBuild/FBuildCore/Protocol/Server.cpp +++ b/Code/Tools/FBuild/FBuildCore/Protocol/Server.cpp @@ -636,6 +636,7 @@ void Server::FinalizeCompletedJobs() ms.Write( job->GetSystemErrorCount() > 0 ); ms.Write( job->GetMessages() ); ms.Write( job->GetNode()->GetLastBuildTime() ); + ms.Write( job->IsDataCompressed() ); ms.Write( job->GetRemoteThreadIndex() ); // The thread used to build the job to assist with visualization // write the data - build result for success, or output+errors for failure diff --git a/Code/Tools/FBuild/FBuildCore/WorkerPool/JobQueueRemote.cpp b/Code/Tools/FBuild/FBuildCore/WorkerPool/JobQueueRemote.cpp index ff9eb4ccb..36366f4bf 100644 --- a/Code/Tools/FBuild/FBuildCore/WorkerPool/JobQueueRemote.cpp +++ b/Code/Tools/FBuild/FBuildCore/WorkerPool/JobQueueRemote.cpp @@ -13,6 +13,7 @@ #include "Tools/FBuild/FBuildCore/Graph/ObjectNode.h" #include "Tools/FBuild/FBuildCore/Helpers/BuildProfiler.h" #include "Tools/FBuild/FBuildCore/Helpers/MultiBuffer.h" +#include "Tools/FBuild/FBuildCore/Helpers/Compressor.h" // Core #include "Core/Env/ErrorFormat.h" @@ -450,7 +451,12 @@ void JobQueueRemote::FinishedProcessingJob( Job * job, bool success ) // transfer data to job size_t memSize; void * mem = mb.Release( memSize ); - job->OwnData( mem, memSize ); + // job->OwnData( mem, memSize ); + + Compressor c; + c.Compress(mem, memSize); + size_t compressedSize = c.GetResultSize(); + job->OwnData( c.ReleaseResult(), compressedSize, true ); return true; } diff --git a/README.md b/README.md index c80472da4..a5213ca3b 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,9 @@ This FASTBuild branch is based on v1.04, and modified to fit Unreal 4.26.2, curr - VS2019 Community 14.28.29910 - Windows SDK 10.0.19041.0 -If other platform or compiler is used, `.bff` file in `External/SDK` should be modified. +If different version platform or compiler is used, `.bff` file in `External/SDK` should be modified. + +For example, if you are using Windows SDK 10.0.17763.0, version number in `External/SDK/Windows/Windows10SDK.bff` should be modified. If you are using VS2019 Enterprise or a different version, version number in `External/SDK/VisualStudio/VisualStudio.bff` and `External/SDK/VisualStudio/VS2019.bff` should be modified. ## Usage 1. Compile this project: run FBuild.exe (official v1.04 release) `FBuild.exe All-x64-Release -dist -clean` in path `Code/`.