Merge branch 'macos-csproj-fix' of https://github.com/wackoisgod/FlaxEngine into wackoisgod-macos-csproj-fix
This commit is contained in:
@@ -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/Win64/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/Win64/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;
|
||||
|
||||
@@ -421,7 +421,7 @@ namespace Flax.Build.Projects.VisualStudio
|
||||
continue;
|
||||
|
||||
foreach (var configuration in project.Configurations)
|
||||
{
|
||||
{
|
||||
configurations.Add(new SolutionConfiguration(configuration));
|
||||
}
|
||||
}
|
||||
@@ -558,8 +558,8 @@ namespace Flax.Build.Projects.VisualStudio
|
||||
{
|
||||
var profiles = new Dictionary<string, string>();
|
||||
var profile = new StringBuilder();
|
||||
var editorPath = Path.Combine(Globals.EngineRoot, "Binaries/Editor/Win64/Development/FlaxEditor.exe").Replace('/', '\\').Replace("\\", "\\\\");
|
||||
var workspacePath = solutionDirectory.Replace('/', '\\').Replace("\\", "\\\\");
|
||||
var editorPath = Utilities.NormalizePath(Path.Combine(Globals.EngineRoot, Platform.GetEditorBinaryDirectory(), $"Development/FlaxEditor{Utilities.GetPlatformExecutableExt()}"));
|
||||
var workspacePath = Utilities.NormalizePath(solutionDirectory);
|
||||
foreach (var project in projects)
|
||||
{
|
||||
if (project.Type == TargetType.DotNetCore)
|
||||
|
||||
@@ -6,6 +6,7 @@ using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace Flax.Build
|
||||
@@ -746,5 +747,19 @@ namespace Flax.Build
|
||||
text = text.Replace(findWhat, replaceWith);
|
||||
File.WriteAllText(file, text);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns back the exe ext for the current platform
|
||||
/// </summary>
|
||||
public static string GetPlatformExecutableExt()
|
||||
{
|
||||
var extEnding = ".exe";
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
||||
{
|
||||
extEnding = "";
|
||||
}
|
||||
|
||||
return extEnding;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user