diff options
author | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2019-03-04 16:05:08 +0100 |
---|---|---|
committer | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2019-03-04 16:05:08 +0100 |
commit | 8877b07f4c101edf42ded130fd1ed4ca69264b53 (patch) | |
tree | 782a58beb2b02b2764b2ae854d339d5f7cdfae18 /modules/mono/editor/GodotSharpTools/Build/BuildSystem.cs | |
parent | 8d117b214f2bcd14015532fdfbed9b3f059da0e6 (diff) |
Mono: Add option to print MSBuild output and improve out of sync error
Diffstat (limited to 'modules/mono/editor/GodotSharpTools/Build/BuildSystem.cs')
-rw-r--r-- | modules/mono/editor/GodotSharpTools/Build/BuildSystem.cs | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/modules/mono/editor/GodotSharpTools/Build/BuildSystem.cs b/modules/mono/editor/GodotSharpTools/Build/BuildSystem.cs index e7d0486c76..79ef46ebb5 100644 --- a/modules/mono/editor/GodotSharpTools/Build/BuildSystem.cs +++ b/modules/mono/editor/GodotSharpTools/Build/BuildSystem.cs @@ -21,6 +21,8 @@ namespace GodotSharpTools.Build private extern static string godot_icall_BuildInstance_get_MonoWindowsBinDir(); [MethodImpl(MethodImplOptions.InternalCall)] private extern static bool godot_icall_BuildInstance_get_UsingMonoMSBuildOnWindows(); + [MethodImpl(MethodImplOptions.InternalCall)] + private extern static bool godot_icall_BuildInstance_get_PrintBuildOutput(); private static string GetMSBuildPath() { @@ -53,6 +55,14 @@ namespace GodotSharpTools.Build } } + private static bool PrintBuildOutput + { + get + { + return godot_icall_BuildInstance_get_PrintBuildOutput(); + } + } + private string solution; private string config; @@ -71,8 +81,6 @@ namespace GodotSharpTools.Build public bool Build(string loggerAssemblyPath, string loggerOutputDir, string[] customProperties = null) { - bool debugMSBuild = IsDebugMSBuildRequested(); - List<string> customPropertiesList = new List<string>(); if (customProperties != null) @@ -82,7 +90,7 @@ namespace GodotSharpTools.Build ProcessStartInfo startInfo = new ProcessStartInfo(GetMSBuildPath(), compilerArgs); - bool redirectOutput = !debugMSBuild; + bool redirectOutput = !IsDebugMSBuildRequested() && !PrintBuildOutput; startInfo.RedirectStandardOutput = redirectOutput; startInfo.RedirectStandardError = redirectOutput; @@ -123,8 +131,6 @@ namespace GodotSharpTools.Build public bool BuildAsync(string loggerAssemblyPath, string loggerOutputDir, string[] customProperties = null) { - bool debugMSBuild = IsDebugMSBuildRequested(); - if (process != null) throw new InvalidOperationException("Already in use"); @@ -137,7 +143,7 @@ namespace GodotSharpTools.Build ProcessStartInfo startInfo = new ProcessStartInfo(GetMSBuildPath(), compilerArgs); - bool redirectOutput = !debugMSBuild; + bool redirectOutput = !IsDebugMSBuildRequested() && !PrintBuildOutput; startInfo.RedirectStandardOutput = redirectOutput; startInfo.RedirectStandardError = redirectOutput; |