mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -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))
|
if (_latestVersionGuid != _versionGuid || !File.Exists(_playerLocation))
|
||||||
await InstallLatestVersion();
|
await InstallLatestVersion();
|
||||||
|
|
||||||
MigrateIntegrations();
|
|
||||||
|
|
||||||
if (_installWebView2)
|
if (_installWebView2)
|
||||||
await InstallWebView2();
|
await InstallWebView2();
|
||||||
|
|
||||||
@ -773,34 +771,6 @@ namespace Bloxstrap
|
|||||||
App.Logger.WriteLine(LOG_IDENT, "Finished installing runtime");
|
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()
|
private async Task ApplyModifications()
|
||||||
{
|
{
|
||||||
const string LOG_IDENT = "Bootstrapper::ApplyModifications";
|
const string LOG_IDENT = "Bootstrapper::ApplyModifications";
|
||||||
|
@ -252,11 +252,6 @@ namespace Bloxstrap
|
|||||||
// TODO - remove when activity tracking has been revamped
|
// TODO - remove when activity tracking has been revamped
|
||||||
if (GetPreset("Network.Log") != "7")
|
if (GetPreset("Network.Log") != "7")
|
||||||
SetPreset("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 (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)
|
if (Utilities.CompareVersions(existingVer, "2.5.0") == VersionComparison.LessThan)
|
||||||
{
|
{
|
||||||
App.FastFlags.SetValue("DFFlagDisableDPIScale", null);
|
App.FastFlags.SetValue("DFFlagDisableDPIScale", null);
|
||||||
@ -422,6 +457,13 @@ namespace Bloxstrap
|
|||||||
App.FastFlags.SetPreset("UI.Menu.Style.ABTest", false);
|
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 (Utilities.CompareVersions(existingVer, "2.6.0") == VersionComparison.LessThan)
|
||||||
{
|
{
|
||||||
if (App.Settings.Prop.UseDisableAppPatch)
|
if (App.Settings.Prop.UseDisableAppPatch)
|
||||||
@ -443,10 +485,8 @@ namespace Bloxstrap
|
|||||||
|
|
||||||
_ = int.TryParse(App.FastFlags.GetPreset("Rendering.Framerate"), out int x);
|
_ = int.TryParse(App.FastFlags.GetPreset("Rendering.Framerate"), out int x);
|
||||||
if (x == 0)
|
if (x == 0)
|
||||||
{
|
|
||||||
App.FastFlags.SetPreset("Rendering.Framerate", null);
|
App.FastFlags.SetPreset("Rendering.Framerate", null);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (Utilities.CompareVersions(existingVer, "2.8.0") == VersionComparison.LessThan)
|
if (Utilities.CompareVersions(existingVer, "2.8.0") == VersionComparison.LessThan)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user