Skip to content

Commit

Permalink
change player & studio sizes to int
Browse files Browse the repository at this point in the history
  • Loading branch information
bluepilledgreat committed Oct 4, 2023
1 parent 6dafc22 commit 8f6f687
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Bloxstrap/Bootstrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public async Task Run()
if (App.IsFirstRun || FreshInstall)
{
Register();
RegisterProgramSize(); // STUDIO TODO
RegisterProgramSize();
}

CheckInstall();
Expand Down Expand Up @@ -511,10 +511,10 @@ public void RegisterProgramSize()
using RegistryKey uninstallKey = Registry.CurrentUser.CreateSubKey($"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{App.ProjectName}");

// sum compressed and uncompressed package sizes and convert to kilobytes
long distributionSize = (_versionPackageManifest.Sum(x => x.Size) + _versionPackageManifest.Sum(x => x.PackedSize)) / 1000;
int distributionSize = (_versionPackageManifest.Sum(x => x.Size) + _versionPackageManifest.Sum(x => x.PackedSize)) / 1000;
_distributionSize = distributionSize;

long totalSize = App.State.Prop.PlayerSize + App.State.Prop.StudioSize;
int totalSize = App.State.Prop.PlayerSize + App.State.Prop.StudioSize;

uninstallKey.SetValue("EstimatedSize", totalSize);

Expand Down
4 changes: 2 additions & 2 deletions Bloxstrap/Models/State.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ public class State
public string PlayerVersionGuid { get; set; } = "";
public string StudioVersionGuid { get; set; } = "";

public long PlayerSize { get; set; } = 0;
public long StudioSize { get; set; } = 0;
public int PlayerSize { get; set; } = 0;
public int StudioSize { get; set; } = 0;

public List<string> ModManifest { get; set; } = new();
}
Expand Down

0 comments on commit 8f6f687

Please sign in to comment.