Skip to content

Commit f8dd388

Browse files
committed
Finalize v2.1.0 update
extra quality assurance and stuff
1 parent e72202f commit f8dd388

13 files changed

+88
-23
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ publish/
174174
*.azurePubxml
175175
# Note: Comment the next line if you want to checkin your web deploy settings,
176176
# but database connection strings (with potential passwords) will be unencrypted
177-
*.pubxml
177+
# *.pubxml
178178
*.publishproj
179179

180180
# Microsoft Azure Web App publish settings. Comment the next line if you want to

Bloxstrap/App.xaml.cs

+4-3
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ protected override void OnStartup(StartupEventArgs e)
8484
Logger.WriteLine($"[App::OnStartup] Starting {ProjectName} v{Version}");
8585

8686
// todo: remove this once 32-bit support is fully gone
87-
if (!Environment.Is64BitOperatingSystem)
87+
if (!App.IsQuiet && !Environment.Is64BitOperatingSystem)
8888
{
8989
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.";
9090

@@ -158,11 +158,12 @@ protected override void OnStartup(StartupEventArgs e)
158158
BaseDirectory = Path.Combine(Directories.LocalAppData, ProjectName);
159159
InitLog();
160160

161+
// we have reshade enabled by default so we need this
162+
FastFlags.SetRenderingMode("Direct3D 11");
163+
161164
if (!IsQuiet)
162165
{
163166
IsSetupComplete = false;
164-
// we have reshade enabled by default so we need this
165-
FastFlags.SetRenderingMode("Direct3D 11");
166167
new MainWindow().ShowDialog();
167168
}
168169
}

Bloxstrap/Bloxstrap.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
<UseWPF>true</UseWPF>
88
<UseWindowsForms>True</UseWindowsForms>
99
<ApplicationIcon>Bloxstrap.ico</ApplicationIcon>
10-
<Version>2.0.0</Version>
11-
<FileVersion>2.0.0.0</FileVersion>
10+
<Version>2.1.0</Version>
11+
<FileVersion>2.1.0.0</FileVersion>
1212
<ApplicationManifest>app.manifest</ApplicationManifest>
1313
</PropertyGroup>
1414

Bloxstrap/Bootstrapper.cs

+8-3
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,11 @@ public async Task Run()
158158
App.FastFlags.Save();
159159
}
160160

161+
if (App.Settings.Prop.UseReShade)
162+
SetStatus("Configuring/Downloading ReShade...");
163+
164+
await ReShade.CheckModifications();
165+
161166
await ApplyModifications();
162167

163168
if (App.IsFirstRun || FreshInstall)
@@ -369,7 +374,10 @@ private async Task StartRoblox()
369374
}
370375

371376
if (App.Settings.Prop.UseDiscordRichPresence || App.Settings.Prop.ShowServerDetails)
377+
{
372378
activityWatcher = new();
379+
shouldWait = true;
380+
}
373381

374382
if (App.Settings.Prop.UseDiscordRichPresence)
375383
{
@@ -381,7 +389,6 @@ private async Task StartRoblox()
381389
{
382390
App.Logger.WriteLine("[Bootstrapper::StartRoblox] Using server details notifier");
383391
serverNotifier = new(activityWatcher!);
384-
shouldWait = true;
385392
}
386393

387394
// launch custom integrations now
@@ -796,8 +803,6 @@ private async Task ApplyModifications()
796803
await CheckModPreset(App.Settings.Prop.UseOldMouseCursor, @"content\textures\Cursors\KeyboardMouse\ArrowFarCursor.png", "OldFarCursor.png");
797804
await CheckModPreset(App.Settings.Prop.UseDisableAppPatch, @"ExtraContent\places\Mobile.rbxl", "");
798805

799-
await ReShade.CheckModifications();
800-
801806
foreach (string file in Directory.GetFiles(modFolder, "*.*", SearchOption.AllDirectories))
802807
{
803808
// get relative directory path

Bloxstrap/Helpers/FastFlagManager.cs

+2
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ public override void Save()
8080
Directory.CreateDirectory(Path.GetDirectoryName(FileLocation)!);
8181
File.WriteAllText(FileLocation, JsonSerializer.Serialize(Prop, new JsonSerializerOptions { WriteIndented = true }));
8282

83+
Changes.Clear();
84+
8385
App.Logger.WriteLine($"[FastFlagManager::Save] JSON saved!");
8486
}
8587
}

