Skip to content

Commit

Permalink
Merge branch 'bloxstraplabs:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Roblox-Thot authored Oct 9, 2024
2 parents 668e686 + 8966bab commit c687f41
Show file tree
Hide file tree
Showing 31 changed files with 103 additions and 65 deletions.
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ body:
- type: markdown
attributes:
value: |
> [!IMPORTANT]
> Do not open an issue if you're getting a "Deserialised application settings is null!" error. This issue is caused by a server error on Roblox's end.
> Wait for the problem to be resolved, and do not report an issue for it.
### **Preliminary instructions**
- Before opening an issue, please [check the Wiki first](https://github.com/pizzaboxer/bloxstrap/wiki/) to see if your problem has been addressed there.
- If it isn't, please confirm which pages that you read that were relevant to your issue.
Expand Down
12 changes: 8 additions & 4 deletions Bloxstrap/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ namespace Bloxstrap
/// </summary>
public partial class App : Application
{
#if QA_BUILD
public const string ProjectName = "Bloxstrap-QA";
#else
public const string ProjectName = "Bloxstrap";
public const string ProjectOwner = "pizzaboxer";
public const string ProjectRepository = "pizzaboxer/bloxstrap";
#endif
public const string ProjectOwner = "Bloxstrap";
public const string ProjectRepository = "bloxstraplabs/bloxstrap";
public const string ProjectDownloadLink = "https://bloxstraplabs.com";
public const string ProjectHelpLink = "https://github.com/pizzaboxer/bloxstrap/wiki";
public const string ProjectSupportLink = "https://github.com/pizzaboxer/bloxstrap/issues/new";
public const string ProjectHelpLink = "https://github.com/bloxstraplabs/bloxstrap/wiki";
public const string ProjectSupportLink = "https://github.com/bloxstraplabs/bloxstrap/issues/new";

public const string RobloxPlayerAppName = "RobloxPlayerBeta";
public const string RobloxStudioAppName = "RobloxStudioBeta";
Expand Down
2 changes: 1 addition & 1 deletion Bloxstrap/Bloxstrap.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
<PackageReference Include="DiscordRichPresence" Version="1.2.1.24" />
<PackageReference Include="Markdig" Version="0.37.0" />
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.18-beta">
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.106">
<!--<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>-->
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
7 changes: 2 additions & 5 deletions Bloxstrap/Bootstrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public async Task Run()
if (connectionResult is not null)
HandleConnectionError(connectionResult);

#if !DEBUG || DEBUG_UPDATER
#if (!DEBUG || DEBUG_UPDATER) && !QA_BUILD
if (App.Settings.Prop.CheckForUpdates && !App.LaunchSettings.UpgradeFlag.Active)
{
bool updatePresent = await CheckForUpdates();
Expand Down Expand Up @@ -604,9 +604,6 @@ private async Task UpgradeRoblox()
{
App.Logger.WriteLine(LOG_IDENT, "Could not delete executable/folder, Roblox may still be running. Aborting update.");
App.Logger.WriteException(LOG_IDENT, ex);

Directory.Delete(AppData.Directory);

return;
}

Expand Down Expand Up @@ -1076,7 +1073,7 @@ private async Task DownloadPackage(Package package)

Frontend.ShowConnectivityDialog(
Strings.Dialog_Connectivity_UnableToDownload,
String.Format(Strings.Dialog_Connectivity_UnableToDownloadReason, "[https://github.com/pizzaboxer/bloxstrap/wiki/Bloxstrap-is-unable-to-download-Roblox](https://github.com/pizzaboxer/bloxstrap/wiki/Bloxstrap-is-unable-to-download-Roblox)"),
String.Format(Strings.Dialog_Connectivity_UnableToDownloadReason, "[https://github.com/bloxstraplabs/bloxstrap/wiki/Bloxstrap-is-unable-to-download-Roblox](https://github.com/bloxstraplabs/bloxstrap/wiki/Bloxstrap-is-unable-to-download-Roblox)"),
MessageBoxImage.Error,
ex
);
Expand Down
9 changes: 4 additions & 5 deletions Bloxstrap/Installer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ namespace Bloxstrap
{
internal class Installer
{
private static string DesktopShortcut => Path.Combine(Paths.Desktop, "Bloxstrap.lnk");
private static string DesktopShortcut => Path.Combine(Paths.Desktop, $"{App.ProjectName}.lnk");

private static string StartMenuShortcut => Path.Combine(Paths.WindowsStartMenu, "Bloxstrap.lnk");
private static string StartMenuShortcut => Path.Combine(Paths.WindowsStartMenu, $"{App.ProjectName}.lnk");

public string InstallLocation = Path.Combine(Paths.LocalAppData, "Bloxstrap");
public string InstallLocation = Path.Combine(Paths.LocalAppData, App.ProjectName);

public bool ExistingDataPresent => File.Exists(Path.Combine(InstallLocation, "Settings.json"));

Expand Down Expand Up @@ -52,7 +52,6 @@ public void DoInstall()
}
}

// TODO: registry access checks, i'll need to look back on issues to see what the error looks like
using (var uninstallKey = Registry.CurrentUser.CreateSubKey(App.UninstallKey))
{
uninstallKey.SetValueSafe("DisplayIcon", $"{Paths.Application},0");
Expand Down Expand Up @@ -571,7 +570,7 @@ public static void HandleUpgrade()

App.FastFlags.SetValue("FFlagFixGraphicsQuality", null);

Directory.Delete(Path.Combine(Paths.Base, "Versions"));
Directory.Delete(Path.Combine(Paths.Base, "Versions"), true);
}

App.Settings.Save();
Expand Down
4 changes: 4 additions & 0 deletions Bloxstrap/LaunchHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ public static void LaunchInstaller()
}
else
{
#if QA_BUILD
Frontend.ShowMessageBox("You are running a QA build of Bloxstrap. The red window border indicates that this is a QA build.", MessageBoxImage.Information);
#endif

new LanguageSelectorDialog().ShowDialog();

var installer = new UI.Elements.Installer.MainWindow();
Expand Down
7 changes: 5 additions & 2 deletions Bloxstrap/Locale.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using System.Windows;

using Bloxstrap.Resources;

namespace Bloxstrap
{
internal static class Locale
Expand Down Expand Up @@ -104,6 +102,11 @@ public static void Initialize()
{
window.FontFamily = new System.Windows.Media.FontFamily(new Uri("pack://application:,,,/Resources/Fonts/"), "./#Noto Sans Thai");
}

#if QA_BUILD
window.BorderBrush = System.Windows.Media.Brushes.Red;
window.BorderThickness = new Thickness(4);
#endif
}));
}
}
Expand Down
22 changes: 20 additions & 2 deletions Bloxstrap/Resources/Strings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions Bloxstrap/Resources/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ If not, then please report this exception through a [GitHub issue]({1}) along wi
<value>2015 (V1)</value>
</data>
<data name="Enums.FlagPresets.InGameMenuVersion.V2" xml:space="preserve">
<value>2022 (V2)</value>
<value>2020 (V2)</value>
</data>
<data name="Enums.FlagPresets.InGameMenuVersion.V4" xml:space="preserve">
<value>2023 (V4)</value>
Expand Down Expand Up @@ -646,7 +646,7 @@ Do NOT use this to import large "flag lists" made by other people that promise t
<value>Rendering mode</value>
</data>
<data name="Menu.FastFlags.Title" xml:space="preserve">
<value>Engine settings</value>
<value>Engine Settings</value>
</data>
<data name="Menu.FontFiles" xml:space="preserve">
<value>Font files</value>
Expand Down Expand Up @@ -1221,4 +1221,12 @@ Would you like to enable test mode?</value>
<data name="About.Translators.Description" xml:space="preserve">
<value>All of Bloxstrap's translations are crowdsourced through [Crowdin]({0}). Everyone listed here are people who generously volunteered their time and effort to help localise Bloxstrap. A massive thank you to everyone here!</value>
</data>
<data name="Common.Navigation.Install" xml:space="preserve">
<value>Install</value>
<comment>The word "Install" is being used as a verb in this instance, like the other navigation button texts of "Next" and "Back"</comment>
</data>
<data name="LaunchMenu.Donate" xml:space="preserve">
<value>Support us on Ko-fi!</value>
<comment>Call-to-action button</comment>
</data>
</root>
7 changes: 3 additions & 4 deletions Bloxstrap/UI/Elements/About/Pages/AboutPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,14 @@
</Grid>

