You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Second batch of remaining Engine copyright updates. #rnx #rb none #jira none #ROBOMERGE-OWNER: ben.marsh #ROBOMERGE-AUTHOR: ryan.durand #ROBOMERGE-SOURCE: CL 10871196 in //UE4/Main/... #ROBOMERGE-BOT: BUILD (Main -> Dev-Build) (v624-10872983) [CL 10876691 by ben marsh in Dev-Build branch]
65 lines
1.5 KiB
C#
65 lines
1.5 KiB
C#
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
using System;
|
|
using Microsoft.Win32;
|
|
|
|
namespace UnrealBuildTool.Rules
|
|
{
|
|
public class VisualStudioCodeSourceCodeAccess : ModuleRules
|
|
{
|
|
public VisualStudioCodeSourceCodeAccess(ReadOnlyTargetRules Target) : base(Target)
|
|
{
|
|
PrivateDependencyModuleNames.AddRange(
|
|
new string[]
|
|
{
|
|
"Core",
|
|
"SourceCodeAccess",
|
|
"DesktopPlatform",
|
|
}
|
|
);
|
|
|
|
if (Target.bBuildEditor)
|
|
{
|
|
PrivateDependencyModuleNames.Add("HotReload");
|
|
}
|
|
|
|
bool bHasVisualStudioDTE;
|
|
try
|
|
{
|
|
// Interrogate the Win32 registry
|
|
string DTEKey = null;
|
|
switch (Target.WindowsPlatform.Compiler)
|
|
{
|
|
case WindowsCompiler.VisualStudio2019:
|
|
DTEKey = "VisualStudio.DTE.16.0";
|
|
break;
|
|
case WindowsCompiler.VisualStudio2017:
|
|
DTEKey = "VisualStudio.DTE.15.0";
|
|
break;
|
|
case WindowsCompiler.VisualStudio2015_DEPRECATED:
|
|
DTEKey = "VisualStudio.DTE.14.0";
|
|
break;
|
|
default:
|
|
throw new Exception("Unknown visual studio version when mapping to DTEKey: " +
|
|
Target.WindowsPlatform.Compiler.ToString());
|
|
}
|
|
bHasVisualStudioDTE = RegistryKey.OpenBaseKey(RegistryHive.ClassesRoot, RegistryView.Registry32).OpenSubKey(DTEKey) != null;
|
|
}
|
|
catch
|
|
{
|
|
bHasVisualStudioDTE = false;
|
|
}
|
|
|
|
if (bHasVisualStudioDTE)
|
|
{
|
|
PublicDefinitions.Add("VSACCESSOR_HAS_DTE=1");
|
|
}
|
|
else
|
|
{
|
|
PublicDefinitions.Add("VSACCESSOR_HAS_DTE=0");
|
|
}
|
|
|
|
bBuildLocallyWithSNDBS = true;
|
|
}
|
|
}
|
|
}
|