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-SOURCE: CL 4951506 in //UE4/Release-4.22/...
#ROBOMERGE-BOT: RELEASE (Release-4.22 -> Main)

[CL 4951508 by ben marsh in Main branch]
This commit is contained in:
ben marsh
2019-02-08 15:46:29 -05:00
parent 1116c4f294
commit de43fd704b
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
{