Add 32-bit support notice

This commit is contained in:
pizzaboxer 2023-03-12 23:05:51 +00:00
parent 75290fd9ee
commit b8dd708276
5 changed files with 47 additions and 28 deletions

View File

@ -1,6 +1,7 @@
using System;
using System.Globalization;
using System.IO;
using System.Management;
using System.Net.Http;
using System.Net;
using System.Reflection;
@ -82,6 +83,23 @@ namespace Bloxstrap
Logger.WriteLine($"[App::OnStartup] Starting {ProjectName} v{Version}");
if (!Environment.Is64BitOperatingSystem)
{
string message = "In the near future, Roblox will no longer support 32-bit Windows devices. To keep playing Roblox, please use a device that is 64-bit compatible.";
// check if the processor actually supports 64-bit so we can tell
// the user that they are able to upgrade to 64-bit windows
foreach (ManagementObject result in new ManagementObjectSearcher("SELECT * FROM Win32_Processor").Get())
{
// https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/win32-processor
// architecture type 9 is x64
if (result["Architecture"].ToString() == "9")
message += "\n\nYour computer is running a 32-bit version of Windows but is actually 64-bit compatible. Search online for how to upgrade to a 64-bit version of Windows.";
}
ShowMessageBox(message, MessageBoxImage.Warning);
}
// To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration.
ApplicationConfiguration.Initialize();
@ -168,8 +186,8 @@ namespace Bloxstrap
State.Load();
}
#if !DEBUG
try
{
try
{
if (!IsUninstall && !IsFirstRun)
Updater.CheckInstalledVersion();
#endif
@ -273,7 +291,7 @@ namespace Bloxstrap
if (t.IsFaulted)
Logger.WriteLine("[App::OnStartup] An exception occurred when running the bootstrapper");
if (t.Exception is null)
if (t.Exception is null)
return;
Logger.WriteLine($"[App::OnStartup] {t.Exception}");
@ -305,15 +323,15 @@ namespace Bloxstrap
}
catch (Exception ex)
{
Logger.WriteLine("[App::OnStartup] An exception occurred when running the main thread");
Logger.WriteLine($"[App::OnStartup] {ex}");
Logger.WriteLine("[App::OnStartup] An exception occurred when running the main thread");
Logger.WriteLine($"[App::OnStartup] {ex}");
if (!IsQuiet)
Settings.Prop.BootstrapperStyle.GetNew().ShowError($"{ex.GetType()}: {ex.Message}");
}
Settings.Prop.BootstrapperStyle.GetNew().ShowError($"{ex.GetType()}: {ex.Message}");
}
#endif
Terminate();
Terminate();
}
}
}

View File

@ -26,6 +26,7 @@
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.1.0" />
<PackageReference Include="DiscordRichPresence" Version="1.1.3.18" />
<PackageReference Include="ini-parser-netstandard" Version="2.5.2" />
<PackageReference Include="Microsoft.Windows.Compatibility" Version="7.0.0" />
<PackageReference Include="securifybv.ShellLink" Version="0.1.0" />
<PackageReference Include="WPF-UI" Version="2.0.3" />
</ItemGroup>

View File

@ -3,12 +3,12 @@ using System.Text.Json.Serialization;
namespace Bloxstrap.Models.RobloxApi
{
/// <summary>
/// Roblox.Web.WebAPI.Models.ApiArrayResponse
/// </summary>
public class ApiArrayResponse<T>
{
/// <summary>
/// Roblox.Web.WebAPI.Models.ApiArrayResponse
/// </summary>
public class ApiArrayResponse<T>
{
[JsonPropertyName("data")]
public IEnumerable<T> Data { get; set; } = null!;
}
public IEnumerable<T> Data { get; set; } = null!;
}
}

View File

@ -47,7 +47,7 @@ namespace Bloxstrap.Models.RobloxApi
[JsonPropertyName("sourceDescription")]
public string SourceDescription { get; set; } = null!;
[JsonPropertyName("creator")]
[JsonPropertyName("creator")]
public GameCreator Creator { get; set; } = null!;
/// <summary>

View File

@ -2,18 +2,18 @@
namespace Bloxstrap.Models.RobloxApi
{
/// <summary>
/// Roblox.Web.Responses.Thumbnails.ThumbnailResponse
/// </summary>
public class ThumbnailResponse
{
[JsonPropertyName("targetId")]
public long TargetId { get; set; }
/// <summary>
/// Roblox.Web.Responses.Thumbnails.ThumbnailResponse
/// </summary>
public class ThumbnailResponse
{
[JsonPropertyName("targetId")]
public long TargetId { get; set; }
[JsonPropertyName("state")]
public string State { get; set; } = null!;
[JsonPropertyName("state")]
public string State { get; set; } = null!;
[JsonPropertyName("imageUrl")]
public string ImageUrl { get; set; } = null!;
}
[JsonPropertyName("imageUrl")]
public string ImageUrl { get; set; } = null!;
}
}