update byfron dialog player location

This commit is contained in:
bluepilledgreat 2023-10-04 15:17:14 +01:00
parent 2040dde2fa
commit ba031a645e
3 changed files with 10 additions and 3 deletions

View File

@ -59,6 +59,7 @@ namespace Bloxstrap
private IReadOnlyDictionary<string, string> _packageDirectories => _studioLaunch ? PackageMap.Studio : PackageMap.Player; private IReadOnlyDictionary<string, string> _packageDirectories => _studioLaunch ? PackageMap.Studio : PackageMap.Player;
public IBootstrapperDialog? Dialog = null; public IBootstrapperDialog? Dialog = null;
public bool IsStudioLaunch => _studioLaunch;
#endregion #endregion
#region Core #region Core

View File

@ -69,7 +69,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
public ByfronDialog() public ByfronDialog()
{ {
_viewModel = new ByfronDialogViewModel(this); _viewModel = new ByfronDialogViewModel(this, Bootstrapper?.IsStudioLaunch ?? false);
DataContext = _viewModel; DataContext = _viewModel;
Title = App.Settings.Prop.BootstrapperTitle; Title = App.Settings.Prop.BootstrapperTitle;
Icon = App.Settings.Prop.BootstrapperIcon.GetIcon().GetImageSource(); Icon = App.Settings.Prop.BootstrapperIcon.GetIcon().GetImageSource();

View File

@ -6,6 +6,8 @@ namespace Bloxstrap.UI.ViewModels.Bootstrapper
{ {
public class ByfronDialogViewModel : BootstrapperDialogViewModel public class ByfronDialogViewModel : BootstrapperDialogViewModel
{ {
private bool _studioLaunch;
// Using dark theme for default values. // Using dark theme for default values.
public ImageSource ByfronLogoLocation { get; set; } = new BitmapImage(new Uri("pack://application:,,,/Resources/BootstrapperStyles/ByfronDialog/ByfronLogoDark.jpg")); public ImageSource ByfronLogoLocation { get; set; } = new BitmapImage(new Uri("pack://application:,,,/Resources/BootstrapperStyles/ByfronDialog/ByfronLogoDark.jpg"));
public Thickness DialogBorder { get; set; } = new Thickness(0); public Thickness DialogBorder { get; set; } = new Thickness(0);
@ -20,7 +22,10 @@ namespace Bloxstrap.UI.ViewModels.Bootstrapper
{ {
get get
{ {
string playerLocation = Path.Combine(Paths.Versions, App.State.Prop.PlayerVersionGuid, "RobloxPlayerBeta.exe"); string versionGuid = _studioLaunch ? App.State.Prop.StudioVersionGuid : App.State.Prop.PlayerVersionGuid;
string fileName = _studioLaunch ? "RobloxStudioBeta.exe" : "RobloxPlayerBeta.exe";
string playerLocation = Path.Combine(Paths.Versions, versionGuid, fileName);
if (!File.Exists(playerLocation)) if (!File.Exists(playerLocation))
return ""; return "";
@ -34,8 +39,9 @@ namespace Bloxstrap.UI.ViewModels.Bootstrapper
} }
} }
public ByfronDialogViewModel(IBootstrapperDialog dialog) : base(dialog) public ByfronDialogViewModel(IBootstrapperDialog dialog, bool isStudioLaunch) : base(dialog)
{ {
_studioLaunch = isStudioLaunch;
} }
} }
} }