diff --git a/Bloxstrap/Bootstrapper.cs b/Bloxstrap/Bootstrapper.cs
index 096df02..2f99fdb 100644
--- a/Bloxstrap/Bootstrapper.cs
+++ b/Bloxstrap/Bootstrapper.cs
@@ -118,7 +118,10 @@ namespace Bloxstrap
await RbxFpsUnlocker.CheckInstall();
- await StartRoblox();
+ if (Program.IsFirstRun)
+ Dialog.ShowSuccess($"{Program.ProjectName} has been installed");
+ else
+ await StartRoblox();
Program.Exit();
}
@@ -293,6 +296,8 @@ namespace Bloxstrap
uninstallKey.SetValue("Publisher", Program.ProjectName);
uninstallKey.SetValue("ModifyPath", $"\"{Directories.App}\" -preferences");
uninstallKey.SetValue("UninstallString", $"\"{Directories.App}\" -uninstall");
+ uninstallKey.SetValue("URLInfoAbout", $"https://github.com/{Program.ProjectRepository}");
+ uninstallKey.SetValue("URLUpdateInfo", $"https://github.com/{Program.ProjectRepository}/releases/latest");
uninstallKey.Close();
}
diff --git a/Bloxstrap/Dialogs/Preferences.xaml b/Bloxstrap/Dialogs/Preferences.xaml
index bfd73f2..2b6b4bf 100644
--- a/Bloxstrap/Dialogs/Preferences.xaml
+++ b/Bloxstrap/Dialogs/Preferences.xaml
@@ -48,7 +48,7 @@
-
+
@@ -68,7 +68,7 @@
-
+
@@ -81,6 +81,7 @@
+
diff --git a/Bloxstrap/Dialogs/Preferences.xaml.cs b/Bloxstrap/Dialogs/Preferences.xaml.cs
index 7ac3c54..3758696 100644
--- a/Bloxstrap/Dialogs/Preferences.xaml.cs
+++ b/Bloxstrap/Dialogs/Preferences.xaml.cs
@@ -200,7 +200,7 @@ namespace Bloxstrap.Dialogs
}
public bool ModFolderButtonEnabled { get; } = !Program.IsFirstRun;
- public string ModFolderButtonText { get; } = Program.IsFirstRun ? "Install Bloxstrap first to add custom mods" : "Open mod folder";
+ public string ModFolderButtonText { get; } = Program.IsFirstRun ? "Custom mods can be added after installing Bloxstrap" : "Open mod folder";
#endregion
#region Installation
@@ -267,6 +267,12 @@ namespace Bloxstrap.Dialogs
OnPropertyChanged();
}
}
+
+ public bool CheckForUpdates
+ {
+ get => Program.Settings.CheckForUpdates;
+ set => Program.Settings.CheckForUpdates = value;
+ }
#endregion
#region Style
diff --git a/Bloxstrap/Helpers/Integrations/RbxFpsUnlocker.cs b/Bloxstrap/Helpers/Integrations/RbxFpsUnlocker.cs
index f9e0f91..ac2ded9 100644
--- a/Bloxstrap/Helpers/Integrations/RbxFpsUnlocker.cs
+++ b/Bloxstrap/Helpers/Integrations/RbxFpsUnlocker.cs
@@ -30,7 +30,7 @@ namespace Bloxstrap.Helpers.Integrations
if (Program.BaseDirectory is null)
return;
- string folderLocation = Path.Combine(Program.BaseDirectory, "Integrations", "rbxfpsunlocker");
+ string folderLocation = Path.Combine(Program.BaseDirectory, "Integrations\\rbxfpsunlocker");
string fileLocation = Path.Combine(folderLocation, "rbxfpsunlocker.exe");
string settingsLocation = Path.Combine(folderLocation, "settings");
@@ -47,11 +47,11 @@ namespace Bloxstrap.Helpers.Integrations
var releaseInfo = await Utilities.GetJson($"https://api.github.com/repos/{ProjectRepository}/releases/latest");
- if (releaseInfo is null || releaseInfo.CreatedAt is null || releaseInfo.Assets is null)
+ if (releaseInfo is null || releaseInfo.Assets is null)
return;
lastReleasePublish = DateTime.Parse(releaseInfo.CreatedAt);
- downloadUrl = releaseInfo.Assets![0].BrowserDownloadUrl!;
+ downloadUrl = releaseInfo.Assets[0].BrowserDownloadUrl;
Directory.CreateDirectory(folderLocation);
diff --git a/Bloxstrap/Helpers/Updater.cs b/Bloxstrap/Helpers/Updater.cs
index 05bb55a..500cf04 100644
--- a/Bloxstrap/Helpers/Updater.cs
+++ b/Bloxstrap/Helpers/Updater.cs
@@ -11,10 +11,10 @@ namespace Bloxstrap.Helpers
{
public class Updater
{
- public static bool CheckInstalledVersion()
+ public static void CheckInstalledVersion()
{
if (Environment.ProcessPath is null || !File.Exists(Directories.App) || Environment.ProcessPath == Directories.App)
- return false;
+ return;
// if downloaded version doesn't match, replace installed version with downloaded version
FileVersionInfo currentVersionInfo = FileVersionInfo.GetVersionInfo(Environment.ProcessPath);
@@ -23,7 +23,7 @@ namespace Bloxstrap.Helpers
if (installedVersionInfo.ProductVersion != currentVersionInfo.ProductVersion)
{
DialogResult result = Program.ShowMessageBox(
- $"The version of {Program.ProjectName} you've launched is newer than the version you currently have installed.\nWould you like to update your currently installed version?",
+ $"The version of {Program.ProjectName} you've launched is different to the version you currently have installed.\nWould you like to update your currently installed version?",
MessageBoxIcon.Question,
MessageBoxButtons.YesNo
);
@@ -32,11 +32,18 @@ namespace Bloxstrap.Helpers
{
File.Delete(Directories.App);
File.Copy(Environment.ProcessPath, Directories.App);
- return true;
+
+ Program.ShowMessageBox(
+ $"{Program.ProjectName} has been updated to v{currentVersionInfo.ProductVersion}",
+ MessageBoxIcon.Information,
+ MessageBoxButtons.OK
+ );
+
+ Environment.Exit(0);
}
}
- return false;
+ return;
}
public static async Task Check()
@@ -44,8 +51,8 @@ namespace Bloxstrap.Helpers
if (Environment.ProcessPath is null)
return;
- if (!Program.IsFirstRun && CheckInstalledVersion())
- return;
+ if (!Program.IsFirstRun)
+ CheckInstalledVersion();
if (!Program.Settings.CheckForUpdates)
return;
diff --git a/Bloxstrap/Models/GithubRelease.cs b/Bloxstrap/Models/GithubRelease.cs
index 475e168..45f9d32 100644
--- a/Bloxstrap/Models/GithubRelease.cs
+++ b/Bloxstrap/Models/GithubRelease.cs
@@ -5,14 +5,14 @@ namespace Bloxstrap.Models
public class GithubRelease
{
[JsonPropertyName("name")]
- public string? Name { get; set; }
+ public string Name { get; set; } = null!;
[JsonPropertyName("body")]
- public string? Body { get; set; }
-
+ public string Body { get; set; } = null!;
+
[JsonPropertyName("created_at")]
- public string? CreatedAt { get; set; }
-
+ public string CreatedAt { get; set; } = null!;
+
[JsonPropertyName("assets")]
public List? Assets { get; set; }
}
@@ -20,6 +20,9 @@ namespace Bloxstrap.Models
public class GithubReleaseAsset
{
[JsonPropertyName("browser_download_url")]
- public string? BrowserDownloadUrl { get; set; }
+ public string BrowserDownloadUrl { get; set; } = null!;
+
+ [JsonPropertyName("name")]
+ public string Name { get; set; } = null!;
}
}
diff --git a/Bloxstrap/Program.cs b/Bloxstrap/Program.cs
index 7b8db01..79ed291 100644
--- a/Bloxstrap/Program.cs
+++ b/Bloxstrap/Program.cs
@@ -111,7 +111,7 @@ namespace Bloxstrap
return;
}
- new PreferencesWPF().ShowDialog();
+ new Preferences().ShowDialog();
}
else if (args[0].StartsWith("roblox-player:"))
{