You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rb Krzysztof.Narkowicz [FYI] stu.mckenna #lockdown andrew.firth #preflight 6144aa93c2c1900001458106 #ROBOMERGE-OWNER: jon.nabozny #ROBOMERGE-AUTHOR: guillaume.abadie #ROBOMERGE-SOURCE: CL 17552625 via CL 17946034 via CL 18363801 via CL 18363965 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469) [CL 18364061 by jon nabozny in ue5-release-engine-test branch]
63 lines
1.8 KiB
C++
63 lines
1.8 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "UObject/ObjectMacros.h"
|
|
#include "Commandlets/Commandlet.h"
|
|
#include "Interfaces/ITargetPlatform.h"
|
|
#include "CookGlobalShadersCommandlet.generated.h"
|
|
|
|
struct FFileChangeData;
|
|
class UCookGlobalShadersDeviceHelperBase;
|
|
|
|
UCLASS(config=Editor)
|
|
class UCookGlobalShadersCommandlet : public UCommandlet
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
//~ Begin UCommandlet Interface
|
|
virtual int32 Main(const FString& Params) override;
|
|
//~ End UCommandlet Interface
|
|
|
|
private:
|
|
// All the derived info from command line parameters.
|
|
bool bDeployToDevice = false;
|
|
bool bCopyToStaged = false;
|
|
bool bExecuteReload = false;
|
|
FString DeployFolder;
|
|
FString PlatformName;
|
|
ITargetPlatform* TargetPlatform = nullptr;
|
|
ITargetDevicePtr TargetDevice = nullptr;
|
|
class UCookGlobalShadersDeviceHelperBase* DeviceHelper = nullptr;
|
|
TArray<FName> ShaderFormats;
|
|
|
|
// Cook, deploy and reload global shaders
|
|
void CookGlobalShaders() const;
|
|
|
|
// Callback when a shader source directory changes.
|
|
void HandleDirectoryChanged(const TArray<FFileChangeData>& InFileChangeDatas);
|
|
|
|
// Issues CookGlobalShaders() automatically when a change is detected to shader source directories.
|
|
void CookGlobalShadersOnDirectoriesChanges();
|
|
|
|
};
|
|
|
|
UCLASS(abstract, transient, MinimalAPI)
|
|
class UCookGlobalShadersDeviceHelperBase : public UObject
|
|
{
|
|
GENERATED_BODY()
|
|
public:
|
|
virtual bool CopyFilesToDevice(class ITargetDevice* Device, const TArray<TPair<FString, FString>>& FilesToCopy) const { check(false); return false; }
|
|
};
|
|
|
|
UCLASS()
|
|
class UCookGlobalShadersDeviceHelperStaged : public UCookGlobalShadersDeviceHelperBase
|
|
{
|
|
GENERATED_BODY()
|
|
public:
|
|
virtual bool CopyFilesToDevice(class ITargetDevice* Device, const TArray<TPair<FString, FString>>& FilesToCopy) const override;
|
|
|
|
FString StagedBuildPath;
|
|
};
|