mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-18 16:41:36 -07:00
create studio guid property
This commit is contained in:
parent
5649b464e9
commit
a70ed1aead
@ -51,7 +51,7 @@ namespace Bloxstrap
|
||||
|
||||
private readonly CancellationTokenSource _cancelTokenSource = new();
|
||||
|
||||
private static bool FreshInstall => String.IsNullOrEmpty(App.State.Prop.VersionGuid);
|
||||
private static bool FreshInstall => String.IsNullOrEmpty(App.State.Prop.PlayerVersionGuid);
|
||||
|
||||
private string _playerLocation => Path.Combine(_versionFolder, "RobloxPlayerBeta.exe");
|
||||
|
||||
@ -183,7 +183,7 @@ namespace Bloxstrap
|
||||
await CheckLatestVersion();
|
||||
|
||||
// install/update roblox if we're running for the first time, needs updating, or the player location doesn't exist
|
||||
if (App.IsFirstRun || _latestVersionGuid != App.State.Prop.VersionGuid || !File.Exists(_playerLocation))
|
||||
if (App.IsFirstRun || _latestVersionGuid != App.State.Prop.PlayerVersionGuid || !File.Exists(_playerLocation))
|
||||
await InstallLatestVersion();
|
||||
|
||||
if (App.IsFirstRun)
|
||||
@ -874,7 +874,7 @@ namespace Bloxstrap
|
||||
}
|
||||
}
|
||||
|
||||
string oldVersionFolder = Path.Combine(Paths.Versions, App.State.Prop.VersionGuid);
|
||||
string oldVersionFolder = Path.Combine(Paths.Versions, App.State.Prop.PlayerVersionGuid);
|
||||
|
||||
// move old compatibility flags for the old location
|
||||
using (RegistryKey appFlagsKey = Registry.CurrentUser.CreateSubKey($"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AppCompatFlags\\Layers"))
|
||||
@ -915,7 +915,7 @@ namespace Bloxstrap
|
||||
}
|
||||
}
|
||||
|
||||
App.State.Prop.VersionGuid = _latestVersionGuid;
|
||||
App.State.Prop.PlayerVersionGuid = _latestVersionGuid;
|
||||
|
||||
// don't register program size until the program is registered, which will be done after this
|
||||
if (!App.IsFirstRun && !FreshInstall)
|
||||
|
@ -3,7 +3,10 @@
|
||||
public class State
|
||||
{
|
||||
public string LastEnrolledChannel { get; set; } = "";
|
||||
public string VersionGuid { get; set; } = "";
|
||||
[Obsolete("Use PlayerVersionGuid", true)]
|
||||
public string VersionGuid { set { PlayerVersionGuid = value; } }
|
||||
public string PlayerVersionGuid { get; set; } = "";
|
||||
public string StudioVersionGuid { get; set; } = "";
|
||||
public List<string> ModManifest { get; set; } = new();
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ namespace Bloxstrap.UI.ViewModels.Bootstrapper
|
||||
{
|
||||
get
|
||||
{
|
||||
string playerLocation = Path.Combine(Paths.Versions, App.State.Prop.VersionGuid, "RobloxPlayerBeta.exe");
|
||||
string playerLocation = Path.Combine(Paths.Versions, App.State.Prop.PlayerVersionGuid, "RobloxPlayerBeta.exe");
|
||||
|
||||
if (!File.Exists(playerLocation))
|
||||
return "";
|
||||
|
@ -108,17 +108,17 @@
|
||||
|
||||
public bool ForceRobloxReinstallation
|
||||
{
|
||||
get => String.IsNullOrEmpty(App.State.Prop.VersionGuid);
|
||||
get => String.IsNullOrEmpty(App.State.Prop.PlayerVersionGuid);
|
||||
set
|
||||
{
|
||||
if (value)
|
||||
{
|
||||
_oldVersionGuid = App.State.Prop.VersionGuid;
|
||||
App.State.Prop.VersionGuid = "";
|
||||
_oldVersionGuid = App.State.Prop.PlayerVersionGuid;
|
||||
App.State.Prop.PlayerVersionGuid = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
App.State.Prop.VersionGuid = _oldVersionGuid;
|
||||
App.State.Prop.PlayerVersionGuid = _oldVersionGuid;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user