Addressing Feedback

* use a better method of getting Editor binary folder
This commit is contained in:
Andrew Spiering
2023-09-22 02:59:38 -07:00
parent 1537f49e73
commit ab7ca683bb
2 changed files with 4 additions and 10 deletions

View File

@@ -497,7 +497,7 @@ namespace Flax.Build
else if (dependencyModule.BinaryModuleName == "FlaxEngine")
{
// TODO: instead of this hack find a way to reference the prebuilt target bindings binary (example: game C# project references FlaxEngine C# prebuilt dll)
project.CSharp.FileReferences.Add(Path.Combine(Globals.EngineRoot, $"Binaries/Editor/{project.Configurations[0].PlatformName}/Development/FlaxEngine.CSharp.dll"));
project.CSharp.FileReferences.Add(Path.Combine(Globals.EngineRoot, Platform.GetEditorBinaryDirectory(), "Development/FlaxEngine.CSharp.dll"));
}
}
}
@@ -519,7 +519,7 @@ namespace Flax.Build
project.Dependencies.Remove(flaxDependency);
// TODO: instead of this hack find a way to reference the prebuilt target bindings binary (example: game C# project references FlaxEngine C# prebuilt dll)
project.CSharp.FileReferences.Add(Path.Combine(Globals.EngineRoot, $"Binaries/Editor/{project.Configurations[0].PlatformName}/Development/FlaxEngine.CSharp.dll"));
project.CSharp.FileReferences.Add(Path.Combine(Globals.EngineRoot, Platform.GetEditorBinaryDirectory(), "Development/FlaxEngine.CSharp.dll"));
// Remove FlaxEngine from projects to prevent duplicated types errors in Intellisense (eg. Actor type defined in both FlaxEngine.CSharp.dll and FlaxEngine.csproj)
flaxDependencyToRemove = flaxDependency;

View File

@@ -405,8 +405,6 @@ namespace Flax.Build.Projects.VisualStudio
vcSolutionFileContent.AppendLine("EndProject");
}
var globalPlatformName = "";
// Global configuration
{
vcSolutionFileContent.AppendLine("Global");
@@ -423,11 +421,7 @@ namespace Flax.Build.Projects.VisualStudio
continue;
foreach (var configuration in project.Configurations)
{
// We just grab the platform name from the first config
if (string.IsNullOrEmpty(globalPlatformName))
globalPlatformName = configuration.PlatformName;
{
configurations.Add(new SolutionConfiguration(configuration));
}
}
@@ -564,7 +558,7 @@ namespace Flax.Build.Projects.VisualStudio
{
var profiles = new Dictionary<string, string>();
var profile = new StringBuilder();
var editorPath = Utilities.NormalizePath(Path.Combine(Globals.EngineRoot, $"Binaries/Editor/{globalPlatformName}/Development/FlaxEditor{Utilities.GetPlatformExecutableExt()}"));
var editorPath = Utilities.NormalizePath(Path.Combine(Globals.EngineRoot, Platform.GetEditorBinaryDirectory(), $"Development/FlaxEditor{Utilities.GetPlatformExecutableExt()}"));
var workspacePath = Utilities.NormalizePath(solutionDirectory);
foreach (var project in projects)
{