You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rb Per.Larsson #jira UE-169626 #rnx #preflight 639c4112012902cb8db43e13 - This allows us to provide the user with more ways to customize the virtualization and return more detailed info about it if the calling code wishes to log additional info. In both cases we can extend the options and the data returned without changing the API. - Previously if we virtualized a package that was not checked out in revision control we would warn the user and then skip updating the package file on disk. This means the payloads would be uploaded but the user would be left with no local changes. Since sometimes we know we don't need to check out any package (virtualizing the packages in a change list for example) we don't want to always incur the cost of polling reivision control to see which packages do need checking out. This is why we now allow the caller to request package files be checked out via the new options enum EVirtualizationOptions. -- If the EVirtualizationOptions::Checkout flag is provided we will poll the revision control status of all package files and then check out those which need it. -- We still check if packages can be modified and warn the user if they can't, as package files could be locked in other ways. - Added a new utility function to SourceControlUtilties to make it easier to check out packages. There is similar functionality elsewhere in the code base but the virtualization module is too low level to make use of it. - Updated existing code that calls ::TryVirtualizePackages and add cases of ''using namespace UE::Virtualization' where required to improve readability. - The UnrealVirtualizationTool now supports a new cmdline option "-checkout" that can be used when virtualizing packages. This will checkout any package that was actually virtualized so the result can be saved back out to the workspace domain. This means we no longer require the caller to have checked out the packages before running the tool. [CL 23536832 by paul chipchase in ue5-main branch]
44 lines
1.5 KiB
C++
44 lines
1.5 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "Virtualization/VirtualizationSystem.h"
|
|
|
|
namespace UE::Virtualization
|
|
{
|
|
|
|
/**
|
|
* Utility function to make it easier to check out a number of files from revision control. Note that
|
|
* the function does not do anything to files that are already checked out.
|
|
*
|
|
* @param FilesToCheckout A list of files to check out of revision control
|
|
* @param OutErrors The function will place any errors encountered here
|
|
* @param OutFilesCheckedOut An optional array, which if provided will be filled in with the list
|
|
* of files that were actually checked out from revision control.
|
|
*/
|
|
bool TryCheckoutFiles(const TArray<FString>& FilesToCheckout, TArray<FText>& OutErrors, TArray<FString>* OutFilesCheckedOut);
|
|
|
|
} // UE::Virtualization
|
|
|
|
namespace UE::Virtualization::Experimental
|
|
{
|
|
|
|
class FVirtualizationSourceControlUtilities : public IVirtualizationSourceControlUtilities
|
|
{
|
|
public:
|
|
FVirtualizationSourceControlUtilities() = default;
|
|
~FVirtualizationSourceControlUtilities() = default;
|
|
|
|
private:
|
|
/**
|
|
* Wrapper call around SyncPayloadSidecarFileInternal which will either call it directly
|
|
* or attempt to marshal it to the main thread if needed
|
|
*/
|
|
virtual bool SyncPayloadSidecarFile(const FPackagePath& PackagePath) override;
|
|
|
|
/** Effectively the override of IVirtualizationSourceControlUtilities::SyncPayloadSidecarFile */
|
|
bool SyncPayloadSidecarFileInternal(const FPackagePath& PackagePath);
|
|
};
|
|
|
|
} // namespace UE::Virtualization::Experimental
|