summaryrefslogtreecommitdiff
path: root/modules/mono
diff options
context:
space:
mode:
Diffstat (limited to 'modules/mono')
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Build/BuildInfo.cs3
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Build/MSBuildPanel.cs22
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Internals/GodotSharpDirs.cs6
3 files changed, 29 insertions, 2 deletions
diff --git a/modules/mono/editor/GodotTools/GodotTools/Build/BuildInfo.cs b/modules/mono/editor/GodotTools/GodotTools/Build/BuildInfo.cs
index a4d5e1a569..1e4fd2f09a 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Build/BuildInfo.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Build/BuildInfo.cs
@@ -22,8 +22,7 @@ namespace GodotTools.Build
// TODO Use List once we have proper serialization
public Godot.Collections.Array CustomProperties { get; private set; } = new();
- public string LogsDirPath =>
- Path.Combine(GodotSharpDirs.BuildLogsDirs, $"{Solution.Md5Text()}_{Configuration}");
+ public string LogsDirPath => GodotSharpDirs.LogsDirPathFor(Solution, Configuration);
public override bool Equals(object? obj)
{
diff --git a/modules/mono/editor/GodotTools/GodotTools/Build/MSBuildPanel.cs b/modules/mono/editor/GodotTools/GodotTools/Build/MSBuildPanel.cs
index 262de024ca..cf1b84e37f 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Build/MSBuildPanel.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Build/MSBuildPanel.cs
@@ -1,4 +1,5 @@
using System;
+using System.IO;
using Godot;
using GodotTools.Internals;
using static GodotTools.Internals.Globals;
@@ -14,6 +15,7 @@ namespace GodotTools.Build
private Button _errorsBtn;
private Button _warningsBtn;
private Button _viewLogBtn;
+ private Button _openLogsFolderBtn;
private void WarningsToggled(bool pressed)
{
@@ -93,6 +95,10 @@ namespace GodotTools.Build
private void ViewLogToggled(bool pressed) => BuildOutputView.LogVisible = pressed;
+ private void OpenLogsFolderPressed() => OS.ShellOpen(
+ $"file://{GodotSharpDirs.LogsDirPathFor("Debug")}"
+ );
+
private void BuildMenuOptionPressed(long id)
{
switch ((BuildMenuOptions)id)
@@ -171,6 +177,22 @@ namespace GodotTools.Build
_viewLogBtn.Toggled += ViewLogToggled;
toolBarHBox.AddChild(_viewLogBtn);
+ // Horizontal spacer, push everything to the right.
+ toolBarHBox.AddChild(new Control
+ {
+ SizeFlagsHorizontal = SizeFlags.ExpandFill,
+ });
+
+ _openLogsFolderBtn = new Button
+ {
+ Text = "Show Logs in File Manager".TTR(),
+ Icon = GetThemeIcon("Filesystem", "EditorIcons"),
+ ExpandIcon = false,
+ FocusMode = FocusModeEnum.None,
+ };
+ _openLogsFolderBtn.Pressed += OpenLogsFolderPressed;
+ toolBarHBox.AddChild(_openLogsFolderBtn);
+
BuildOutputView = new BuildOutputView();
AddChild(BuildOutputView);
}
diff --git a/modules/mono/editor/GodotTools/GodotTools/Internals/GodotSharpDirs.cs b/modules/mono/editor/GodotTools/GodotTools/Internals/GodotSharpDirs.cs
index 7624989092..fb68fcbae6 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Internals/GodotSharpDirs.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Internals/GodotSharpDirs.cs
@@ -115,5 +115,11 @@ namespace GodotTools.Internals
return _projectCsProjPath;
}
}
+
+ public static string LogsDirPathFor(string solution, string configuration)
+ => Path.Combine(BuildLogsDirs, $"{solution.Md5Text()}_{configuration}");
+
+ public static string LogsDirPathFor(string configuration)
+ => LogsDirPathFor(ProjectSlnPath, configuration);
}
}