Add QA build identification

This commit is contained in:
pizzaboxer 2024-10-09 16:20:17 +01:00
parent f467259030
commit af19a353ff
No known key found for this signature in database
GPG Key ID: 59D4A1DBAD0F2BA8
8 changed files with 24 additions and 10 deletions

View File

@ -14,7 +14,11 @@ namespace Bloxstrap
/// </summary> /// </summary>
public partial class App : Application public partial class App : Application
{ {
#if QA_BUILD
public const string ProjectName = "Bloxstrap-QA";
#else
public const string ProjectName = "Bloxstrap"; public const string ProjectName = "Bloxstrap";
#endif
public const string ProjectOwner = "Bloxstrap"; public const string ProjectOwner = "Bloxstrap";
public const string ProjectRepository = "bloxstraplabs/bloxstrap"; public const string ProjectRepository = "bloxstraplabs/bloxstrap";
public const string ProjectDownloadLink = "https://bloxstraplabs.com"; public const string ProjectDownloadLink = "https://bloxstraplabs.com";

View File

@ -158,7 +158,7 @@ namespace Bloxstrap
if (connectionResult is not null) if (connectionResult is not null)
HandleConnectionError(connectionResult); HandleConnectionError(connectionResult);
#if !DEBUG || DEBUG_UPDATER #if (!DEBUG || DEBUG_UPDATER) && !QA_BUILD
if (App.Settings.Prop.CheckForUpdates && !App.LaunchSettings.UpgradeFlag.Active) if (App.Settings.Prop.CheckForUpdates && !App.LaunchSettings.UpgradeFlag.Active)
{ {
bool updatePresent = await CheckForUpdates(); bool updatePresent = await CheckForUpdates();

View File

@ -5,11 +5,11 @@ namespace Bloxstrap
{ {
internal class Installer 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")); public bool ExistingDataPresent => File.Exists(Path.Combine(InstallLocation, "Settings.json"));
@ -52,7 +52,6 @@ namespace Bloxstrap
} }
} }
// 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)) using (var uninstallKey = Registry.CurrentUser.CreateSubKey(App.UninstallKey))
{ {
uninstallKey.SetValueSafe("DisplayIcon", $"{Paths.Application},0"); uninstallKey.SetValueSafe("DisplayIcon", $"{Paths.Application},0");

View File

@ -78,6 +78,10 @@ namespace Bloxstrap
} }
else 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(); new LanguageSelectorDialog().ShowDialog();
var installer = new UI.Elements.Installer.MainWindow(); var installer = new UI.Elements.Installer.MainWindow();

View File

@ -1,7 +1,5 @@
using System.Windows; using System.Windows;
using Bloxstrap.Resources;
namespace Bloxstrap namespace Bloxstrap
{ {
internal static class Locale internal static class Locale
@ -104,6 +102,11 @@ namespace Bloxstrap
{ {
window.FontFamily = new System.Windows.Media.FontFamily(new Uri("pack://application:,,,/Resources/Fonts/"), "./#Noto Sans Thai"); 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
})); }));
} }
} }

View File

@ -48,7 +48,6 @@
<StackPanel Visibility="{Binding BuildInformationVisibility, Mode=OneTime}"> <StackPanel Visibility="{Binding BuildInformationVisibility, Mode=OneTime}">
<TextBlock Text="Build Information" FontWeight="Medium" FontSize="20" Margin="0,16,0,0" /> <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 Column="0" Margin="0,8,0,0">
<Grid.RowDefinitions> <Grid.RowDefinitions>

View File

@ -20,6 +20,11 @@ namespace Bloxstrap.UI.Elements.Base
{ {
_themeService.SetTheme(App.Settings.Prop.Theme.GetFinal() == Enums.Theme.Dark ? ThemeType.Dark : ThemeType.Light); _themeService.SetTheme(App.Settings.Prop.Theme.GetFinal() == Enums.Theme.Dark ? ThemeType.Dark : ThemeType.Light);
_themeService.SetSystemAccent(); _themeService.SetSystemAccent();
#if QA_BUILD
this.BorderBrush = System.Windows.Media.Brushes.Red;
this.BorderThickness = new Thickness(4);
#endif
} }
protected override void OnSourceInitialized(EventArgs e) protected override void OnSourceInitialized(EventArgs e)

View File

@ -5,9 +5,9 @@ namespace Bloxstrap.UI.ViewModels.Settings
{ {
public class ShortcutsViewModel : NotifyPropertyChangedViewModel 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"); public ShortcutTask PlayerIconTask { get; } = new("RobloxPlayer", Paths.Desktop, $"{Strings.LaunchMenu_LaunchRoblox}.lnk", "-player");