Bloxstrap/Helpers/GameActivityWatcher.cs

+3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public class GameActivityWatcher : IDisposable
3232
public long ActivityPlaceId = 0;
3333
public string ActivityJobId = "";
3434
public string ActivityMachineAddress = "";
35+
public bool ActivityMachineUDMUX = false;
3536

3637
public bool IsDisposed = false;
3738

@@ -141,6 +142,7 @@ private void ExamineLogEntry(string entry)
141142
}
142143

143144
ActivityMachineAddress = match.Groups[1].Value;
145+
ActivityMachineUDMUX = true;
144146

145147
App.Logger.WriteLine($"[GameActivityWatcher::ExamineLogEntry] Server is UDMUX protected ({ActivityPlaceId}/{ActivityJobId}/{ActivityMachineAddress})");
146148
}
@@ -169,6 +171,7 @@ private void ExamineLogEntry(string entry)
169171
ActivityPlaceId = 0;
170172
ActivityJobId = "";
171173
ActivityMachineAddress = "";
174+
ActivityMachineUDMUX = false;
172175

173176
OnGameLeave?.Invoke(this, new EventArgs());
174177
}

Bloxstrap/Helpers/Updater.cs

+8
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,14 @@ public static void CheckInstalledVersion()
7878

7979
Bootstrapper.Register();
8080

