mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-17 02:31:28 -07:00
Unify all upgrade migrations
This commit is contained in:
parent
f1246e1a2d
commit
6e2eb03071
@ -209,8 +209,6 @@ namespace Bloxstrap
|
||||
if (_latestVersionGuid != _versionGuid || !File.Exists(_playerLocation))
|
||||
await InstallLatestVersion();
|
||||
|
||||
MigrateIntegrations();
|
||||
|
||||
if (_installWebView2)
|
||||
await InstallWebView2();
|
||||
|
||||
@ -773,34 +771,6 @@ namespace Bloxstrap
|
||||
App.Logger.WriteLine(LOG_IDENT, "Finished installing runtime");
|
||||
}
|
||||
|
||||
public static void MigrateIntegrations()
|
||||
{
|
||||
// TODO: move this to the installer logic
|
||||
|
||||
// v2.2.0 - remove rbxfpsunlocker
|
||||
string rbxfpsunlocker = Path.Combine(Paths.Integrations, "rbxfpsunlocker");
|
||||
|
||||
if (Directory.Exists(rbxfpsunlocker))
|
||||
Directory.Delete(rbxfpsunlocker, true);
|
||||
|
||||
// v2.3.0 - remove reshade
|
||||
string injectorLocation = Path.Combine(Paths.Modifications, "dxgi.dll");
|
||||
string configLocation = Path.Combine(Paths.Modifications, "ReShade.ini");
|
||||
|
||||
if (File.Exists(injectorLocation))
|
||||
{
|
||||
Frontend.ShowMessageBox(
|
||||
Strings.Bootstrapper_HyperionUpdateInfo,
|
||||
MessageBoxImage.Warning
|
||||
);
|
||||
|
||||
File.Delete(injectorLocation);
|
||||
}
|
||||
|
||||
if (File.Exists(configLocation))
|
||||
File.Delete(configLocation);
|
||||
}
|
||||
|
||||
private async Task ApplyModifications()
|
||||
{
|
||||
const string LOG_IDENT = "Bootstrapper::ApplyModifications";
|
||||
|
@ -252,11 +252,6 @@ namespace Bloxstrap
|
||||
// TODO - remove when activity tracking has been revamped
|
||||
if (GetPreset("Network.Log") != "7")
|
||||
SetPreset("Network.Log", "7");
|
||||
|
||||
// TODO - this should be moved to the installer update logic
|
||||
string? val = GetPreset("UI.Menu.Style.EnableV4.1");
|
||||
if (GetPreset("UI.Menu.Style.EnableV4.2") != val)
|
||||
SetPreset("UI.Menu.Style.EnableV4.2", val);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -408,6 +408,41 @@ namespace Bloxstrap
|
||||
|
||||
if (existingVer is not null)
|
||||
{
|
||||
if (Utilities.CompareVersions(existingVer, "2.2.0") == VersionComparison.LessThan)
|
||||
{
|
||||
string path = Path.Combine(Paths.Integrations, "rbxfpsunlocker");
|
||||
|
||||
try
|
||||
{
|
||||
if (Directory.Exists(path))
|
||||
Directory.Delete(path, true);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
App.Logger.WriteException(LOG_IDENT, ex);
|
||||
}
|
||||
}
|
||||
|
||||
if (Utilities.CompareVersions(existingVer, "2.3.0") == VersionComparison.LessThan)
|
||||
{
|
||||
string injectorLocation = Path.Combine(Paths.Modifications, "dxgi.dll");
|
||||
string configLocation = Path.Combine(Paths.Modifications, "ReShade.ini");
|
||||
|
||||
if (File.Exists(injectorLocation))
|
||||
{
|
||||
Frontend.ShowMessageBox(
|
||||
Strings.Bootstrapper_HyperionUpdateInfo,
|
||||
MessageBoxImage.Warning
|
||||
);
|
||||
|
||||
File.Delete(injectorLocation);
|
||||
}
|
||||
|
||||
if (File.Exists(configLocation))
|
||||
File.Delete(configLocation);
|
||||
}
|
||||
|
||||
|
||||
if (Utilities.CompareVersions(existingVer, "2.5.0") == VersionComparison.LessThan)
|
||||
{
|
||||
App.FastFlags.SetValue("DFFlagDisableDPIScale", null);
|
||||
@ -422,6 +457,13 @@ namespace Bloxstrap
|
||||
App.FastFlags.SetPreset("UI.Menu.Style.ABTest", false);
|
||||
}
|
||||
|
||||
if (Utilities.CompareVersions(existingVer, "2.5.3") == VersionComparison.LessThan)
|
||||
{
|
||||
string? val = App.FastFlags.GetPreset("UI.Menu.Style.EnableV4.1");
|
||||
if (App.FastFlags.GetPreset("UI.Menu.Style.EnableV4.2") != val)
|
||||
App.FastFlags.SetPreset("UI.Menu.Style.EnableV4.2", val);
|
||||
}
|
||||
|
||||
if (Utilities.CompareVersions(existingVer, "2.6.0") == VersionComparison.LessThan)
|
||||
{
|
||||
if (App.Settings.Prop.UseDisableAppPatch)
|
||||
@ -443,9 +485,7 @@ namespace Bloxstrap
|
||||
|
||||
_ = int.TryParse(App.FastFlags.GetPreset("Rendering.Framerate"), out int x);
|
||||
if (x == 0)
|
||||
{
|
||||
App.FastFlags.SetPreset("Rendering.Framerate", null);
|
||||
}
|
||||
}
|
||||
|
||||
if (Utilities.CompareVersions(existingVer, "2.8.0") == VersionComparison.LessThan)
|
||||
|
Loading…
Reference in New Issue
Block a user