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-174785 #rnx #preflight 63d3d027f6267152017a68dd - There are some circumstances where we want to be sure that locations do not contain virtualized data. As an example we were to accidently virtualize an engine package and then distribute that with an engine release it will not work for people. This commandlet is designed to be run as part of a CIS to detect this sort of thing and raise errors so that they can be corrected. - We support three forms of validation -- '-CheckEngine' which errors if the engine or its plugins contain virtualized data -- '-CheckProject' which errors if the current project or its plugins contain virtualized data -- '-CheckDir' which errors if the given directory or its subdirectories contain virtualized data. More than one path can be supplied by using '+' as the delimiter. [CL 23905198 by paul chipchase in ue5-main branch]
52 lines
1.6 KiB
C++
52 lines
1.6 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "Commandlets/Commandlet.h"
|
|
#include "UObject/ObjectMacros.h"
|
|
|
|
#include "ValidateVirtualizedContentCommandlet.generated.h"
|
|
|
|
/**
|
|
* Used to validate that content does not contain virtualized payloads. The current
|
|
* cmdline options are:
|
|
* -CheckEngine
|
|
* Checks all packages currently mounted in the engine
|
|
* -CheckProject
|
|
* Checks all packages currently mounted in the current project
|
|
* -CheckDir=XYZ (XYZ is the path to the directory, use '+' as the delimiter if supplying
|
|
* more than one path)
|
|
* Checks packages in the given directory and all subdirectories
|
|
* any or all of which can be passed to the commandlet.
|
|
*
|
|
* If virtualized payloads are found then the package path (or file path if CheckDir
|
|
* indicates a directory that is not currently mounted by the porject) is logged
|
|
* as an error and the commandlet will eventually return 1 as a failure value.
|
|
*
|
|
* Because the commmandlet is the VirtualizationEditor module it needs to be invoked
|
|
* with the command line:
|
|
* -run=VirtualizationEditor.ValidateVirtualizedContent
|
|
*
|
|
* Followed by
|
|
*/
|
|
UCLASS()
|
|
class UValidateVirtualizedContentCommandlet
|
|
: public UCommandlet
|
|
{
|
|
GENERATED_UCLASS_BODY()
|
|
|
|
//~ Begin UCommandlet Interface
|
|
virtual int32 Main(const FString& Params) override;
|
|
//~ End UCommandlet Interface
|
|
|
|
static int32 StaticMain(const FString& Params);
|
|
|
|
private:
|
|
|
|
TArray<FString> FindVirtualizedPackages(const TArray<FString>& PackagePaths);
|
|
|
|
bool TryValidateContent(const TCHAR* DebugName, const TArray<FString>& Packages);
|
|
bool TryValidateDirectory(const FString& Directory);
|
|
|
|
};
|