mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Last-minute legacy auto update shims
This commit is contained in:
parent
8a21085f59
commit
406bb7a54a
@ -356,7 +356,10 @@ namespace Bloxstrap
|
|||||||
// 2.0.0 downloads updates to <BaseFolder>/Updates so lol
|
// 2.0.0 downloads updates to <BaseFolder>/Updates so lol
|
||||||
bool isAutoUpgrade = App.LaunchSettings.UpgradeFlag.Active
|
bool isAutoUpgrade = App.LaunchSettings.UpgradeFlag.Active
|
||||||
|| Paths.Process.StartsWith(Path.Combine(Paths.Base, "Updates"))
|
|| Paths.Process.StartsWith(Path.Combine(Paths.Base, "Updates"))
|
||||||
|| Paths.Process.StartsWith(Paths.Temp);
|
|| Paths.Process.StartsWith(Path.Combine(Paths.LocalAppData, "Temp"))
|
||||||
|
|| Paths.Process.StartsWith(Paths.TempUpdates);
|
||||||
|
|
||||||
|
isAutoUpgrade = true;
|
||||||
|
|
||||||
var existingVer = FileVersionInfo.GetVersionInfo(Paths.Application).ProductVersion;
|
var existingVer = FileVersionInfo.GetVersionInfo(Paths.Application).ProductVersion;
|
||||||
var currentVer = FileVersionInfo.GetVersionInfo(Paths.Process).ProductVersion;
|
var currentVer = FileVersionInfo.GetVersionInfo(Paths.Process).ProductVersion;
|
||||||
@ -517,6 +520,22 @@ namespace Bloxstrap
|
|||||||
|
|
||||||
if (Utilities.CompareVersions(existingVer, "2.8.0") == VersionComparison.LessThan)
|
if (Utilities.CompareVersions(existingVer, "2.8.0") == VersionComparison.LessThan)
|
||||||
{
|
{
|
||||||
|
if (isAutoUpgrade)
|
||||||
|
{
|
||||||
|
Frontend.ShowMessageBox(String.Join(',', App.LaunchSettings.Args.Length));
|
||||||
|
|
||||||
|
if (App.LaunchSettings.Args.Length == 0)
|
||||||
|
App.LaunchSettings.RobloxLaunchMode = LaunchMode.Player;
|
||||||
|
|
||||||
|
string? query = App.LaunchSettings.Args.FirstOrDefault(x => x.Contains("roblox"));
|
||||||
|
|
||||||
|
if (query is not null)
|
||||||
|
{
|
||||||
|
App.LaunchSettings.RobloxLaunchMode = LaunchMode.Player;
|
||||||
|
App.LaunchSettings.RobloxLaunchArgs = query;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
string oldDesktopPath = Path.Combine(Paths.Desktop, "Play Roblox.lnk");
|
string oldDesktopPath = Path.Combine(Paths.Desktop, "Play Roblox.lnk");
|
||||||
string oldStartPath = Path.Combine(Paths.WindowsStartMenu, "Bloxstrap");
|
string oldStartPath = Path.Combine(Paths.WindowsStartMenu, "Bloxstrap");
|
||||||
|
|
||||||
@ -565,8 +584,15 @@ namespace Bloxstrap
|
|||||||
|
|
||||||
App.FastFlags.SetValue("FFlagFixGraphicsQuality", null);
|
App.FastFlags.SetValue("FFlagFixGraphicsQuality", null);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
Directory.Delete(Path.Combine(Paths.Base, "Versions"), true);
|
Directory.Delete(Path.Combine(Paths.Base, "Versions"), true);
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
App.Logger.WriteException(LOG_IDENT, ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
App.Settings.Save();
|
App.Settings.Save();
|
||||||
App.FastFlags.Save();
|
App.FastFlags.Save();
|
||||||
|
@ -40,7 +40,7 @@ namespace Bloxstrap
|
|||||||
|
|
||||||
public LaunchMode RobloxLaunchMode { get; set; } = LaunchMode.None;
|
public LaunchMode RobloxLaunchMode { get; set; } = LaunchMode.None;
|
||||||
|
|
||||||
public string RobloxLaunchArgs { get; private set; } = "";
|
public string RobloxLaunchArgs { get; set; } = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Original launch arguments
|
/// Original launch arguments
|
||||||
|
Loading…
Reference in New Issue
Block a user