#jira UE-61890 Fix XGE shader compilation on newer incredibuilds by checking registry for path

#rb luke.thatcher
[CODEREVIEW] luke.thatcher

#ROBOMERGE-SOURCE: CL 4440861 in //UE4/Release-4.21/...
#ROBOMERGE-BOT: RELEASE (Release-4.21 -> Release-Staging-4.21)

[CL 4440866 by ben zeigler in Staging-4.21 branch]
This commit is contained in:
ben zeigler
2018-10-09 14:11:18 -04:00
parent 99daf2d40a
commit 3604987970

View File

@@ -197,6 +197,19 @@ bool FXGEControllerModule::IsSupported()
// Check for a valid installation of Incredibuild by seeing if xgconsole.exe exists.
if (XGEControllerVariables::Enabled == 1)
{
// Try to read from the registry
FString RegistryPathString;
if (!FWindowsPlatformMisc::QueryRegKey(HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\Xoreax\\IncrediBuild\\Builder"), TEXT("Folder"), RegistryPathString))
{
FWindowsPlatformMisc::QueryRegKey(HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\WOW6432Node\\Xoreax\\IncrediBuild\\Builder"), TEXT("Folder"), RegistryPathString);
}
if (!RegistryPathString.IsEmpty())
{
RegistryPathString = FPaths::Combine(RegistryPathString, TEXT("xgConsole.exe"));
}
// Try to find xgConsole.exe from the PATH environment variable
FString PathString;
{
@@ -220,6 +233,7 @@ bool FXGEControllerModule::IsSupported()
// List of possible paths to xgconsole.exe
const FString Paths[] =
{
*RegistryPathString,
TEXT("C:\\Program Files\\Xoreax\\IncrediBuild\\xgConsole.exe"),
TEXT("C:\\Program Files (x86)\\Xoreax\\IncrediBuild\\xgConsole.exe"),
*PathString