Skip to content

Commit

Permalink
Add QA build identification
Browse files Browse the repository at this point in the history
  • Loading branch information
pizzaboxer committed Oct 9, 2024
1 parent f467259 commit af19a35
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 10 deletions.
4 changes: 4 additions & 0 deletions Bloxstrap/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ namespace Bloxstrap
/// </summary>
public partial class App : Application
{
#if QA_BUILD
public const string ProjectName = "Bloxstrap-QA";
#else
public const string ProjectName = "Bloxstrap";
#endif
public const string ProjectOwner = "Bloxstrap";
public const string ProjectRepository = "bloxstraplabs/bloxstrap";
public const string ProjectDownloadLink = "https://bloxstraplabs.com";
Expand Down
2 changes: 1 addition & 1 deletion 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
7 changes: 3 additions & 4 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
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
1 change: 0 additions & 1 deletion Bloxstrap/UI/Elements/About/Pages/AboutPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@

<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
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
4 changes: 2 additions & 2 deletions Bloxstrap/UI/ViewModels/Settings/ShortcutsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ namespace Bloxstrap.UI.ViewModels.Settings
{
public class ShortcutsViewModel : NotifyPropertyChangedViewModel
{
public ShortcutTask DesktopIconTask { get; } = new("Desktop", Paths.Desktop, "Bloxstrap.lnk");
public ShortcutTask DesktopIconTask { get; } = new("Desktop", Paths.Desktop, $"{App.ProjectName}.lnk");

public ShortcutTask StartMenuIconTask { get; } = new("StartMenu", Paths.WindowsStartMenu, "Bloxstrap.lnk");
public ShortcutTask StartMenuIconTask { get; } = new("StartMenu", Paths.WindowsStartMenu, $"{App.ProjectName}.lnk");

public ShortcutTask PlayerIconTask { get; } = new("RobloxPlayer", Paths.Desktop, $"{Strings.LaunchMenu_LaunchRoblox}.lnk", "-player");

Expand Down

0 comments on commit af19a35

Please sign in to comment.