mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 18:11:27 -07:00
Guard debug settings, remove old unneeded stuff
This commit is contained in:
parent
67c64b2715
commit
f662d0d8c3
@ -18,12 +18,14 @@ namespace Bloxstrap
|
||||
{
|
||||
{ "Network.Log", "FLogNetwork" },
|
||||
|
||||
#if DEBUG
|
||||
{ "HTTP.Log", "DFLogHttpTraceLight" },
|
||||
|
||||
{ "HTTP.Proxy.Enable", "DFFlagDebugEnableHttpProxy" },
|
||||
{ "HTTP.Proxy.Address.1", "DFStringDebugPlayerHttpProxyUrl" },
|
||||
{ "HTTP.Proxy.Address.2", "DFStringHttpCurlProxyHostAndPort" },
|
||||
{ "HTTP.Proxy.Address.3", "DFStringHttpCurlProxyHostAndPortForExternalUrl" },
|
||||
#endif
|
||||
|
||||
{ "Rendering.Framerate", "DFIntTaskSchedulerTargetFps" },
|
||||
{ "Rendering.ManualFullscreen", "FFlagHandleAltEnterFullscreenManually" },
|
||||
@ -43,7 +45,9 @@ namespace Bloxstrap
|
||||
{ "Rendering.Lighting.Future", "FFlagDebugForceFutureIsBrightPhase3" },
|
||||
|
||||
{ "UI.Hide", "DFIntCanHideGuiGroupId" },
|
||||
#if DEBUG
|
||||
{ "UI.FlagState", "FStringDebugShowFlagState" },
|
||||
#endif
|
||||
|
||||
{ "UI.Menu.GraphicsSlider", "FFlagFixGraphicsQuality" },
|
||||
|
||||
|
@ -65,11 +65,6 @@
|
||||
//
|
||||
// we'll tail the log file continuously, monitoring for any log entries that we need to determine the current game activity
|
||||
|
||||
int delay = 1000;
|
||||
|
||||
if (App.Settings.Prop.PowerTools)
|
||||
delay = 250;
|
||||
|
||||
string logDirectory = Path.Combine(Paths.LocalAppData, "Roblox\\logs");
|
||||
|
||||
if (!Directory.Exists(logDirectory))
|
||||
@ -118,7 +113,7 @@
|
||||
string? log = await sr.ReadLineAsync();
|
||||
|
||||
if (string.IsNullOrEmpty(log))
|
||||
logUpdatedEvent.WaitOne(delay);
|
||||
logUpdatedEvent.WaitOne(1000);
|
||||
else
|
||||
ExamineLogEntry(log);
|
||||
}
|
||||
|
@ -13,10 +13,6 @@ namespace Bloxstrap.Models
|
||||
public bool CheckForUpdates { get; set; } = true;
|
||||
public bool CreateDesktopIcon { get; set; } = true;
|
||||
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||
[JsonPropertyName("OhHeyYouFoundMeAgain")]
|
||||
public bool PowerTools { get; set; } = false;
|
||||
|
||||
// channel configuration
|
||||
public string Channel { get; set; } = RobloxDeployment.DefaultChannel;
|
||||
|
||||
|
51
Bloxstrap/Resources/Strings.Designer.cs
generated
51
Bloxstrap/Resources/Strings.Designer.cs
generated
@ -505,56 +505,11 @@ namespace Bloxstrap.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Keep on top.
|
||||
/// Looks up a localized string similar to Open log file.
|
||||
/// </summary>
|
||||
public static string ContextMenu_LogTracer_KeepOnTop {
|
||||
public static string ContextMenu_OpenLogFile {
|
||||
get {
|
||||
return ResourceManager.GetString("ContextMenu.LogTracer.KeepOnTop", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Scroll to end.
|
||||
/// </summary>
|
||||
public static string ContextMenu_LogTracer_ScrollToEnd {
|
||||
get {
|
||||
return ResourceManager.GetString("ContextMenu.LogTracer.ScrollToEnd", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Text wrapping.
|
||||
/// </summary>
|
||||
public static string ContextMenu_LogTracer_TextWrapping {
|
||||
get {
|
||||
return ResourceManager.GetString("ContextMenu.LogTracer.TextWrapping", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Log tracer.
|
||||
/// </summary>
|
||||
public static string ContextMenu_LogTracer_Title {
|
||||
get {
|
||||
return ResourceManager.GetString("ContextMenu.LogTracer.Title", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Tracing {0}.
|
||||
/// </summary>
|
||||
public static string ContextMenu_LogTracer_TracingFormat {
|
||||
get {
|
||||
return ResourceManager.GetString("ContextMenu.LogTracer.TracingFormat", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Open log tracer.
|
||||
/// </summary>
|
||||
public static string ContextMenu_OpenLogTracer {
|
||||
get {
|
||||
return ResourceManager.GetString("ContextMenu.OpenLogTracer", resourceCulture);
|
||||
return ResourceManager.GetString("ContextMenu.OpenLogFile", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -269,23 +269,8 @@ Your ReShade configuration files will still be saved, and you can locate them by
|
||||
<data name="ContextMenu.CopyDeeplinkInvite" xml:space="preserve">
|
||||
<value>Copy invite deeplink</value>
|
||||
</data>
|
||||
<data name="ContextMenu.LogTracer.KeepOnTop" xml:space="preserve">
|
||||
<value>Keep on top</value>
|
||||
</data>
|
||||
<data name="ContextMenu.LogTracer.ScrollToEnd" xml:space="preserve">
|
||||
<value>Scroll to end</value>
|
||||
</data>
|
||||
<data name="ContextMenu.LogTracer.TextWrapping" xml:space="preserve">
|
||||
<value>Text wrapping</value>
|
||||
</data>
|
||||
<data name="ContextMenu.LogTracer.Title" xml:space="preserve">
|
||||
<value>Log tracer</value>
|
||||
</data>
|
||||
<data name="ContextMenu.LogTracer.TracingFormat" xml:space="preserve">
|
||||
<value>Tracing {0}</value>
|
||||
</data>
|
||||
<data name="ContextMenu.OpenLogTracer" xml:space="preserve">
|
||||
<value>Open log tracer</value>
|
||||
<data name="ContextMenu.OpenLogFile" xml:space="preserve">
|
||||
<value>Open log file</value>
|
||||
</data>
|
||||
<data name="ContextMenu.SeeServerDetails" xml:space="preserve">
|
||||
<value>See server details</value>
|
||||
|
@ -1,63 +0,0 @@
|
||||
<ui:UiWindow x:Class="Bloxstrap.UI.Elements.ContextMenu.LogTracer"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:Bloxstrap.UI.Elements.ContextMenu"
|
||||
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
||||
xmlns:models="clr-namespace:Bloxstrap.UI.ViewModels.ContextMenu"
|
||||
xmlns:resources="clr-namespace:Bloxstrap.Resources"
|
||||
d:DataContext="{d:DesignInstance Type=models:LogTracerViewModel}"
|
||||
mc:Ignorable="d"
|
||||
Title="{x:Static resources:Strings.ContextMenu_LogTracer_Title}"
|
||||
Width="800"
|
||||
Height="480"
|
||||
Background="{ui:ThemeResource ApplicationBackgroundBrush}"
|
||||
ExtendsContentIntoTitleBar="True"
|
||||
WindowStartupLocation="CenterScreen">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ui:TitleBar Grid.Row="0" Grid.ColumnSpan="2" Padding="8" x:Name="RootTitleBar" Title="{x:Static resources:Strings.ContextMenu_LogTracer_Title}" ShowMinimize="True" ShowMaximize="True" CanMaximize="True" KeyboardNavigation.TabNavigation="None" Icon="pack://application:,,,/Bloxstrap.ico" />
|
||||
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal" Background="{ui:ThemeResource ControlFillColorDefaultBrush}">
|
||||
<ui:MenuItem Margin="4,8,0,8" Header="{x:Static resources:Strings.ContextMenu_LogTracer_KeepOnTop}" IsCheckable="True" Click="KeepOnTopMenuItem_Click" />
|
||||
<ui:MenuItem Margin="0,8,0,8" Header="{x:Static resources:Strings.ContextMenu_LogTracer_ScrollToEnd}" IsCheckable="True" IsChecked="True" Click="AutoScrollMenuItem_Click" />
|
||||
<ui:MenuItem Name="TextWrappingToggle" Margin="0,8,0,8" Header="{x:Static resources:Strings.ContextMenu_LogTracer_TextWrapping}" IsCheckable="True" IsChecked="False" />
|
||||
<ui:MenuItem Margin="0,8,4,8" Header="{x:Static resources:Strings.Common_LocateLogFile}" Command="{Binding LocateLogFileCommand, Mode=OneTime}" />
|
||||
</StackPanel>
|
||||
|
||||
<ScrollViewer x:Name="ScrollViewer" Grid.Row="2" VerticalAlignment="Top">
|
||||
<ScrollViewer.Style>
|
||||
<Style TargetType="ScrollViewer">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ElementName=TextWrappingToggle, Path=IsChecked}" Value="True">
|
||||
<Setter Property="HorizontalScrollBarVisibility" Value="Disabled" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ElementName=TextWrappingToggle, Path=IsChecked}" Value="False">
|
||||
<Setter Property="HorizontalScrollBarVisibility" Value="Auto" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ScrollViewer.Style>
|
||||
<TextBox Padding="0" Background="Transparent" TextWrapping="WrapWithOverflow" BorderThickness="0" IsReadOnly="True" FontFamily="Courier New" Text="{Binding LogContents, Mode=OneWay}" TextChanged="TextBox_TextChanged" />
|
||||
</ScrollViewer>
|
||||
|
||||
<StatusBar Grid.Row="3" Padding="8">
|
||||
<StatusBarItem>
|
||||
<TextBlock>
|
||||
<TextBlock.Text>
|
||||
<MultiBinding Mode="OneWay" StringFormat="{x:Static resources:Strings.ContextMenu_LogTracer_TracingFormat}">
|
||||
<Binding Path="LogFilename" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
</StatusBarItem>
|
||||
</StatusBar>
|
||||
</Grid>
|
||||
</ui:UiWindow>
|
@ -1,32 +0,0 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
using Bloxstrap.Integrations;
|
||||
using Bloxstrap.UI.ViewModels.ContextMenu;
|
||||
|
||||
namespace Bloxstrap.UI.Elements.ContextMenu
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for LogTracer.xaml
|
||||
/// </summary>
|
||||
public partial class LogTracer
|
||||
{
|
||||
private bool _autoscroll = true;
|
||||
|
||||
public LogTracer(ActivityWatcher activityWatcher)
|
||||
{
|
||||
DataContext = new LogTracerViewModel(this, activityWatcher);
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void KeepOnTopMenuItem_Click(object sender, RoutedEventArgs e) => Topmost = ((MenuItem)sender).IsChecked;
|
||||
|
||||
private void AutoScrollMenuItem_Click(object sender, RoutedEventArgs e) => _autoscroll = ((MenuItem)sender).IsChecked;
|
||||
|
||||
private void TextBox_TextChanged(object sender, TextChangedEventArgs e)
|
||||
{
|
||||
if (_autoscroll)
|
||||
ScrollViewer.ScrollToEnd();
|
||||
}
|
||||
}
|
||||
}
|
@ -73,7 +73,7 @@
|
||||
</Grid>
|
||||
</MenuItem.Header>
|
||||
</MenuItem>
|
||||
<MenuItem x:Name="LogTracerMenuItem" Header="{x:Static resources:Strings.ContextMenu_OpenLogTracer}" Visibility="Collapsed" Click="LogTracerMenuItem_Click" />
|
||||
<MenuItem x:Name="LogTracerMenuItem" Header="{x:Static resources:Strings.ContextMenu_OpenLogFile}" Visibility="Collapsed" Click="LogTracerMenuItem_Click" />
|
||||
</ContextMenu>
|
||||
</ui:UiWindow.ContextMenu>
|
||||
</base:WpfUiWindow>
|
||||
|
@ -24,7 +24,6 @@ namespace Bloxstrap.UI.Elements.ContextMenu
|
||||
private readonly ActivityWatcher? _activityWatcher;
|
||||
private readonly DiscordRichPresence? _richPresenceHandler;
|
||||
|
||||
private LogTracer? _logTracerWindow;
|
||||
private ServerInformation? _serverInformationWindow;
|
||||
private int? _processId;
|
||||
|
||||
@ -39,8 +38,9 @@ namespace Bloxstrap.UI.Elements.ContextMenu
|
||||
|
||||
if (_activityWatcher is not null)
|
||||
{
|
||||
if (App.Settings.Prop.PowerTools)
|
||||
#if DEBUG
|
||||
LogTracerMenuItem.Visibility = Visibility.Visible;
|
||||
#endif
|
||||
|
||||
_activityWatcher.OnGameJoin += ActivityWatcher_OnGameJoin;
|
||||
_activityWatcher.OnGameLeave += ActivityWatcher_OnGameLeave;
|
||||
@ -112,16 +112,7 @@ namespace Bloxstrap.UI.Elements.ContextMenu
|
||||
|
||||
private void LogTracerMenuItem_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (_logTracerWindow is null)
|
||||
{
|
||||
_logTracerWindow = new LogTracer(_activityWatcher!);
|
||||
_logTracerWindow.Closed += (_, _) => _logTracerWindow = null;;
|
||||
}
|
||||
|
||||
if (!_logTracerWindow.IsVisible)
|
||||
_logTracerWindow.Show();
|
||||
|
||||
_logTracerWindow.Activate();
|
||||
Utilities.ShellExecute(_activityWatcher?.LogLocation);
|
||||
}
|
||||
|
||||
private void CloseRobloxMenuItem_Click(object sender, RoutedEventArgs e)
|
||||
|
@ -1,4 +1,5 @@
|
||||
<ui:UiPage x:Class="Bloxstrap.UI.Elements.Menu.Pages.FastFlagEditorPage"
|
||||
|
||||
<ui:UiPage x:Class="Bloxstrap.UI.Elements.Menu.Pages.FastFlagEditorPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
|
@ -1,38 +0,0 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
|
||||
using Bloxstrap.Integrations;
|
||||
|
||||
namespace Bloxstrap.UI.ViewModels.ContextMenu
|
||||
{
|
||||
internal class LogTracerViewModel : NotifyPropertyChangedViewModel
|
||||
{
|
||||
private readonly Window _window;
|
||||
private readonly ActivityWatcher _activityWatcher;
|
||||
private int _lineNumber = 1;
|
||||
|
||||
public ICommand CloseWindowCommand => new RelayCommand(_window.Close);
|
||||
public ICommand LocateLogFileCommand => new RelayCommand(LocateLogFile);
|
||||
|
||||
public string LogFilename => Path.GetFileName(_activityWatcher.LogLocation);
|
||||
public string LogContents { get; private set; } = "";
|
||||
|
||||
public LogTracerViewModel(Window window, ActivityWatcher activityWatcher)
|
||||
{
|
||||
_window = window;
|
||||
_activityWatcher = activityWatcher;
|
||||
|
||||
_activityWatcher.OnLogEntry += (_, message) =>
|
||||
{
|
||||
LogContents += $"{_lineNumber}: {message}\r\n";
|
||||
OnPropertyChanged(nameof(LogContents));
|
||||
|
||||
_lineNumber += 1;
|
||||
};
|
||||
}
|
||||
|
||||
private void LocateLogFile() => Process.Start("explorer.exe", $"/select,\"{_activityWatcher.LogLocation}\"");
|
||||
}
|
||||
}
|
@ -28,7 +28,11 @@ namespace Bloxstrap.UI.ViewModels.Menu
|
||||
|
||||
public ICommand OpenFastFlagEditorCommand => new RelayCommand(OpenFastFlagEditor);
|
||||
|
||||
public Visibility ShowDebugFlags => App.Settings.Prop.PowerTools ? Visibility.Visible : Visibility.Collapsed;
|
||||
#if DEBUG
|
||||
public Visibility ShowDebugFlags => Visibility.Visible;
|
||||
#else
|
||||
public Visibility ShowDebugFlags => Visibility.Collapsed;
|
||||
#endif
|
||||
|
||||
public bool HttpRequestLogging
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user