Skip to content

Commit

Permalink
whoops shouldnt have hardcoded that
Browse files Browse the repository at this point in the history
  • Loading branch information
pizzaboxer committed Jul 29, 2023
1 parent 266cce7 commit ba45bf4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Bloxstrap/Updater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public static void CheckInstalledVersion()
// 2.0.0 downloads updates to <BaseFolder>/Updates so lol
bool isAutoUpgrade = Paths.Process.StartsWith(Path.Combine(Paths.Base, "Updates")) || Paths.Process.StartsWith(Path.Combine(Paths.LocalAppData, "Temp"));

FileVersionInfo existingVersionInfo = FileVersionInfo.GetVersionInfo(Paths.Application);
FileVersionInfo currentVersionInfo = FileVersionInfo.GetVersionInfo(Paths.Process);

if (MD5Hash.FromFile(Paths.Process) == MD5Hash.FromFile(Paths.Application))
Expand Down Expand Up @@ -71,7 +72,7 @@ public static void CheckInstalledVersion()

// update migrations

if (App.BuildMetadata.CommitRef.StartsWith("tag") && App.Version == "2.4.1")
if (App.BuildMetadata.CommitRef.StartsWith("tag") && existingVersionInfo.ProductVersion == "2.4.0")
{
App.FastFlags.SetValue("DFFlagDisableDPIScale", null);
App.FastFlags.SetValue("DFFlagVariableDPIScale2", null);
Expand All @@ -90,7 +91,7 @@ public static void CheckInstalledVersion()
else if (!App.IsQuiet)
{
Controls.ShowMessageBox(
$"{App.ProjectName} has been updated to v{currentVersionInfo.ProductVersion}",
$"{App.ProjectName} has been upgraded to v{currentVersionInfo.ProductVersion}",
MessageBoxImage.Information,
MessageBoxButton.OK
);
Expand Down

0 comments on commit ba45bf4

Please sign in to comment.