Skip to content

Commit da3af0d

Browse files
committed
feat(bootstrapper): set studio registry key upon non-default channel
fixes #649
1 parent c424d57 commit da3af0d

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

cmd/vinegar/bootstrapper_setup_rblx.go

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ import (
1818
"golang.org/x/sync/errgroup"
1919
)
2020

21-
var studio = rbxweb.BinaryTypeWindowsStudio64
21+
var (
22+
studio = rbxweb.BinaryTypeWindowsStudio64
23+
channelKey = `HKCU\Software\ROBLOX Corporation\Environments\RobloxStudio\Channel`
24+
)
2225

2326
func (b *bootstrapper) setupDeployment() error {
2427
if err := b.setDeployment(); err != nil {
@@ -45,11 +48,21 @@ func (b *bootstrapper) setupDeployment() error {
4548
return err
4649
}
4750

51+
defer b.performing()()
52+
4853
b.message("Writing AppSettings")
4954
if err := rbxbin.WriteAppSettings(b.dir); err != nil {
5055
return fmt.Errorf("appsettings: %w", err)
5156
}
5257

58+
// Default channel is none, but UserChannel will set LIVE.
59+
if b.bin.Channel != "" && b.bin.Channel != "LIVE" {
60+
b.message("Writing Registry")
61+
if err := b.pfx.RegistryAdd(channelKey, "www.roblox.com", b.bin.Channel); err != nil {
62+
return fmt.Errorf("set channel reg: %w")
63+
}
64+
}
65+
5366
slog.Info("Successfully installed!", "guid", b.bin.GUID)
5467

5568
return nil

0 commit comments

Comments
 (0)