<WrapPanel HorizontalAlignment="Center" Orientation="Horizontal">
<ui:Anchor Margin="0,0,8,8" Content="{x:Static resources:Strings.Menu_About_GithubRepository}" Icon="Code24" NavigateUri="https://github.com/pizzaboxer/bloxstrap" />
<ui:Anchor Margin="0,0,8,8" Content="{x:Static resources:Strings.Menu_About_HelpInformation}" Icon="BookQuestionMark24" NavigateUri="https://github.com/pizzaboxer/bloxstrap/wiki" />
<ui:Anchor Margin="0,0,8,8" Content="{x:Static resources:Strings.Menu_About_ReportIssue}" Icon="BookExclamationMark24" NavigateUri="https://github.com/pizzaboxer/bloxstrap/issues" />
<ui:Anchor Margin="0,0,8,8" Content="{x:Static resources:Strings.Menu_About_GithubRepository}" Icon="Code24" NavigateUri="https://github.com/bloxstraplabs/bloxstrap" />
<ui:Anchor Margin="0,0,8,8" Content="{x:Static resources:Strings.Menu_About_HelpInformation}" Icon="BookQuestionMark24" NavigateUri="https://github.com/bloxstraplabs/bloxstrap/wiki" />
<ui:Anchor Margin="0,0,8,8" Content="{x:Static resources:Strings.Menu_About_ReportIssue}" Icon="BookExclamationMark24" NavigateUri="https://github.com/bloxstraplabs/bloxstrap/issues" />
<ui:Anchor Margin="0,0,0,8" Content="{x:Static resources:Strings.Menu_About_DiscordServer}" Icon="Chat48" NavigateUri="https://discord.gg/nKjV3mGq6R" />
</WrapPanel>

