mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-18 16:41:36 -07:00
Roblox now installs to /Roblox/Player/ instead of /Versions/<version guid> This is a checkpoint commit. No mod manager, no error checking, no fullscreen optimizations configuration. Only installing and launching Roblox. THIS WORKED FIRST TRY BY THE WAY
51 lines
1.5 KiB
C#
51 lines
1.5 KiB
C#
/*
|
|
* Roblox Studio Mod Manager (ProjectSrc/Utility/PackageManifest.cs)
|
|
* MIT License
|
|
* Copyright (c) 2015-present MaximumADHD
|
|
*/
|
|
|
|
namespace Bloxstrap.Models.Manifest
|
|
{
|
|
public class PackageManifest : List<Package>
|
|
{
|
|
public PackageManifest(string data)
|
|
{
|
|
using var reader = new StringReader(data);
|
|
string? version = reader.ReadLine();
|
|
|
|
if (version != "v0")
|
|
throw new NotSupportedException($"Unexpected package manifest version: {version} (expected v0!)");
|
|
|
|
while (true)
|
|
{
|
|
string? fileName = reader.ReadLine();
|
|
string? signature = reader.ReadLine();
|
|
|
|
string? rawPackedSize = reader.ReadLine();
|
|
string? rawSize = reader.ReadLine();
|
|
|
|
if (string.IsNullOrEmpty(fileName) ||
|
|
string.IsNullOrEmpty(signature) ||
|
|
string.IsNullOrEmpty(rawPackedSize) ||
|
|
string.IsNullOrEmpty(rawSize))
|
|
break;
|
|
|
|
// ignore launcher
|
|
if (fileName == "RobloxPlayerLauncher.exe")
|
|
break;
|
|
|
|
int packedSize = int.Parse(rawPackedSize);
|
|
int size = int.Parse(rawSize);
|
|
|
|
Add(new Package
|
|
{
|
|
Name = fileName,
|
|
Signature = signature,
|
|
PackedSize = packedSize,
|
|
Size = size
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|