Skip to content

Commit

Permalink
Add Windows 7 & 8.1 deprecation message (#4365)
Browse files Browse the repository at this point in the history
* add windows 7 & 8.1 deprecation message

* remove deprecation bypass setting
  • Loading branch information
bluepilledgreat authored Mar 1, 2025
1 parent 4785464 commit 7977dba
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Bloxstrap/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,22 @@ await HttpClient.PostAsync(
}
}

public static void AssertWindowsOSVersion()
{
const string LOG_IDENT = "App::AssertWindowsOSVersion";

int major = Environment.OSVersion.Version.Major;
if (major < 10) // Windows 10 and newer only
{
Logger.WriteLine(LOG_IDENT, $"Detected unsupported Windows version ({Environment.OSVersion.Version}).");

if (!LaunchSettings.QuietFlag.Active)
Frontend.ShowMessageBox(Strings.App_OSDeprecation_Win7_81, MessageBoxImage.Error);

Terminate(ErrorCode.ERROR_INVALID_FUNCTION);
}
}

protected override void OnStartup(StartupEventArgs e)
{
const string LOG_IDENT = "App::OnStartup";
Expand Down Expand Up @@ -213,6 +229,8 @@ protected override void OnStartup(StartupEventArgs e)
#endif
}

Logger.WriteLine(LOG_IDENT, $"OSVersion: {Environment.OSVersion}");

Logger.WriteLine(LOG_IDENT, $"Loaded from {Paths.Process}");
Logger.WriteLine(LOG_IDENT, $"Temp path is {Paths.Temp}");
Logger.WriteLine(LOG_IDENT, $"WindowsStartMenu path is {Paths.WindowsStartMenu}");
Expand Down Expand Up @@ -292,6 +310,7 @@ protected override void OnStartup(StartupEventArgs e)
{
Logger.Initialize(true);
Logger.WriteLine(LOG_IDENT, "Not installed, launching the installer");
AssertWindowsOSVersion(); // prevent new installs from unsupported operating systems
LaunchHandler.LaunchInstaller();
}
else
Expand Down
2 changes: 2 additions & 0 deletions Bloxstrap/Bootstrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ public async Task Run()
}
#endif

App.AssertWindowsOSVersion();

// ensure only one instance of the bootstrapper is running at the time
// so that we don't have stuff like two updates happening simultaneously

Expand Down
9 changes: 9 additions & 0 deletions Bloxstrap/Resources/Strings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Bloxstrap/Resources/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1267,4 +1267,7 @@ Please close any applications that may be using Roblox's files, and relaunch.</v
<value>All Bloxstrap logs</value>
<comment>Label that appears next to a checkbox</comment>
</data>
<data name="App.OSDeprecation.Win7_81" xml:space="preserve">
<value>Roblox no longer supports Windows 7 or 8.1. To continue playing Roblox, please upgrade to Windows 10 or newer.</value>
</data>
</root>

0 comments on commit 7977dba

Please sign in to comment.