81+
// update check: if we're upgrading to v2.1.0 and have reshade enabled,
82+
// we need to set our renderer to direct3d 11
83+
if (App.Settings.Prop.UseReShade && App.FastFlags.GetValue(FastFlagManager.RenderingModes["Direct3D 11"]) is null)
84+
{
85+
App.FastFlags.SetRenderingMode("Direct3D 11");
86+
App.FastFlags.Save();
87+
}
88+
8189
if (isAutoUpgrade)
8290
{
8391
NotifyIcon notification = new()

Bloxstrap/Integrations/DiscordRichPresence.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public async Task<bool> SetPresence()
109109
_rpcClient.SetPresence(new RichPresence
110110
{
111111
Details = universeDetails.Name,
112-
State = $"by {universeDetails.Creator.Name}",
112+
State = $"by {universeDetails.Creator.Name}" + (universeDetails.Creator.HasVerifiedBadge ? " ☑️" : ""),
113113
Timestamps = new Timestamps { Start = DateTime.UtcNow },
114114
Buttons = buttons.ToArray(),
115115
Assets = new Assets

Bloxstrap/Integrations/ServerNotifier.cs

+20-10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Net.NetworkInformation;
1+
using System;
2+
using System.Net.NetworkInformation;
23
using System.Threading.Tasks;
34
using System.Windows.Forms;
45

@@ -35,21 +36,30 @@ public async void Notify()
3536
locationRegion = locationRegion.ReplaceLineEndings("");
3637
locationCountry = locationCountry.ReplaceLineEndings("");
3738

38-
if (locationCity == locationRegion)
39+
if (String.IsNullOrEmpty(locationCountry))
40+
message = "Location: N/A";
41+
else if (locationCity == locationRegion)
3942
message = $"Location: {locationRegion}, {locationCountry}\n";
4043
else
4144
message = $"Location: {locationCity}, {locationRegion}, {locationCountry}\n";
4245

43-
PingReply ping = await new Ping().SendPingAsync(machineAddress);
44-
45-
// UDMUX protected servers reject ICMP packets and so the ping fails
46-
// we could get around this by doing a UDP ping but ehhhhhhhhhhhhh
47-
if (ping.Status == IPStatus.Success)
48-
message += $"Latency: ~{ping.RoundtripTime}ms";
46+
// UDMUX protected servers don't respond to ICMP packets and so the ping fails
47+
// we could probably get around this by doing a UDP latency test but ehhhhhhhh
48+
if (_activityWatcher.ActivityMachineUDMUX)
49+
{
50+
message += "Latency: N/A (Server is UDMUX protected)";
51+
}
4952
else
50-
message += "Latency: N/A (server may be UDMUX protected)";
53+
{
54+
PingReply ping = await new Ping().SendPingAsync(machineAddress);
55+
56+
if (ping.Status == IPStatus.Success)
57+
message += $"Latency: ~{ping.RoundtripTime}ms";
58+
else
59+
message += $"Latency: N/A (Code {ping.Status})";
60+
}
5161

52-
App.Logger.WriteLine($"[ServerNotifier::Notify] {message}");
62+
App.Logger.WriteLine($"[ServerNotifier::Notify] {message.ReplaceLineEndings("\\n")}");
5363

5464
NotifyIcon notification = new()
5565
{
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
https://go.microsoft.com/fwlink/?LinkID=208121.
4+
-->
5+
<Project>
6+
<PropertyGroup>
7+
<Configuration>Release</Configuration>
8+
<Platform>Any CPU</Platform>
9+
<PublishDir>bin\Release\net6.0-windows\publish\win-x64\</PublishDir>
10+
<PublishProtocol>FileSystem</PublishProtocol>
11+
<_TargetId>Folder</_TargetId>
12+
<TargetFramework>net6.0-windows</TargetFramework>
13+
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
14+
<SelfContained>false</SelfContained>
15+
<PublishSingleFile>true</PublishSingleFile>
16+
<PublishReadyToRun>false</PublishReadyToRun>
17+
</PropertyGroup>
18+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
https://go.microsoft.com/fwlink/?LinkID=208121.
4+
-->
5+
<Project>
6+
<PropertyGroup>
7+
<Configuration>Release</Configuration>
8+
<Platform>Any CPU</Platform>
9+
<PublishDir>bin\Release\net6.0-windows\publish\win-x86\</PublishDir>
10+
<PublishProtocol>FileSystem</PublishProtocol>
11+
<_TargetId>Folder</_TargetId>
12+
<TargetFramework>net6.0-windows</TargetFramework>
13+
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
14+
<SelfContained>false</SelfContained>
15+
<PublishSingleFile>true</PublishSingleFile>
16+
<PublishReadyToRun>false</PublishReadyToRun>
17+
</PropertyGroup>
18+
</Project>

Bloxstrap/ViewModels/MainWindowViewModel.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ private void ConfirmSettings()
8686
};
8787

8888
dialogControl.ShowAndWaitAsync(
89-
"Before you install",
90-
"After installation, you can open the menu again by searching for it in the Start menu.\n" +
89+
"What to know before you install",
90+
"After installation, you can open this menu again by searching for it in the Start menu.\n" +
9191
"If you want to revert back to the original Roblox launcher, just uninstall Bloxstrap and it will automatically revert."
9292
);
9393
}

Bloxstrap/Views/Pages/IntegrationsPage.xaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
</StackPanel>
117117

118118
<TextBlock Text="Miscellaneous" FontSize="16" FontWeight="Medium" Margin="0,16,0,0" />
119-
<ui:CardControl Margin="0,8,0,0" Padding="16,13,16,12" IsEnabled="{Binding IsChecked, ElementName=RbxFpsUnlockerEnabledToggle, Mode=OneWay}">
119+
<ui:CardControl Margin="0,8,0,0" Padding="16,13,16,12">
120120
<ui:CardControl.Header>
121121
<StackPanel>
122122
<TextBlock FontSize="14" Text="Show server details of current game" />

0 commit comments

Comments
 (0)