You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
* Lots of code moved into IDesktopPlatform for sharing with Launcher and Mac (including setting up file associations, querying project versions, etc...) * Hack to enumerate all the known launcher engine installations. Does not use registry keys any more. Will probably change to use a list of installations generated by the launcher at some point soon. * List of registered GitHub builds is stored in HKEY_CURRENT_USER * Switching engine versions is now done through a dialog rather than through the context menu. * VersionSelector includes a version number for shell integration, allowing it to defer to an existing installation of the same version if necessary. #codereview Michael.Trepka [CL 2045845 by Ben Marsh in Main branch]
62 lines
1.5 KiB
C
62 lines
1.5 KiB
C
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
struct FRegistryValue
|
|
{
|
|
uint32 Type;
|
|
TArray<uint8> Data;
|
|
|
|
FRegistryValue();
|
|
|
|
void Set(const FString &NewValue);
|
|
void Set(uint32 NewValue);
|
|
|
|
bool Read(HKEY hKey, const FString &Name);
|
|
bool Write(HKEY hKey, const FString &Name) const;
|
|
bool IsUpToDate(HKEY hKey, const FString &Name) const;
|
|
};
|
|
|
|
struct FRegistryKey : FNoncopyable
|
|
{
|
|
TMap<FString, FRegistryKey*> Keys;
|
|
TMap<FString, FRegistryValue*> Values;
|
|
|
|
FRegistryKey();
|
|
~FRegistryKey();
|
|
|
|
FRegistryKey *FindOrAddKey(const FString &Name);
|
|
FRegistryValue *FindOrAddValue(const FString &Name);
|
|
|
|
void SetValue(const FString &Name, const FString &Value);
|
|
void SetValue(const FString &Name, uint32 Value);
|
|
|
|
bool Read(HKEY hKey);
|
|
bool Read(HKEY hKey, const FString &Path);
|
|
|
|
bool Write(HKEY hKey, bool bRemoveDifferences) const;
|
|
bool Write(HKEY hKey, const FString &Path, bool bRemoveDifferences) const;
|
|
|
|
bool IsUpToDate(HKEY hKey, bool bRemoveDifferences) const;
|
|
bool IsUpToDate(HKEY hKey, const FString &Path, bool bRemoveDifferences) const;
|
|
};
|
|
|
|
struct FRegistryRootedKey
|
|
{
|
|
HKEY hRootKey;
|
|
FString Path;
|
|
TScopedPointer<FRegistryKey> Key;
|
|
|
|
FRegistryRootedKey(HKEY hInKeyRoot, const FString &InPath);
|
|
|
|
bool Exists() const;
|
|
|
|
bool Read();
|
|
bool Write(bool bRemoveDifferences) const;
|
|
bool IsUpToDate(bool bRemoveDifferences) const;
|
|
};
|
|
|
|
bool EnumerateRegistryKeys(HKEY hKey, TArray<FString> &OutNames);
|
|
bool EnumerateRegistryValues(HKEY hKey, TArray<FString> &OutNames);
|
|
|