Improve workflow with Android project generated after #1570
This commit is contained in:
@@ -37,7 +37,7 @@ namespace Flax.Build.Platforms
|
||||
public LinuxPlatform()
|
||||
{
|
||||
// Try to use system compiler
|
||||
if (Platform.BuildTargetPlatform == TargetPlatform.Linux)
|
||||
if (BuildTargetPlatform == TargetPlatform.Linux)
|
||||
{
|
||||
// Pick the newest compiler (overriden by specified in command line)
|
||||
if (Which(Configuration.Compiler) != null)
|
||||
@@ -67,7 +67,7 @@ namespace Flax.Build.Platforms
|
||||
Log.Verbose($"Using native Linux toolchain (compiler {Compiler})");
|
||||
HasRequiredSDKsInstalled = true;
|
||||
}
|
||||
else if (Platform.BuildTargetPlatform != TargetPlatform.Mac)
|
||||
else if (BuildTargetPlatform != TargetPlatform.Mac)
|
||||
{
|
||||
// Check if Linux toolchain is installed
|
||||
string toolchainName = "v13_clang-7.0.1-centos7";
|
||||
@@ -76,9 +76,11 @@ namespace Flax.Build.Platforms
|
||||
{
|
||||
if (string.IsNullOrEmpty(toolchainsRoot))
|
||||
{
|
||||
if (BuildTargetPlatform == TargetPlatform.Linux)
|
||||
Log.Warning("Missing Linux Toolchain. Cannot build for Linux platform.");
|
||||
else
|
||||
Log.Verbose("Missing Linux Toolchain. Cannot build for Linux platform.");
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,13 @@ namespace Flax.Build.Projects.VisualStudio
|
||||
/// <inheritdoc />
|
||||
public override void Generate(string solutionPath)
|
||||
{
|
||||
// Try to reuse the existing project guid from existing files
|
||||
ProjectGuid = GetProjectGuid(Path, Name);
|
||||
if (ProjectGuid == Guid.Empty)
|
||||
ProjectGuid = GetProjectGuid(solutionPath, Name);
|
||||
if (ProjectGuid == Guid.Empty)
|
||||
ProjectGuid = Guid.NewGuid();
|
||||
|
||||
var gen = (VisualStudioProjectGenerator)Generator;
|
||||
var projectFileToolVersion = gen.ProjectFileToolVersion;
|
||||
var vcProjectFileContent = new StringBuilder();
|
||||
@@ -500,7 +507,15 @@ namespace Flax.Build.Projects.VisualStudio
|
||||
firstEditorMatch = i;
|
||||
}
|
||||
}
|
||||
if (project is AndroidProject)
|
||||
{
|
||||
// Utility Android deploy project only for exact match
|
||||
if (firstFullMatch != -1)
|
||||
projectConfiguration = configuration;
|
||||
else
|
||||
projectConfiguration = new SolutionConfiguration(project.Configurations[0]);
|
||||
}
|
||||
else if (firstFullMatch != -1)
|
||||
{
|
||||
projectConfiguration = configuration;
|
||||
build = solution.MainProject == project || (solution.MainProject == null && project.Name == solution.Name);
|
||||
|
||||
Reference in New Issue
Block a user