-
Notifications
You must be signed in to change notification settings - Fork 346
/
PackageMap.cs
88 lines (75 loc) · 3.88 KB
/
PackageMap.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Bloxstrap
{
internal class PackageMap
{
public static IReadOnlyDictionary<string, string> Player
{
get { return CombineDictionaries(_common, _playerOnly); }
}
public static IReadOnlyDictionary<string, string> Studio
{
get { return CombineDictionaries(_common, _studioOnly); }
}
// in case a new package is added, you can find the corresponding directory
// by opening the stock bootstrapper in a hex editor
// TODO - there ideally should be a less static way to do this that's not hardcoded?
private static IReadOnlyDictionary<string, string> _common = new Dictionary<string, string>()
{
{ "Libraries.zip", @"" },
{ "shaders.zip", @"shaders\" },
{ "ssl.zip", @"ssl\" },
// the runtime installer is only extracted if it needs installing
{ "WebView2.zip", @"" },
{ "WebView2RuntimeInstaller.zip", @"WebView2RuntimeInstaller\" },
{ "content-avatar.zip", @"content\avatar\" },
{ "content-configs.zip", @"content\configs\" },
{ "content-fonts.zip", @"content\fonts\" },
{ "content-sky.zip", @"content\sky\" },
{ "content-sounds.zip", @"content\sounds\" },
{ "content-textures2.zip", @"content\textures\" },
{ "content-models.zip", @"content\models\" },
{ "content-textures3.zip", @"PlatformContent\pc\textures\" },
{ "content-terrain.zip", @"PlatformContent\pc\terrain\" },
{ "content-platform-fonts.zip", @"PlatformContent\pc\fonts\" },
{ "extracontent-luapackages.zip", @"ExtraContent\LuaPackages\" },
{ "extracontent-translations.zip", @"ExtraContent\translations\" },
{ "extracontent-models.zip", @"ExtraContent\models\" },
{ "extracontent-textures.zip", @"ExtraContent\textures\" },
{ "extracontent-places.zip", @"ExtraContent\places\" },
};
private static IReadOnlyDictionary<string, string> _playerOnly = new Dictionary<string, string>()
{
{ "RobloxApp.zip", @"" }
};
private static IReadOnlyDictionary<string, string> _studioOnly = new Dictionary<string, string>()
{
{ "RobloxStudio.zip", @"" },
{ "ApplicationConfig.zip", @"ApplicationConfig\" },
{ "content-studio_svg_textures.zip", @"content\studio_svg_textures\"},
{ "content-qt_translations.zip", @"content\qt_translations\" },
{ "content-api-docs.zip", @"content\api_docs\" },
{ "extracontent-scripts.zip", @"ExtraContent\scripts\" },
{ "BuiltInPlugins.zip", @"BuiltInPlugins\" },
{ "BuiltInStandalonePlugins.zip", @"BuiltInStandalonePlugins\" },
{ "LibrariesQt5.zip", @"" },
{ "Plugins.zip", @"Plugins\" },
{ "Qml.zip", @"Qml\" },
{ "StudioFonts.zip", @"StudioFonts\" },
{ "redist.zip", @"" },
};
private static Dictionary<string, string> CombineDictionaries(IReadOnlyDictionary<string, string> d1, IReadOnlyDictionary<string, string> d2)
{
Dictionary<string, string> newD = new Dictionary<string, string>();
foreach (var d in d1)
newD[d.Key] = d.Value;
foreach (var d in d2)
newD[d.Key] = d.Value;
return newD;
}
}
}