2023-01-30 04:56:40 -05:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "Commandlets/Commandlet.h"
|
|
|
|
|
#include "UObject/ObjectMacros.h"
|
|
|
|
|
|
|
|
|
|
#include "ValidateVirtualizedContentCommandlet.generated.h"
|
|
|
|
|
|
2023-04-05 04:22:43 -04:00
|
|
|
namespace UE { class FPackageTrailer; }
|
|
|
|
|
namespace UE { class FIoHashToPackagesLookup; }
|
|
|
|
|
|
|
|
|
|
class FIoHashToPackagesLookup;
|
|
|
|
|
struct FIoHash;
|
|
|
|
|
|
2023-01-30 04:56:40 -05:00
|
|
|
/**
|
2023-02-28 10:48:04 -05:00
|
|
|
* Iterates over all of the packages in a project and identifies which packages contain
|
|
|
|
|
* references to virtualized payloads. The commandlet will then check that all virtualized
|
|
|
|
|
* payloads can be found in persistent storage. Error messages will be logged for
|
|
|
|
|
* packages that contain virtualized payloads that cannot be found in one or more persistent
|
|
|
|
|
* storage backend.
|
2023-01-30 04:56:40 -05:00
|
|
|
*
|
2023-02-28 10:48:04 -05:00
|
|
|
* Because the commandlet is the VirtualizationEditor module it needs to be invoked
|
2023-01-30 04:56:40 -05:00
|
|
|
* with the command line:
|
2023-03-10 02:56:22 -05:00
|
|
|
* -run="VirtualizationEditor.ValidateVirtualizedContent"
|
2023-01-30 04:56:40 -05:00
|
|
|
*/
|
|
|
|
|
UCLASS()
|
|
|
|
|
class UValidateVirtualizedContentCommandlet
|
|
|
|
|
: public UCommandlet
|
|
|
|
|
{
|
2023-04-05 04:22:43 -04:00
|
|
|
private:
|
2023-01-30 04:56:40 -05:00
|
|
|
GENERATED_UCLASS_BODY()
|
|
|
|
|
|
|
|
|
|
//~ Begin UCommandlet Interface
|
|
|
|
|
virtual int32 Main(const FString& Params) override;
|
|
|
|
|
//~ End UCommandlet Interface
|
|
|
|
|
|
|
|
|
|
static int32 StaticMain(const FString& Params);
|
2023-04-05 04:22:43 -04:00
|
|
|
|
|
|
|
|
int32 ValidatePayloadsExists(const TMap<FString, UE::FPackageTrailer>& Packages, const TSet<FIoHash>& Payloads);
|
|
|
|
|
|
|
|
|
|
int32 ValidatePayloadContent(const TMap<FString, UE::FPackageTrailer>& Packages, const TSet<FIoHash>& Payloads, const UE::FIoHashToPackagesLookup& PkgLookupTable);
|
2023-01-30 04:56:40 -05:00
|
|
|
};
|