Remap non-native Editor VS build configurations to native configurations
This commit is contained in:
@@ -479,7 +479,7 @@ namespace Flax.Build.Projects.VisualStudio
|
|||||||
{
|
{
|
||||||
SolutionConfiguration projectConfiguration;
|
SolutionConfiguration projectConfiguration;
|
||||||
bool build = false;
|
bool build = false;
|
||||||
int firstFullMatch = -1, firstPlatformMatch = -1;
|
int firstFullMatch = -1, firstPlatformMatch = -1, firstEditorMatch = -1;
|
||||||
for (int i = 0; i < project.Configurations.Count; i++)
|
for (int i = 0; i < project.Configurations.Count; i++)
|
||||||
{
|
{
|
||||||
var e = new SolutionConfiguration(project.Configurations[i]);
|
var e = new SolutionConfiguration(project.Configurations[i]);
|
||||||
@@ -492,18 +492,31 @@ namespace Flax.Build.Projects.VisualStudio
|
|||||||
{
|
{
|
||||||
firstPlatformMatch = i;
|
firstPlatformMatch = i;
|
||||||
}
|
}
|
||||||
|
if (firstEditorMatch == -1 && e.Configuration == configuration.Configuration)
|
||||||
|
{
|
||||||
|
firstEditorMatch = i;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (firstFullMatch != -1)
|
if (firstFullMatch != -1)
|
||||||
{
|
{
|
||||||
projectConfiguration = configuration;
|
projectConfiguration = configuration;
|
||||||
build = solution.MainProject == project || (solution.MainProject == null && project.Name == solution.Name);
|
build = solution.MainProject == project || (solution.MainProject == null && project.Name == solution.Name);
|
||||||
}
|
}
|
||||||
else if (firstPlatformMatch != -1)
|
else if (firstPlatformMatch != -1 && !configuration.Name.StartsWith("Editor."))
|
||||||
{
|
{
|
||||||
|
// No exact match, pick the first configuration for matching platform
|
||||||
projectConfiguration = new SolutionConfiguration(project.Configurations[firstPlatformMatch]);
|
projectConfiguration = new SolutionConfiguration(project.Configurations[firstPlatformMatch]);
|
||||||
}
|
}
|
||||||
|
else if (firstEditorMatch != -1 && configuration.Name.StartsWith("Editor."))
|
||||||
|
{
|
||||||
|
// No exact match, pick the matching editor configuration for different platform.
|
||||||
|
// As an example, Editor configuration for Android projects should be remapped
|
||||||
|
// to desktop platform in order to provide working Intellisense information.
|
||||||
|
projectConfiguration = new SolutionConfiguration(project.Configurations[firstEditorMatch]);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// No match
|
||||||
projectConfiguration = new SolutionConfiguration(project.Configurations[0]);
|
projectConfiguration = new SolutionConfiguration(project.Configurations[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user