<StackPanel Visibility="{Binding BuildInformationVisibility, Mode=OneTime}">
<TextBlock Text="Build Information" FontWeight="Medium" FontSize="20" Margin="0,16,0,0" />
<TextBlock Text="hmmmm" Foreground="{DynamicResource TextFillColorTertiaryBrush}" />

<Grid Column="0" Margin="0,8,0,0">
<Grid.RowDefinitions>
Expand Down
2 changes: 1 addition & 1 deletion Bloxstrap/UI/Elements/About/Pages/LicensesPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>

<ui:CardAction Grid.Row="0" Grid.Column="0" Margin="0,8,8,0" Command="models:GlobalViewModel.OpenWebpageCommand" CommandParameter="https://github.com/pizzaboxer/bloxstrap/blob/main/LICENSE">
<ui:CardAction Grid.Row="0" Grid.Column="0" Margin="0,8,8,0" Command="models:GlobalViewModel.OpenWebpageCommand" CommandParameter="https://github.com/bloxstraplabs/bloxstrap/blob/main/LICENSE">
<StackPanel>
<TextBlock FontSize="14" Text="Bloxstrap" />
<TextBlock Margin="0,2,0,0" FontSize="12" Text="{x:Static resources:Strings.Menu_About_Licenses_MIT}" Foreground="{DynamicResource TextFillColorTertiaryBrush}" />
Expand Down
5 changes: 5 additions & 0 deletions Bloxstrap/UI/Elements/Base/WpfUiWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ public void ApplyTheme()
{
_themeService.SetTheme(App.Settings.Prop.Theme.GetFinal() == Enums.Theme.Dark ? ThemeType.Dark : ThemeType.Light);
_themeService.SetSystemAccent();

#if QA_BUILD
this.BorderBrush = System.Windows.Media.Brushes.Red;
this.BorderThickness = new Thickness(4);
#endif
}

