mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-18 16:41:36 -07:00
fix RegisterProgramSize
This commit is contained in:
parent
0b25566a7d
commit
78d345fd8f
@ -45,6 +45,22 @@ namespace Bloxstrap
|
||||
}
|
||||
}
|
||||
|
||||
private long _distributionSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return _studioLaunch ? App.State.Prop.StudioSize : App.State.Prop.PlayerSize;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (_studioLaunch)
|
||||
App.State.Prop.StudioSize = value;
|
||||
else
|
||||
App.State.Prop.PlayerSize = value;
|
||||
}
|
||||
}
|
||||
|
||||
private string _latestVersionGuid = null!;
|
||||
private PackageManifest _versionPackageManifest = null!;
|
||||
private FileManifest _versionFileManifest = null!;
|
||||
@ -495,7 +511,10 @@ namespace Bloxstrap
|
||||
using RegistryKey uninstallKey = Registry.CurrentUser.CreateSubKey($"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{App.ProjectName}");
|
||||
|
||||
// sum compressed and uncompressed package sizes and convert to kilobytes
|
||||
int totalSize = (_versionPackageManifest.Sum(x => x.Size) + _versionPackageManifest.Sum(x => x.PackedSize)) / 1000;
|
||||
long distributionSize = (_versionPackageManifest.Sum(x => x.Size) + _versionPackageManifest.Sum(x => x.PackedSize)) / 1000;
|
||||
_distributionSize = distributionSize;
|
||||
|
||||
long totalSize = App.State.Prop.PlayerSize + App.State.Prop.StudioSize;
|
||||
|
||||
uninstallKey.SetValue("EstimatedSize", totalSize);
|
||||
|
||||
|
@ -3,10 +3,15 @@
|
||||
public class State
|
||||
{
|
||||
public string LastEnrolledChannel { get; set; } = "";
|
||||
[Obsolete("Use PlayerVersionGuid", true)]
|
||||
|
||||
[Obsolete("Use PlayerVersionGuid instead", true)]
|
||||
public string VersionGuid { set { PlayerVersionGuid = value; } }
|
||||
public string PlayerVersionGuid { get; set; } = "";
|
||||
public string StudioVersionGuid { get; set; } = "";
|
||||
|
||||
public long PlayerSize { get; set; } = 0;
|
||||
public long StudioSize { get; set; } = 0;
|
||||
|
||||
public List<string> ModManifest { get; set; } = new();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user