Various fixes for using a non-default source code accessor in the editor.

* Fix incorrect path for tutorial dialog explaining how to install Visual Studio
* Tell the user that they need to restart when changing their source code accessor.
* On Windows, always check for the presence of Visual Studio 2017 or 2019 when determining whether the user can compile. This is distinct from whether the user has the chosen IDE available.

#rb none
#jira UE-69253

#ROBOMERGE-OWNER: lina.halper
#ROBOMERGE-AUTHOR: ben.marsh
#ROBOMERGE-SOURCE: CL 4951506 in //UE4/Release-4.22/... via CL 4951508
#ROBOMERGE-BOT: ANIM (Main -> Dev-Anim)

[CL 5023935 by ben marsh in Dev-Anim branch]
This commit is contained in:
ben marsh
2019-02-16 03:01:39 -05:00
parent eb3adf5220
commit d43b86cd62
6 changed files with 36 additions and 4 deletions

View File

@@ -69,6 +69,28 @@ bool FSourceCodeAccessModule::CanAccessSourceCode() const
return CurrentSourceCodeAccessor->CanAccessSourceCode();
}
bool FSourceCodeAccessModule::CanCompileSourceCode() const
{
#if PLATFORM_WINDOWS
// Need to have Visual Studio installed to compile on Windows, regardless of chosen IDE
return IsSourceCodeAccessorAvailable("VisualStudio2017") || IsSourceCodeAccessorAvailable("VisualStudio2019");
#else
// Default behavior
return CanAccessSourceCode();
#endif
}
bool FSourceCodeAccessModule::IsSourceCodeAccessorAvailable(FName Name) const
{
for (ISourceCodeAccessor* Accessor : IModularFeatures::Get().GetModularFeatureImplementations<ISourceCodeAccessor>(SourceCodeAccessorFeatureName))
{
if (Accessor->GetFName() == Name)
{
return true;
}
}
return false;
}
ISourceCodeAccessor& FSourceCodeAccessModule::GetAccessor() const
{