mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Default to LIVE if no launch channel set
also fixed a bug with the font mod
This commit is contained in:
parent
63ef907246
commit
78869e5e7e
@ -1069,7 +1069,7 @@ namespace Bloxstrap
|
|||||||
|
|
||||||
App.Logger.WriteLine("[Bootstrapper::ApplyModifications] End font check");
|
App.Logger.WriteLine("[Bootstrapper::ApplyModifications] End font check");
|
||||||
}
|
}
|
||||||
else
|
else if (Directory.Exists(modFontFamiliesFolder))
|
||||||
{
|
{
|
||||||
Directory.Delete(modFontFamiliesFolder, true);
|
Directory.Delete(modFontFamiliesFolder, true);
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,8 @@ namespace Bloxstrap
|
|||||||
string[] keyvalPair;
|
string[] keyvalPair;
|
||||||
string key;
|
string key;
|
||||||
string val;
|
string val;
|
||||||
|
bool channelArgPresent = false;
|
||||||
|
|
||||||
StringBuilder commandLine = new();
|
StringBuilder commandLine = new();
|
||||||
|
|
||||||
foreach (var parameter in protocol.Split('+'))
|
foreach (var parameter in protocol.Split('+'))
|
||||||
@ -56,25 +58,10 @@ namespace Bloxstrap
|
|||||||
if (key == "launchtime")
|
if (key == "launchtime")
|
||||||
val = "LAUNCHTIMEPLACEHOLDER";
|
val = "LAUNCHTIMEPLACEHOLDER";
|
||||||
|
|
||||||
if (key == "channel")
|
if (key == "channel" && !String.IsNullOrEmpty(val))
|
||||||
{
|
{
|
||||||
if (val.ToLowerInvariant() != App.Settings.Prop.Channel.ToLowerInvariant() && App.Settings.Prop.ChannelChangeMode != ChannelChangeMode.Ignore)
|
channelArgPresent = true;
|
||||||
{
|
ChangeChannel(val);
|
||||||
MessageBoxResult result = App.Settings.Prop.ChannelChangeMode == ChannelChangeMode.Automatic
|
|
||||||
? MessageBoxResult.Yes
|
|
||||||
: Controls.ShowMessageBox(
|
|
||||||
$"Roblox is attempting to set your channel to {val}, however your current preferred channel is {App.Settings.Prop.Channel}.\n\n" +
|
|
||||||
$"Would you like to switch channels from {App.Settings.Prop.Channel} to {val}?",
|
|
||||||
MessageBoxImage.Question,
|
|
||||||
MessageBoxButton.YesNo
|
|
||||||
);
|
|
||||||
|
|
||||||
if (result == MessageBoxResult.Yes)
|
|
||||||
{
|
|
||||||
App.Logger.WriteLine($"[Protocol::ParseUri] Changed Roblox build channel from {App.Settings.Prop.Channel} to {val}");
|
|
||||||
App.Settings.Prop.Channel = val;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// we'll set the arg when launching
|
// we'll set the arg when launching
|
||||||
continue;
|
continue;
|
||||||
@ -83,9 +70,37 @@ namespace Bloxstrap
|
|||||||
commandLine.Append(UriKeyArgMap[key] + val + " ");
|
commandLine.Append(UriKeyArgMap[key] + val + " ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!channelArgPresent)
|
||||||
|
ChangeChannel(RobloxDeployment.DefaultChannel);
|
||||||
|
|
||||||
return commandLine.ToString();
|
return commandLine.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void ChangeChannel(string channel)
|
||||||
|
{
|
||||||
|
if (channel.ToLowerInvariant() == App.Settings.Prop.Channel.ToLowerInvariant())
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (App.Settings.Prop.ChannelChangeMode == ChannelChangeMode.Ignore)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (App.Settings.Prop.ChannelChangeMode != ChannelChangeMode.Automatic)
|
||||||
|
{
|
||||||
|
MessageBoxResult result = Controls.ShowMessageBox(
|
||||||
|
$"Roblox is attempting to set your channel to {channel}, however your current preferred channel is {App.Settings.Prop.Channel}.\n\n" +
|
||||||
|
$"Would you like to switch channels from {App.Settings.Prop.Channel} to {channel}?",
|
||||||
|
MessageBoxImage.Question,
|
||||||
|
MessageBoxButton.YesNo
|
||||||
|
);
|
||||||
|
|
||||||
|
if (result != MessageBoxResult.Yes)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
App.Logger.WriteLine($"[Protocol::ParseUri] Changed Roblox build channel from {App.Settings.Prop.Channel} to {channel}");
|
||||||
|
App.Settings.Prop.Channel = channel;
|
||||||
|
}
|
||||||
|
|
||||||
public static void Register(string key, string name, string handler)
|
public static void Register(string key, string name, string handler)
|
||||||
{
|
{
|
||||||
string handlerArgs = $"\"{handler}\" %1";
|
string handlerArgs = $"\"{handler}\" %1";
|
||||||
|
@ -39,8 +39,8 @@
|
|||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<StackPanel Grid.Column="0">
|
<StackPanel Grid.Column="0">
|
||||||
<TextBlock FontSize="14" Text="Deployment channel" />
|
<TextBlock FontSize="14" Text="Channel" />
|
||||||
<TextBlock Margin="0,2,0,0" FontSize="12" Text="Choose which release channel Roblox should be downloaded from." Foreground="{DynamicResource TextFillColorTertiaryBrush}" />
|
<TextBlock Margin="0,2,0,0" FontSize="12" Text="Choose which deployment channel Roblox should be downloaded from." Foreground="{DynamicResource TextFillColorTertiaryBrush}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<ComboBox Grid.Column="1" Margin="8,0,8,0" Padding="10,5,10,5" Width="200" IsEditable="True" ItemsSource="{Binding Channels, Mode=OneWay}" Text="{Binding SelectedChannel, Mode=TwoWay, UpdateSourceTrigger=LostFocus}" KeyUp="ComboBox_KeyEnterUpdate" />
|
<ComboBox Grid.Column="1" Margin="8,0,8,0" Padding="10,5,10,5" Width="200" IsEditable="True" ItemsSource="{Binding Channels, Mode=OneWay}" Text="{Binding SelectedChannel, Mode=TwoWay, UpdateSourceTrigger=LostFocus}" KeyUp="ComboBox_KeyEnterUpdate" />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
Loading…
Reference in New Issue
Block a user