From 8316c9ec7273dd85b2ffe0babf049b24e6c85567 Mon Sep 17 00:00:00 2001
From: pizzaboxer <41478239+pizzaboxer@users.noreply.github.com>
Date: Sat, 27 Aug 2022 13:41:15 +0100
Subject: [PATCH] Code cleanup and minor fixes
- Fixed channel arg not being set when launching game client
- Fixed preferences tooltip hiding too early
- Fixed last deploy info not showing for the right channel
- Last deploy info now shows deploy timestamp according to system timezone
---
Bloxstrap/Bloxstrap.csproj | 4 +-
Bloxstrap/Bootstrapper.cs | 54 +++++----------
.../BootstrapperStyleForm.cs | 13 ++--
.../BootstrapperStyles/LegacyDialog2011.cs | 4 +-
.../BootstrapperStyles/ProgressDialog.cs | 4 +-
.../BootstrapperStyles/ProgressDialogDark.cs | 4 +-
.../Dialogs/BootstrapperStyles/VistaDialog.cs | 5 +-
Bloxstrap/Dialogs/Preferences.Designer.cs | 4 ++
Bloxstrap/Dialogs/Preferences.cs | 42 +++---------
Bloxstrap/Enums/BootstrapperIcon.cs | 65 +++++++++++++++++++
Bloxstrap/Enums/BootstrapperStyle.cs | 45 ++++++++++++-
Bloxstrap/Helpers/DeployManager.cs | 19 ++++--
Bloxstrap/Helpers/IconManager.cs | 47 --------------
Bloxstrap/Helpers/Protocol.cs | 6 +-
Bloxstrap/Models/VersionDeploy.cs | 2 +-
Bloxstrap/Program.cs | 5 +-
16 files changed, 177 insertions(+), 146 deletions(-)
delete mode 100644 Bloxstrap/Helpers/IconManager.cs
diff --git a/Bloxstrap/Bloxstrap.csproj b/Bloxstrap/Bloxstrap.csproj
index bd9d446b..75d41f5e 100644
--- a/Bloxstrap/Bloxstrap.csproj
+++ b/Bloxstrap/Bloxstrap.csproj
@@ -9,8 +9,8 @@
AnyCPU
AnyCPU;x86
Bloxstrap.ico
- 1.4.0
- 1.4.0.0
+ 1.4.1
+ 1.4.1.0
True
diff --git a/Bloxstrap/Bootstrapper.cs b/Bloxstrap/Bootstrapper.cs
index 007929e1..c35a2e62 100644
--- a/Bloxstrap/Bootstrapper.cs
+++ b/Bloxstrap/Bootstrapper.cs
@@ -83,40 +83,14 @@ public partial class Bootstrapper
#endregion
#region Core
- public Bootstrapper()
+ public Bootstrapper(string? launchCommandLine = null)
{
+ LaunchCommandLine = launchCommandLine;
FreshInstall = String.IsNullOrEmpty(Program.Settings.VersionGuid);
Client.Timeout = TimeSpan.FromMinutes(10);
}
- public void Initialize(string? launchCommandLine = null)
- {
- LaunchCommandLine = launchCommandLine;
-
- switch (Program.Settings.BootstrapperStyle)
- {
- case BootstrapperStyle.VistaDialog:
- Application.Run(new VistaDialog(this));
- break;
-
- case BootstrapperStyle.LegacyDialog2009:
- Application.Run(new LegacyDialog2009(this));
- break;
-
- case BootstrapperStyle.LegacyDialog2011:
- Application.Run(new LegacyDialog2011(this));
- break;
-
- case BootstrapperStyle.ProgressDialog:
- Application.Run(new ProgressDialog(this));
- break;
-
- case BootstrapperStyle.ProgressDialogDark:
- Application.Run(new ProgressDialogDark(this));
- break;
- }
- }
-
+ // this is called from BootstrapperStyleForm.SetupDialog()
public async Task Run()
{
if (LaunchCommandLine == "-uninstall")
@@ -183,7 +157,12 @@ private async Task StartRoblox()
Dialog.Message = "Starting Roblox...";
// launch time isn't really required for all launches, but it's usually just safest to do this
- LaunchCommandLine += " --launchtime=" + DateTimeOffset.Now.ToUnixTimeSeconds() + " -startEvent " + startEventName;
+ LaunchCommandLine += " --launchtime=" + DateTimeOffset.Now.ToUnixTimeSeconds();
+
+ if (Program.Settings.Channel.ToLower() != DeployManager.DefaultChannel.ToLower())
+ LaunchCommandLine += " -channel " + Program.Settings.Channel.ToLower();
+
+ LaunchCommandLine += " -startEvent " + startEventName;
using (SystemEvent startEvent = new(startEventName))
{
@@ -400,8 +379,10 @@ private async Task InstallLatestVersion()
Dialog.CancelEnabled = true;
- // i believe the original bootstrapper bases the progress bar off zip
- // extraction progress, but here i'm doing package download progress
+ // i believe the bootstrapper bases the progress bar off
+ // bytes downloaded / bytes total according to rbxPkgManifest?
+ // i'm too lazy for that, so here it's just based off how many packages
+ // have finished downloading
Dialog.ProgressStyle = ProgressBarStyle.Continuous;
@@ -411,7 +392,7 @@ private async Task InstallLatestVersion()
foreach (Package package in VersionPackageManifest)
{
- // no await, download all the packages at once
+ // download all the packages at once
DownloadPackage(package);
}
@@ -430,6 +411,8 @@ private async Task InstallLatestVersion()
Debug.WriteLine("Finished downloading");
+ Dialog.Message = "Configuring Roblox...";
+
Directory.CreateDirectory(Directories.Versions);
foreach (Package package in VersionPackageManifest)
@@ -440,8 +423,6 @@ private async Task InstallLatestVersion()
Debug.WriteLine("Finished extracting packages");
- Dialog.Message = "Configuring Roblox...";
-
string appSettingsLocation = Path.Combine(VersionFolder, "AppSettings.xml");
await File.WriteAllTextAsync(appSettingsLocation, AppSettings);
@@ -529,7 +510,8 @@ private void ApplyModifications()
File.Copy(fileModFolder, fileVersionFolder, true);
}
- // now we check for files that have been deleted from the mod folder
+ // now check for files that have been deleted from the mod folder
+ // according to the manifest
foreach (string fileLocation in manifestFiles)
{
if (modFolderFiles.Contains(fileLocation))
diff --git a/Bloxstrap/Dialogs/BootstrapperStyles/BootstrapperStyleForm.cs b/Bloxstrap/Dialogs/BootstrapperStyles/BootstrapperStyleForm.cs
index eefdd19c..09b78813 100644
--- a/Bloxstrap/Dialogs/BootstrapperStyles/BootstrapperStyleForm.cs
+++ b/Bloxstrap/Dialogs/BootstrapperStyles/BootstrapperStyleForm.cs
@@ -1,5 +1,4 @@
-using Bloxstrap.Helpers;
-using Bloxstrap.Helpers.RSMM;
+using Bloxstrap.Enums;
namespace Bloxstrap.Dialogs.BootstrapperStyles
{
@@ -18,7 +17,7 @@ public string Message
set
{
if (this.InvokeRequired)
- this.Invoke(new Action(() => { _message = value; }));
+ this.Invoke(() => _message = value);
else
_message = value;
}
@@ -30,7 +29,7 @@ public ProgressBarStyle ProgressStyle
set
{
if (this.InvokeRequired)
- this.Invoke(new Action(() => { _progressStyle = value; }));
+ this.Invoke(() => _progressStyle = value);
else
_progressStyle = value;
}
@@ -42,7 +41,7 @@ public int ProgressValue
set
{
if (this.InvokeRequired)
- this.Invoke(new Action(() => { _progressValue = value; }));
+ this.Invoke(() => _progressValue = value);
else
_progressValue = value;
}
@@ -54,7 +53,7 @@ public bool CancelEnabled
set
{
if (this.InvokeRequired)
- this.Invoke(new Action(() => { _cancelEnabled = value; }));
+ this.Invoke(() => _cancelEnabled = value);
else
_cancelEnabled = value;
}
@@ -63,7 +62,7 @@ public bool CancelEnabled
public void SetupDialog()
{
this.Text = Program.ProjectName;
- this.Icon = IconManager.GetIconResource();
+ this.Icon = Program.Settings.BootstrapperIcon.GetIcon();
if (Bootstrapper is null)
{
diff --git a/Bloxstrap/Dialogs/BootstrapperStyles/LegacyDialog2011.cs b/Bloxstrap/Dialogs/BootstrapperStyles/LegacyDialog2011.cs
index c3e9df90..cc13bd07 100644
--- a/Bloxstrap/Dialogs/BootstrapperStyles/LegacyDialog2011.cs
+++ b/Bloxstrap/Dialogs/BootstrapperStyles/LegacyDialog2011.cs
@@ -1,4 +1,4 @@
-using Bloxstrap.Helpers;
+using Bloxstrap.Enums;
namespace Bloxstrap.Dialogs.BootstrapperStyles
{
@@ -37,7 +37,7 @@ public LegacyDialog2011(Bootstrapper? bootstrapper = null)
Bootstrapper = bootstrapper;
// have to convert icon -> bitmap since winforms scaling is poop
- this.IconBox.Image = IconManager.GetIconResource().ToBitmap();
+ this.IconBox.Image = Program.Settings.BootstrapperIcon.GetIcon().ToBitmap();
SetupDialog();
}
diff --git a/Bloxstrap/Dialogs/BootstrapperStyles/ProgressDialog.cs b/Bloxstrap/Dialogs/BootstrapperStyles/ProgressDialog.cs
index 2093a797..66c85462 100644
--- a/Bloxstrap/Dialogs/BootstrapperStyles/ProgressDialog.cs
+++ b/Bloxstrap/Dialogs/BootstrapperStyles/ProgressDialog.cs
@@ -1,4 +1,4 @@
-using Bloxstrap.Helpers;
+using Bloxstrap.Enums;
namespace Bloxstrap.Dialogs.BootstrapperStyles
{
@@ -36,7 +36,7 @@ public ProgressDialog(Bootstrapper? bootstrapper = null)
Bootstrapper = bootstrapper;
- this.IconBox.BackgroundImage = IconManager.GetBitmapResource();
+ this.IconBox.BackgroundImage = Program.Settings.BootstrapperIcon.GetBitmap();
SetupDialog();
}
diff --git a/Bloxstrap/Dialogs/BootstrapperStyles/ProgressDialogDark.cs b/Bloxstrap/Dialogs/BootstrapperStyles/ProgressDialogDark.cs
index 637556df..dea9c56e 100644
--- a/Bloxstrap/Dialogs/BootstrapperStyles/ProgressDialogDark.cs
+++ b/Bloxstrap/Dialogs/BootstrapperStyles/ProgressDialogDark.cs
@@ -1,4 +1,4 @@
-using Bloxstrap.Helpers;
+using Bloxstrap.Enums;
namespace Bloxstrap.Dialogs.BootstrapperStyles
{
@@ -36,7 +36,7 @@ public ProgressDialogDark(Bootstrapper? bootstrapper = null)
Bootstrapper = bootstrapper;
- this.IconBox.BackgroundImage = IconManager.GetBitmapResource();
+ this.IconBox.BackgroundImage = Program.Settings.BootstrapperIcon.GetBitmap();
SetupDialog();
}
diff --git a/Bloxstrap/Dialogs/BootstrapperStyles/VistaDialog.cs b/Bloxstrap/Dialogs/BootstrapperStyles/VistaDialog.cs
index d16bec66..bfb288ab 100644
--- a/Bloxstrap/Dialogs/BootstrapperStyles/VistaDialog.cs
+++ b/Bloxstrap/Dialogs/BootstrapperStyles/VistaDialog.cs
@@ -1,5 +1,4 @@
-using Bloxstrap.Helpers;
-using Bloxstrap.Helpers.RSMM;
+using Bloxstrap.Enums;
namespace Bloxstrap.Dialogs.BootstrapperStyles
{
@@ -66,7 +65,7 @@ public VistaDialog(Bootstrapper? bootstrapper = null)
Dialog = new TaskDialogPage()
{
- Icon = new TaskDialogIcon(IconManager.GetIconResource()),
+ Icon = new TaskDialogIcon(Program.Settings.BootstrapperIcon.GetIcon()),
Caption = Program.ProjectName,
Buttons = { TaskDialogButton.Cancel },
diff --git a/Bloxstrap/Dialogs/Preferences.Designer.cs b/Bloxstrap/Dialogs/Preferences.Designer.cs
index c272dd1f..e50619f8 100644
--- a/Bloxstrap/Dialogs/Preferences.Designer.cs
+++ b/Bloxstrap/Dialogs/Preferences.Designer.cs
@@ -467,6 +467,10 @@ private void InitializeComponent()
//
// InfoTooltip
//
+ this.InfoTooltip.AutomaticDelay = 0;
+ this.InfoTooltip.AutoPopDelay = 16000;
+ this.InfoTooltip.InitialDelay = 500;
+ this.InfoTooltip.ReshowDelay = 82;
this.InfoTooltip.ShowAlways = true;
this.InfoTooltip.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info;
this.InfoTooltip.ToolTipTitle = "Information";
diff --git a/Bloxstrap/Dialogs/Preferences.cs b/Bloxstrap/Dialogs/Preferences.cs
index b6f261c6..535ef979 100644
--- a/Bloxstrap/Dialogs/Preferences.cs
+++ b/Bloxstrap/Dialogs/Preferences.cs
@@ -3,7 +3,6 @@
using Microsoft.Win32;
-using Bloxstrap.Dialogs.BootstrapperStyles;
using Bloxstrap.Enums;
using Bloxstrap.Helpers;
using Bloxstrap.Helpers.Integrations;
@@ -58,10 +57,12 @@ private async Task GetChannelInfo(string channel)
VersionDeploy info = await DeployManager.GetLastDeploy(channel);
- if (info.FileVersion is null || info.Date is null)
+ if (info.FileVersion is null || info.Timestamp is null)
return;
- ChannelInfo = $"Last deploy:\nv{info.FileVersion} @ {info.Date}";
+ string strTimestamp = info.Timestamp.Value.ToString("MM/dd/yyyy hh:mm:ss tt", Program.CultureFormat);
+
+ ChannelInfo = $"Last deploy:\nv{info.FileVersion} @ {strTimestamp}";
}
public Preferences()
@@ -200,30 +201,7 @@ private void SaveButton_Click(object sender, EventArgs e)
private void PreviewButton_Click(object sender, EventArgs e)
{
this.Visible = false;
-
- switch (Program.Settings.BootstrapperStyle)
- {
- case BootstrapperStyle.VistaDialog:
- new VistaDialog().ShowDialog();
- break;
-
- case BootstrapperStyle.LegacyDialog2009:
- new LegacyDialog2009().ShowDialog();
- break;
-
- case BootstrapperStyle.LegacyDialog2011:
- new LegacyDialog2011().ShowDialog();
- break;
-
- case BootstrapperStyle.ProgressDialog:
- new ProgressDialog().ShowDialog();
- break;
-
- case BootstrapperStyle.ProgressDialogDark:
- new ProgressDialogDark().ShowDialog();
- break;
- }
-
+ Program.Settings.BootstrapperStyle.Show();
this.Visible = true;
}
@@ -246,7 +224,7 @@ private void IconSelection_SelectedIndexChanged(object sender, EventArgs e)
{
BootstrapperIcon icon = SelectableIcons[this.IconSelection.Text];
- this.IconPreview.BackgroundImage = IconManager.GetBitmapResource(icon);
+ this.IconPreview.BackgroundImage = icon.GetBitmap();
if (!this.Visible)
return;
@@ -304,12 +282,10 @@ private void ButtonOpenModFolder_Click(object sender, EventArgs e)
private void SelectChannel_SelectedValueChanged(object sender, EventArgs e)
{
+ if (this.Visible)
+ Program.Settings.Channel = this.SelectChannel.Text;
+
Task.Run(() => GetChannelInfo(Program.Settings.Channel));
-
- if (!this.Visible)
- return;
-
- Program.Settings.Channel = this.SelectChannel.Text;
}
private void ToggleCheckForUpdates_CheckedChanged(object sender, EventArgs e)
diff --git a/Bloxstrap/Enums/BootstrapperIcon.cs b/Bloxstrap/Enums/BootstrapperIcon.cs
index 87ecaf99..3df6ee20 100644
--- a/Bloxstrap/Enums/BootstrapperIcon.cs
+++ b/Bloxstrap/Enums/BootstrapperIcon.cs
@@ -11,4 +11,69 @@ public enum BootstrapperIcon
Icon2019,
Icon2022
}
+
+ public static class BootstrapperIconEx
+ {
+ public static Icon GetIcon(this BootstrapperIcon icon)
+ {
+ switch (icon)
+ {
+ case BootstrapperIcon.Icon2009:
+ return Properties.Resources.Icon2009_ico;
+
+ case BootstrapperIcon.Icon2011:
+ return Properties.Resources.Icon2011_ico;
+
+ case BootstrapperIcon.IconEarly2015:
+ return Properties.Resources.IconEarly2015_ico;
+
+ case BootstrapperIcon.IconLate2015:
+ return Properties.Resources.IconLate2015_ico;
+
+ case BootstrapperIcon.Icon2017:
+ return Properties.Resources.Icon2017_ico;
+
+ case BootstrapperIcon.Icon2019:
+ return Properties.Resources.Icon2019_ico;
+
+ case BootstrapperIcon.Icon2022:
+ return Properties.Resources.Icon2022_ico;
+
+ case BootstrapperIcon.IconBloxstrap:
+ default:
+ return Properties.Resources.IconBloxstrap_ico;
+ }
+ }
+
+ public static Bitmap GetBitmap(this BootstrapperIcon icon)
+ {
+ switch (icon)
+ {
+ case BootstrapperIcon.Icon2009:
+ return Properties.Resources.Icon2009_png;
+
+ case BootstrapperIcon.Icon2011:
+ return Properties.Resources.Icon2011_png;
+
+ case BootstrapperIcon.IconEarly2015:
+ return Properties.Resources.IconEarly2015_png;
+
+ case BootstrapperIcon.IconLate2015:
+ return Properties.Resources.IconLate2015_png;
+
+ case BootstrapperIcon.Icon2017:
+ return Properties.Resources.Icon2017_png;
+
+ case BootstrapperIcon.Icon2019:
+ return Properties.Resources.Icon2019_png;
+
+ case BootstrapperIcon.Icon2022:
+ return Properties.Resources.Icon2022_png;
+
+ case BootstrapperIcon.IconBloxstrap:
+ default:
+ return Properties.Resources.IconBloxstrap_png;
+ }
+ }
+ }
}
diff --git a/Bloxstrap/Enums/BootstrapperStyle.cs b/Bloxstrap/Enums/BootstrapperStyle.cs
index 5f30c4b4..864c8368 100644
--- a/Bloxstrap/Enums/BootstrapperStyle.cs
+++ b/Bloxstrap/Enums/BootstrapperStyle.cs
@@ -1,4 +1,6 @@
-namespace Bloxstrap.Enums
+using Bloxstrap.Dialogs.BootstrapperStyles;
+
+namespace Bloxstrap.Enums
{
public enum BootstrapperStyle
{
@@ -8,4 +10,45 @@ public enum BootstrapperStyle
ProgressDialog,
ProgressDialogDark,
}
+
+ public static class BootstrapperStyleEx
+ {
+ public static void Show(this BootstrapperStyle bootstrapperStyle, Bootstrapper? bootstrapper = null)
+ {
+ Form dialog;
+
+ switch (bootstrapperStyle)
+ {
+ case BootstrapperStyle.VistaDialog:
+ dialog = new VistaDialog(bootstrapper);
+ break;
+
+ case BootstrapperStyle.LegacyDialog2009:
+ dialog = new LegacyDialog2009(bootstrapper);
+ break;
+
+ case BootstrapperStyle.LegacyDialog2011:
+ dialog = new LegacyDialog2011(bootstrapper);
+ break;
+
+ case BootstrapperStyle.ProgressDialog:
+ default:
+ dialog = new ProgressDialog(bootstrapper);
+ break;
+
+ case BootstrapperStyle.ProgressDialogDark:
+ dialog = new ProgressDialogDark(bootstrapper);
+ break;
+ }
+
+ if (bootstrapper is null)
+ {
+ dialog.ShowDialog();
+ }
+ else
+ {
+ Application.Run(dialog);
+ }
+ }
+ }
}
diff --git a/Bloxstrap/Helpers/DeployManager.cs b/Bloxstrap/Helpers/DeployManager.cs
index 080c90fb..648e12b3 100644
--- a/Bloxstrap/Helpers/DeployManager.cs
+++ b/Bloxstrap/Helpers/DeployManager.cs
@@ -1,4 +1,5 @@
-using System.IO;
+using System.Globalization;
+using System.IO;
using System.Net.Http;
using Bloxstrap.Models;
@@ -11,8 +12,7 @@ public class DeployManager
public const string DefaultBaseUrl = "https://setup.rbxcdn.com";
public static string BaseUrl { get; private set; } = DefaultBaseUrl;
- public static readonly string DefaultChannel = "LIVE";
-
+ public const string DefaultChannel = "LIVE";
public static string Channel { set => BaseUrl = BuildBaseUrl(value); }
// basically any channel that has had a deploy within the past month with a windowsplayer build
@@ -124,13 +124,16 @@ public static async Task GetLastDeploy(string channel)
// (last time they did so was may 2021 so we should be fine?)
// example entry: 'New WindowsPlayer version-29fb7cdd06e84001 at 8/23/2022 2:07:27 PM, file version: 0, 542, 100, 5420251, git hash: b98d6b2bea36fa2161f48cca979fb620bb0c24fd ...'
+ // there's a proper way, and then there's the lazy way
+ // this here is the lazy way but it should just work™
+
lastDeploy = lastDeploy[18..]; // 'version-29fb7cdd06e84001 at 8/23/2022 2:07:27 PM, file version: 0, 542, 100, 5420251, git hash: b98d6b2bea36fa2161f48cca979fb620bb0c24fd ...'
string versionGuid = lastDeploy[..lastDeploy.IndexOf(" at")]; // 'version-29fb7cdd06e84001'
lastDeploy = lastDeploy[(versionGuid.Length + 4)..]; // '8/23/2022 2:07:27 PM, file version: 0, 542, 100, 5420251, git hash: b98d6b2bea36fa2161f48cca979fb620bb0c24fd ...'
- string date = lastDeploy[..lastDeploy.IndexOf(", file")]; // '8/23/2022 2:07:27 PM'
+ string strTimestamp = lastDeploy[..lastDeploy.IndexOf(", file")]; // '8/23/2022 2:07:27 PM'
- lastDeploy = lastDeploy[(date.Length + 16)..]; // '0, 542, 100, 5420251, git hash: b98d6b2bea36fa2161f48cca979fb620bb0c24fd ...'
+ lastDeploy = lastDeploy[(strTimestamp.Length + 16)..]; // '0, 542, 100, 5420251, git hash: b98d6b2bea36fa2161f48cca979fb620bb0c24fd ...'
string fileVersion = "";
if (lastDeploy.Contains("git hash"))
@@ -144,13 +147,17 @@ public static async Task GetLastDeploy(string channel)
fileVersion = lastDeploy[..lastDeploy.IndexOf("...")]; // '0, 448, 0, 411122'
}
+ // deployment timestamps are UTC-5
+ strTimestamp += " -05";
+ DateTime dtTimestamp = DateTime.ParseExact(strTimestamp, "M/d/yyyy h:mm:ss tt zz", Program.CultureFormat).ToLocalTime();
+
// convert to traditional version format
fileVersion = fileVersion.Replace(" ", "").Replace(',', '.');
return new VersionDeploy
{
VersionGuid = versionGuid,
- Date = date,
+ Timestamp = dtTimestamp,
FileVersion = fileVersion
};
}
diff --git a/Bloxstrap/Helpers/IconManager.cs b/Bloxstrap/Helpers/IconManager.cs
deleted file mode 100644
index 1cd38456..00000000
--- a/Bloxstrap/Helpers/IconManager.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-using Bloxstrap.Enums;
-
-namespace Bloxstrap.Helpers
-{
- internal class IconManager
- {
- public static Icon GetIconResource()
- {
- return GetIconResource(Program.Settings.BootstrapperIcon);
- }
-
- public static Icon GetIconResource(BootstrapperIcon icon)
- {
- switch (icon)
- {
- case BootstrapperIcon.Icon2009: return Properties.Resources.Icon2009_ico;
- case BootstrapperIcon.Icon2011: return Properties.Resources.Icon2011_ico;
- case BootstrapperIcon.IconEarly2015: return Properties.Resources.IconEarly2015_ico;
- case BootstrapperIcon.IconLate2015: return Properties.Resources.IconLate2015_ico;
- case BootstrapperIcon.Icon2017: return Properties.Resources.Icon2017_ico;
- case BootstrapperIcon.Icon2019: return Properties.Resources.Icon2019_ico;
- case BootstrapperIcon.Icon2022: return Properties.Resources.Icon2022_ico;
- case BootstrapperIcon.IconBloxstrap: default: return Properties.Resources.IconBloxstrap_ico;
- }
- }
-
- public static Bitmap GetBitmapResource()
- {
- return GetBitmapResource(Program.Settings.BootstrapperIcon);
- }
-
- public static Bitmap GetBitmapResource(BootstrapperIcon icon)
- {
- switch (icon)
- {
- case BootstrapperIcon.Icon2009: return Properties.Resources.Icon2009_png;
- case BootstrapperIcon.Icon2011: return Properties.Resources.Icon2011_png;
- case BootstrapperIcon.IconEarly2015: return Properties.Resources.IconEarly2015_png;
- case BootstrapperIcon.IconLate2015: return Properties.Resources.IconLate2015_png;
- case BootstrapperIcon.Icon2017: return Properties.Resources.Icon2017_png;
- case BootstrapperIcon.Icon2019: return Properties.Resources.Icon2019_png;
- case BootstrapperIcon.Icon2022: return Properties.Resources.Icon2022_png;
- case BootstrapperIcon.IconBloxstrap: default: return Properties.Resources.IconBloxstrap_png;
- }
- }
- }
-}
diff --git a/Bloxstrap/Helpers/Protocol.cs b/Bloxstrap/Helpers/Protocol.cs
index f7410485..b657c104 100644
--- a/Bloxstrap/Helpers/Protocol.cs
+++ b/Bloxstrap/Helpers/Protocol.cs
@@ -43,7 +43,7 @@ public static string ParseUri(string protocol)
if (key == "channel")
{
- if (val != Program.Settings.Channel)
+ if (val.ToLower() != Program.Settings.Channel.ToLower())
{
DialogResult result = Program.ShowMessageBox(
$"{Program.ProjectName} was launched with the Roblox build channel set to {val}, however your current preferred channel is {Program.Settings.Channel}.\n\n" +
@@ -56,8 +56,8 @@ public static string ParseUri(string protocol)
Program.Settings.Channel = val;
}
- if (val == DeployManager.DefaultChannel)
- continue;
+ // we'll set the arg when launching
+ continue;
}
commandLine.Append(UriKeyArgMap[key] + val + " ");
diff --git a/Bloxstrap/Models/VersionDeploy.cs b/Bloxstrap/Models/VersionDeploy.cs
index 0d7d9882..6e566c54 100644
--- a/Bloxstrap/Models/VersionDeploy.cs
+++ b/Bloxstrap/Models/VersionDeploy.cs
@@ -9,7 +9,7 @@ namespace Bloxstrap.Models
public class VersionDeploy
{
public string? VersionGuid { get; set; }
- public string? Date { get; set; }
+ public DateTime? Timestamp { get; set; }
public string? FileVersion { get; set; }
}
}
diff --git a/Bloxstrap/Program.cs b/Bloxstrap/Program.cs
index 2ed66fe1..d09277c5 100644
--- a/Bloxstrap/Program.cs
+++ b/Bloxstrap/Program.cs
@@ -1,8 +1,10 @@
using System.Diagnostics;
+using System.Globalization;
using System.IO;
using Microsoft.Win32;
+using Bloxstrap.Enums;
using Bloxstrap.Helpers;
using Bloxstrap.Models;
@@ -11,6 +13,7 @@ namespace Bloxstrap
internal static class Program
{
public const StringComparison StringFormat = StringComparison.InvariantCulture;
+ public static readonly CultureInfo CultureFormat = CultureInfo.InvariantCulture;
public const string ProjectName = "Bloxstrap";
public const string ProjectRepository = "pizzaboxer/bloxstrap";
@@ -126,7 +129,7 @@ static void Main(string[] args)
if (!String.IsNullOrEmpty(commandLine))
{
DeployManager.Channel = Settings.Channel;
- new Bootstrapper().Initialize(commandLine);
+ Settings.BootstrapperStyle.Show(new Bootstrapper(commandLine));
}
SettingsManager.Save();