protected override void OnSourceInitialized(EventArgs e)
Expand Down
2 changes: 1 addition & 1 deletion Bloxstrap/UI/Elements/Controls/MarkdownTextBlock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ private static void OnTextMarkdownChanged(DependencyObject dependencyObject, Dep
var lastBlock = document.Last();

// matt was evidently very tired on the night he was first writing this
// https://github.com/pizzaboxer/bloxstrap/blob/289b9dec77cf35b2cc6504019bc9c7701626be1f/Bloxstrap/UI/Elements/Controls/MarkdownTextBlock.cs#L111
// https://github.com/bloxstraplabs/bloxstrap/blob/289b9dec77cf35b2cc6504019bc9c7701626be1f/Bloxstrap/UI/Elements/Controls/MarkdownTextBlock.cs#L111
foreach (var block in document)
{
if (block is not ParagraphBlock paragraphBlock || paragraphBlock.Inline is null)
Expand Down
8 changes: 4 additions & 4 deletions Bloxstrap/UI/Elements/Dialogs/LaunchMenuDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="280" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>

Expand All @@ -52,8 +52,8 @@
</Grid>

<StackPanel Grid.Row="1" HorizontalAlignment="Center">
<ui:Hyperlink Icon="QuestionCircle48" Content="About Bloxstrap" Margin="0,0,0,8" Command="{Binding LaunchAboutCommand, Mode=OneTime}" />
<ui:Hyperlink Icon="Heart48" Content="Support us on Ko-fi!" NavigateUri="https://ko-fi.com/boxerpizza" />
<ui:Hyperlink Icon="QuestionCircle48" Content="{x:Static resources:Strings.About_Title}" Margin="0,0,0,8" Command="{Binding LaunchAboutCommand, Mode=OneTime}" />
<ui:Hyperlink Icon="Heart48" Content="{x:Static resources:Strings.LaunchMenu_Donate}" NavigateUri="https://ko-fi.com/boxerpizza" />
</StackPanel>
</Grid>

Expand All @@ -72,7 +72,7 @@

<Border Margin="16" />

<ui:CardAction Margin="0,8,0,0" Icon="BookQuestionMark24" Command="models:GlobalViewModel.OpenWebpageCommand" CommandParameter="https://github.com/pizzaboxer/bloxstrap/wiki/">
<ui:CardAction Margin="0,8,0,0" Icon="BookQuestionMark24" Command="models:GlobalViewModel.OpenWebpageCommand" CommandParameter="https://github.com/bloxstraplabs/bloxstrap/wiki/">
<StackPanel>
<TextBlock FontSize="14" Text="{x:Static resources:Strings.LaunchMenu_Wiki_Title}" />
<TextBlock Margin="0,2,0,0" FontSize="12" Text="{x:Static resources:Strings.LaunchMenu_Wiki_Description}" Padding="0,0,16,0" Foreground="{DynamicResource TextFillColorTertiaryBrush}" />
Expand Down
2 changes: 2 additions & 0 deletions Bloxstrap/UI/Elements/Installer/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:base="clr-namespace:Bloxstrap.UI.Elements.Base"
xmlns:resources="clr-namespace:Bloxstrap.Resources"
xmlns:dmodels="clr-namespace:Bloxstrap.UI.ViewModels.Installer"
xmlns:local="clr-namespace:Bloxstrap.UI.Elements.Installer"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance dmodels:MainWindowViewModel, IsDesignTimeCreatable=True}"
Title="{x:Static resources:Strings.Installer_Title}"
Height="540" Width="840" MinWidth="840"
Background="{ui:ThemeResource ApplicationBackgroundBrush}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ private void UiPage_Loaded(object sender, RoutedEventArgs e)
{
if (Window.GetWindow(this) is MainWindow window)
{
window.SetNextButtonText("Next");
window.SetNextButtonText(Strings.Common_Navigation_Next);
window.SetButtonEnabled("back", false);
}
}
Expand Down
2 changes: 1 addition & 1 deletion Bloxstrap/UI/Elements/Installer/Pages/InstallPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
</Grid>

<TextBlock FontSize="20" FontWeight="SemiBold" Text="{x:Static resources:Strings.Common_Analytics}" TextWrapping="Wrap" Margin="0,16,0,0" />
<controls:MarkdownTextBlock FontSize="14" MarkdownText="{Binding Source={x:Static resources:Strings.Menu_Bloxstrap_Analytics_Description}, Converter={StaticResource StringFormatConverter}, ConverterParameter='https://github.com/pizzaboxer/bloxstrap/wiki/Privacy-Policy#analytical-functionality'}" TextWrapping="Wrap" />
<controls:MarkdownTextBlock FontSize="14" MarkdownText="{Binding Source={x:Static resources:Strings.Menu_Bloxstrap_Analytics_Description}, Converter={StaticResource StringFormatConverter}, ConverterParameter='https://github.com/bloxstraplabs/bloxstrap/wiki/Privacy-Policy#analytical-functionality'}" TextWrapping="Wrap" />

<controls:OptionControl
Header="{x:Static resources:Strings.Menu_Bloxstrap_Analytics_Title}">
Expand Down
2 changes: 1 addition & 1 deletion Bloxstrap/UI/Elements/Installer/Pages/InstallPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ private void UiPage_Loaded(object sender, RoutedEventArgs e)
{
if (Window.GetWindow(this) is MainWindow window)
{
window.SetNextButtonText("Install");
window.SetNextButtonText(Strings.Common_Navigation_Install);
window.NextPageCallback += NextPageCallback;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Bloxstrap/UI/Elements/Installer/Pages/WelcomePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</Grid.ColumnDefinitions>
<Image Grid.Column="0" Width="32" RenderOptions.BitmapScalingMode="HighQuality" Source="pack://application:,,,/Resources/MessageBox/Warning.png" />
<TextBlock Grid.Column="1" FontSize="14" Margin="12,0,12,0" Text="{Binding VersionNotice, Mode=OneWay}" TextWrapping="Wrap" />
<ui:Button Grid.Column="2" Icon="ArrowDownload16" Content="Download" Command="models:GlobalViewModel.OpenWebpageCommand" CommandParameter="https://github.com/pizzaboxer/bloxstrap/releases/latest" />
<ui:Button Grid.Column="2" Icon="ArrowDownload16" Content="Download" Command="models:GlobalViewModel.OpenWebpageCommand" CommandParameter="https://github.com/bloxstraplabs/bloxstrap/releases/latest" />
</Grid>

<StackPanel>
Expand Down
2 changes: 1 addition & 1 deletion Bloxstrap/UI/Elements/Installer/Pages/WelcomePage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public WelcomePage()
private void UiPage_Loaded(object sender, RoutedEventArgs e)
{
if (Window.GetWindow(this) is MainWindow window)
window.SetNextButtonText("Next");
window.SetNextButtonText(Strings.Common_Navigation_Next);

_viewModel.DoChecks();
}
Expand Down
2 changes: 1 addition & 1 deletion Bloxstrap/UI/Elements/Settings/Pages/BloxstrapPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<controls:OptionControl
Header="{x:Static resources:Strings.Menu_Bloxstrap_Analytics_Title}"
Description="{Binding Source={x:Static resources:Strings.Menu_Bloxstrap_Analytics_Description}, Converter={StaticResource StringFormatConverter}, ConverterParameter='https://github.com/pizzaboxer/bloxstrap/wiki/Privacy-Policy#analytical-functionality'}">
Description="{Binding Source={x:Static resources:Strings.Menu_Bloxstrap_Analytics_Description}, Converter={StaticResource StringFormatConverter}, ConverterParameter='https://github.com/bloxstraplabs/bloxstrap/wiki/Privacy-Policy#analytical-functionality'}">
<ui:ToggleSwitch IsChecked="{Binding AnalyticsEnabled, Mode=TwoWay}" />
</controls:OptionControl>
</StackPanel>
Expand Down
Loading

0 comments on commit c687f41

Please sign in to comment.