bootstrapper

package
v1.7.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2024 License: GPL-3.0 Imports: 15 Imported by: 1

Documentation

Overview

Package bootstrapper implements various routines and types to install or bootstrap a Roblox Binary.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoMirrorFound = errors.New("no accessible deploy mirror found")

	// As of 2024-02-03:
	//   setup-cfly.rbxcdn.com = roblox-setup.cachefly.net
	//   setup.rbxcdn.com = setup-ns1.rbxcdn.com = setup-ak.rbxcdn.com
	//   setup-hw.rbxcdn.com = setup-ll.rbxcdn.com = does not exist
	Mirrors = []string{

		"https://setup.rbxcdn.com",
		"https://setup-cfly.rbxcdn.com",
		"https://s3.amazonaws.com/setup.roblox.com",
	}
)
View Source
var (
	ErrInvalidPkgManifest      = errors.New("invalid package manifest given")
	ErrUnhandledPkgManifestVer = errors.New("unhandled package manifest version")
)
View Source
var PlayerDirectories = PackageDirectories{
	"RobloxApp.zip":                 "",
	"shaders.zip":                   "shaders/",
	"ssl.zip":                       "ssl/",
	"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",
}

PlayerDirectories is retrieved from Bloxstrap.

View Source
var StudioDirectories = PackageDirectories{
	"BuiltInPlugins.zip":              "BuiltInPlugins",
	"ApplicationConfig.zip":           "ApplicationConfig",
	"BuiltInStandalonePlugins.zip":    "BuiltInStandalonePlugins",
	"content-qt_translations.zip":     "content/qt_translations",
	"content-platform-fonts.zip":      "PlatformContent/pc/fonts",
	"content-terrain.zip":             "PlatformContent/pc/terrain",
	"content-textures3.zip":           "PlatformContent/pc/textures",
	"extracontent-translations.zip":   "ExtraContent/translations",
	"extracontent-luapackages.zip":    "ExtraContent/LuaPackages",
	"extracontent-textures.zip":       "ExtraContent/textures",
	"extracontent-scripts.zip":        "ExtraContent/scripts",
	"extracontent-models.zip":         "ExtraContent/models",
	"content-sky.zip":                 "content/sky",
	"content-fonts.zip":               "content/fonts",
	"content-avatar.zip":              "content/avatar",
	"content-models.zip":              "content/models",
	"content-sounds.zip":              "content/sounds",
	"content-configs.zip":             "content/configs",
	"content-api-docs.zip":            "content/api_docs",
	"content-textures2.zip":           "content/textures",
	"content-studio_svg_textures.zip": "content/studio_svg_textures",
	"Qml.zip":                         "Qml",
	"ssl.zip":                         "ssl",
	"Plugins.zip":                     "Plugins",
	"shaders.zip":                     "shaders",
	"StudioFonts.zip":                 "StudioFonts",
	"redist.zip":                      "",
	"WebView2.zip":                    "",
	"Libraries.zip":                   "",
	"LibrariesQt5.zip":                "",
	"RobloxStudio.zip":                "",
	"WebView2RuntimeInstaller.zip":    "",
}

StudioDirectories is retrieved from Roblox-Studio-Mod-Manager.

Functions

func Mirror added in v1.7.0

func Mirror() (string, error)

Mirror returns an available mirror URL from Mirrors.

func WriteAppSettings

func WriteAppSettings(dir string) error

WriteAppSettings writes the AppSettings.xml file - required to run Roblox - to a binary's deployment directory.

Types

type Deployment added in v1.6.0

type Deployment struct {
	Type    roblox.BinaryType
	Channel string
	GUID    string
}

Version is a representation of a Binary's deployment or version.

Channel can either be a given channel, or empty - in which Roblox will consider the 'default' channel.

In all things related to the Roblox API, the default channel is empty, or 'live'/'LIVE' on clientsettings. On the Client/Studio, the default channel is (or can be) 'production'. This behavior is undocumented, so it's best to just use an empty channel i guess.

func FetchDeployment added in v1.6.0

func FetchDeployment(bt roblox.BinaryType, channel string) (Deployment, error)

FetchDeployment returns the latest Version for the given roblox Binary type with the given deployment channel through api.GetClientVersion.

func NewDeployment added in v1.6.0

func NewDeployment(bt roblox.BinaryType, channel string, GUID string) Deployment

NewDeployment returns a new Deployment.

type Package

type Package struct {
	Name     string
	Checksum string
	Size     int64
	ZipSize  int64
}

Package is a representation of a Binary package.

func (*Package) Download added in v1.4.2

func (p *Package) Download(dest, deployURL string) error

Download will download the package to the named dest destination directory with the given deployURL deploy mirror; if the package exists and has the correct checksum, it will return immediately.

func (*Package) Extract added in v1.4.3

func (p *Package) Extract(src, dest string) error

Extract extracts the named package source file to a given destination directory

func (*Package) Verify added in v1.4.3

func (p *Package) Verify(src string) error

Verify checks the named package source file against it's checksum

type PackageDirectories

type PackageDirectories map[string]string

PackageDirectories is a map of where Binary packages should go.

func BinaryDirectories added in v1.5.0

func BinaryDirectories(t roblox.BinaryType) PackageDirectories

BinaryDirectories retrieves the PackageDirectories for the given roblox.BinaryType.

type PackageManifest added in v1.5.8

type PackageManifest struct {
	*Deployment
	DeployURL string
	Packages
}

PackageManifest is a representation of a Binary version's packages DeployURL is required, as it is where the package manifest is fetched from.

func FetchPackageManifest added in v1.5.8

func FetchPackageManifest(d *Deployment) (PackageManifest, error)

FetchPackageManifest retrieves a package manifest for the given binary deployment.

type Packages

type Packages []Package

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL