From 7f978c22a40b2b244c751ec3ff4b67460983df91 Mon Sep 17 00:00:00 2001 From: pizzaboxer <41478239+pizzaboxer@users.noreply.github.com> Date: Sun, 15 Jan 2023 17:51:53 +0000 Subject: [PATCH] Publish draft for ReShade support Only things left to implement are updating for ReShade/Extravi's presets, credits, and hopefully some bug fixes. --- Bloxstrap/Bloxstrap.csproj | 5 +- Bloxstrap/Bootstrapper.cs | 14 +- Bloxstrap/Dialogs/Preferences.xaml | 8 +- Bloxstrap/Dialogs/Preferences.xaml.cs | 16 +- Bloxstrap/Helpers/Directories.cs | 2 + .../Helpers/Integrations/RbxFpsUnlocker.cs | 6 +- Bloxstrap/Helpers/Integrations/ReShade.cs | 355 ++++++++++++++++++ Bloxstrap/Models/GithubCommit.cs | 28 ++ Bloxstrap/Models/SettingsFormat.cs | 4 +- Bloxstrap/Program.cs | 2 +- 10 files changed, 418 insertions(+), 22 deletions(-) create mode 100644 Bloxstrap/Helpers/Integrations/ReShade.cs create mode 100644 Bloxstrap/Models/GithubCommit.cs diff --git a/Bloxstrap/Bloxstrap.csproj b/Bloxstrap/Bloxstrap.csproj index e8c835a..ba22c11 100644 --- a/Bloxstrap/Bloxstrap.csproj +++ b/Bloxstrap/Bloxstrap.csproj @@ -10,8 +10,8 @@ AnyCPU AnyCPU;x86 Bloxstrap.ico - 1.6.2 - 1.6.2.0 + 1.7.0 + 1.7.0.0 @@ -26,6 +26,7 @@ + diff --git a/Bloxstrap/Bootstrapper.cs b/Bloxstrap/Bootstrapper.cs index 02c7937..66443a3 100644 --- a/Bloxstrap/Bootstrapper.cs +++ b/Bloxstrap/Bootstrapper.cs @@ -472,7 +472,6 @@ namespace Bloxstrap Directory.CreateDirectory(Directories.Base); Dialog.CancelEnabled = true; - Dialog.ProgressStyle = ProgressBarStyle.Continuous; // compute total bytes to download @@ -512,6 +511,8 @@ namespace Bloxstrap if (!FreshInstall) { + ReShade.SynchronizeConfigFile(); + // let's take this opportunity to delete any packages we don't need anymore foreach (string filename in Directory.GetFiles(Directories.Downloads)) { @@ -554,13 +555,15 @@ namespace Bloxstrap await CheckModPreset(Program.Settings.UseOldMouseCursor, @"content\textures\Cursors\KeyboardMouse\ArrowFarCursor.png", "OldFarCursor.png"); await CheckModPreset(Program.Settings.UseDisableAppPatch, @"ExtraContent\places\Mobile.rbxl", ""); + await ReShade.CheckModifications(); + foreach (string file in Directory.GetFiles(modFolder, "*.*", SearchOption.AllDirectories)) { // get relative directory path string relativeFile = file.Substring(modFolder.Length + 1); - // ignore files placed in the root directory - if (!relativeFile.Contains('\\')) + // ignore files placed in the root directory as long as they're not ini or dll files + if (!relativeFile.Contains('\\') && !relativeFile.EndsWith(".ini") && !relativeFile.EndsWith(".dll")) continue; modFolderFiles.Add(relativeFile); @@ -613,6 +616,11 @@ namespace Bloxstrap catch (InvalidOperationException) { // package doesn't exist, likely mistakenly placed file + string versionFileLocation = Path.Combine(VersionFolder, fileLocation); + + if (File.Exists(versionFileLocation)) + File.Delete(versionFileLocation); + continue; } diff --git a/Bloxstrap/Dialogs/Preferences.xaml b/Bloxstrap/Dialogs/Preferences.xaml index 7262fe9..9f90e0f 100644 --- a/Bloxstrap/Dialogs/Preferences.xaml +++ b/Bloxstrap/Dialogs/Preferences.xaml @@ -52,16 +52,16 @@ - - + + -