You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Add support for importing uncooked source packages from cooked packages #rnx #jira UE-136265, FORT-426538 #rb pj.kack #preflight 61e6ff6a3778a195debba826 #ROBOMERGE-OWNER: marc.audy #ROBOMERGE-AUTHOR: carlmagnus.nordin #ROBOMERGE-SOURCE: CL 18655480 via CL 18664834 via CL 18665656 via CL 18665916 via CL 18667722 via CL 18667764 via CL 18668174 #ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v901-18665521) [CL 18668352 by marc audy in ue5-main branch]
70 lines
1.8 KiB
C++
70 lines
1.8 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "IO/PackageId.h"
|
|
#include "IO/PackageStore.h"
|
|
#include "Misc/PackagePath.h"
|
|
|
|
struct FIoContainerHeader;
|
|
struct FFilePackageStoreEntry;
|
|
|
|
/*
|
|
* File/container based package store.
|
|
*/
|
|
class FFilePackageStore
|
|
: public FPackageStoreBase
|
|
{
|
|
public:
|
|
FFilePackageStore();
|
|
virtual ~FFilePackageStore();
|
|
|
|
virtual void Initialize() override;
|
|
virtual void Lock() override;
|
|
virtual void Unlock() override;
|
|
virtual bool DoesPackageExist(FPackageId PackageId) override;
|
|
virtual EPackageStoreEntryStatus GetPackageStoreEntry(FPackageId PackageId, FPackageStoreEntry& OutPackageStoreEntry) override;
|
|
virtual bool GetPackageRedirectInfo(FPackageId PackageId, FName& OutSourcePackageName, FPackageId& OutRedirectedToPackageId) override;
|
|
|
|
void Mount(const FIoContainerHeader* ContainerHeader, uint32 Order);
|
|
void Unmount(const FIoContainerHeader* ContainerHeader);
|
|
|
|
private:
|
|
struct FMountedContainer
|
|
{
|
|
const FIoContainerHeader* ContainerHeader;
|
|
uint32 Order;
|
|
};
|
|
|
|
#if WITH_EDITOR
|
|
struct FUncookedPackage
|
|
{
|
|
FName PackageName;
|
|
EPackageExtension HeaderExtension;
|
|
};
|
|
#endif
|
|
|
|
void Update();
|
|
#if WITH_EDITOR
|
|
uint64 AddUncookedPackagesFromRoot(const FString& RootPath);
|
|
#endif
|
|
|
|
FRWLock EntriesLock;
|
|
FCriticalSection UpdateLock;
|
|
TArray<FMountedContainer> MountedContainers;
|
|
TMap<FPackageId, const FFilePackageStoreEntry*> StoreEntriesMap;
|
|
TMap<FPackageId, TTuple<FName, FPackageId>> RedirectsPackageMap;
|
|
TMap<FPackageId, FName> LocalizedPackages;
|
|
bool bNeedsUpdate = false;
|
|
|
|
#if WITH_EDITOR
|
|
FDelegateHandle OnContentPathMountedDelegateHandle;
|
|
FCriticalSection UncookedPackageRootsLock;
|
|
TSet<FString> PendingUncookedPackageRoots;
|
|
TMap<FPackageId, FUncookedPackage> UncookedPackagesMap;
|
|
#endif
|
|
|
|
static thread_local int32 LockedOnThreadCount;
|
|
};
|