mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Merge branch 'main' of https://github.com/pizzaboxer/bloxstrap
This commit is contained in:
commit
f8d3c9618e
@ -753,7 +753,6 @@ namespace Bloxstrap
|
||||
|
||||
List<string> modFolderFiles = new();
|
||||
|
||||
if (!Directory.Exists(Paths.Modifications))
|
||||
Directory.CreateDirectory(Paths.Modifications);
|
||||
|
||||
// check custom font mod
|
||||
|
@ -36,7 +36,6 @@
|
||||
public event EventHandler? OnAppClose;
|
||||
public event EventHandler<Message>? OnRPCMessage;
|
||||
|
||||
private readonly Dictionary<string, string> GeolocationCache = new();
|
||||
private DateTime LastRPCRequest;
|
||||
|
||||
public string LogLocation = null!;
|
||||
|
@ -60,7 +60,21 @@ namespace Bloxstrap
|
||||
App.Logger.WriteLine(LOG_IDENT, $"Saving to {FileLocation}...");
|
||||
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(FileLocation)!);
|
||||
|
||||
try
|
||||
{
|
||||
File.WriteAllText(FileLocation, JsonSerializer.Serialize(Prop, new JsonSerializerOptions { WriteIndented = true }));
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
App.Logger.WriteLine(LOG_IDENT, "Failed to save");
|
||||
App.Logger.WriteException(LOG_IDENT, ex);
|
||||
|
||||
string errorMessage = string.Format(Resources.Strings.Bootstrapper_JsonManagerSaveFailed, ClassName, ex.Message);
|
||||
Frontend.ShowMessageBox(errorMessage, System.Windows.MessageBoxImage.Warning);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
App.Logger.WriteLine(LOG_IDENT, "Save complete!");
|
||||
}
|
||||
|
18
Bloxstrap/Resources/Strings.Designer.cs
generated
18
Bloxstrap/Resources/Strings.Designer.cs
generated
@ -170,6 +170,15 @@ namespace Bloxstrap.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Failed to save {0}: {1}.
|
||||
/// </summary>
|
||||
public static string Bootstrapper_JsonManagerSaveFailed {
|
||||
get {
|
||||
return ResourceManager.GetString("Bootstrapper.JsonManagerSaveFailed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Bloxstrap does not have enough disk space to download and install Roblox. Please free up some disk space and try again..
|
||||
/// </summary>
|
||||
@ -1520,6 +1529,15 @@ namespace Bloxstrap.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Are you sure you want to cancel the installation?.
|
||||
/// </summary>
|
||||
public static string Installer_ShouldCancel {
|
||||
get {
|
||||
return ResourceManager.GetString("Installer.ShouldCancel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Bloxstrap Installer.
|
||||
/// </summary>
|
||||
|
@ -1192,4 +1192,10 @@ Please manually delete Bloxstrap.exe from the install location or try restarting
|
||||
<data name="Common.RobloxNotInstalled" xml:space="preserve">
|
||||
<value>Roblox has not yet been installed. Please launch Roblox using Bloxstrap at least once before trying to use this option.</value>
|
||||
</data>
|
||||
<data name="Installer.ShouldCancel" xml:space="preserve">
|
||||
<value>Are you sure you want to cancel the installation?</value>
|
||||
</data>
|
||||
<data name="Bootstrapper.JsonManagerSaveFailed" xml:space="preserve">
|
||||
<value>Failed to save {0}: {1}</value>
|
||||
</data>
|
||||
</root>
|
@ -9,6 +9,7 @@ using Bloxstrap.UI.Elements.Installer.Pages;
|
||||
using Bloxstrap.UI.Elements.Base;
|
||||
using System.Windows.Media.Animation;
|
||||
using System.Reflection.Metadata.Ecma335;
|
||||
using Bloxstrap.Resources;
|
||||
|
||||
namespace Bloxstrap.UI.Elements.Installer
|
||||
{
|
||||
@ -102,7 +103,7 @@ namespace Bloxstrap.UI.Elements.Installer
|
||||
if (Finished)
|
||||
return;
|
||||
|
||||
var result = Frontend.ShowMessageBox("Are you sure you want to cancel the installation?", MessageBoxImage.Warning, MessageBoxButton.YesNo);
|
||||
var result = Frontend.ShowMessageBox(Strings.Installer_ShouldCancel, MessageBoxImage.Warning, MessageBoxButton.YesNo);
|
||||
|
||||
if (result != MessageBoxResult.Yes)
|
||||
e.Cancel = true;
|
||||
|
@ -89,7 +89,7 @@
|
||||
</Style>
|
||||
</StackPanel.Style>
|
||||
<TextBlock Text="{x:Static resources:Strings.Common_Name}" Foreground="{DynamicResource TextFillColorSecondaryBrush}" />
|
||||
<ui:TextBox Margin="0,4,0,0" Text="{Binding SelectedCustomIntegration.Name}" />
|
||||
<ui:TextBox Margin="0,4,0,0" Text="{Binding SelectedCustomIntegration.Name, UpdateSourceTrigger=PropertyChanged}" />
|
||||
<TextBlock Margin="0,8,0,0" Text="{x:Static resources:Strings.Menu_Integrations_Custom_AppLocation}" Foreground="{DynamicResource TextFillColorSecondaryBrush}" />
|
||||
<Grid Margin="0,4,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
@ -17,20 +17,7 @@ namespace Bloxstrap.UI
|
||||
if (App.LaunchSettings.QuietFlag.Active)
|
||||
return defaultResult;
|
||||
|
||||
if (App.LaunchSettings.RobloxLaunchMode != LaunchMode.None)
|
||||
return ShowFluentMessageBox(message, icon, buttons);
|
||||
|
||||
switch (App.Settings.Prop.BootstrapperStyle)
|
||||
{
|
||||
case BootstrapperStyle.FluentDialog:
|
||||
case BootstrapperStyle.ClassicFluentDialog:
|
||||
case BootstrapperStyle.FluentAeroDialog:
|
||||
case BootstrapperStyle.ByfronDialog:
|
||||
return ShowFluentMessageBox(message, icon, buttons);
|
||||
|
||||
default:
|
||||
return MessageBox.Show(message, App.ProjectName, buttons, icon);
|
||||
}
|
||||
}
|
||||
|
||||
public static void ShowPlayerErrorDialog(bool crash = false)
|
||||
|
@ -57,6 +57,7 @@ namespace Bloxstrap.UI.ViewModels.Settings
|
||||
if (dialog.ShowDialog() != true)
|
||||
return;
|
||||
|
||||
SelectedCustomIntegration.Name = dialog.SafeFileName;
|
||||
SelectedCustomIntegration.Location = dialog.FileName;
|
||||
OnPropertyChanged(nameof(SelectedCustomIntegration));
|
||||
}
|
||||
|
@ -50,7 +50,6 @@ namespace Bloxstrap
|
||||
|
||||
public static string GetRobloxVersion(bool studio)
|
||||
{
|
||||
string versionGuid = studio ? App.State.Prop.Studio.VersionGuid : App.State.Prop.Player.VersionGuid;
|
||||
string fileName = studio ? "Studio/RobloxStudioBeta.exe" : "Player/RobloxPlayerBeta.exe";
|
||||
|
||||
string playerLocation = Path.Combine(Paths.Roblox, fileName);
|
||||
|
Loading…
Reference in New Issue
Block a user