mirror of
https://github.com/ppy/osu.git
synced 2025-02-21 08:52:55 +08:00
Merge pull request #27681 from smoogipoo/add-deployed-build-attribute
Warn about not using an official "deployed" build
This commit is contained in:
commit
c081cc7d77
@ -125,6 +125,11 @@ Click to see what's new!", version);
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static LocalisableString UpdateReadyToInstall => new TranslatableString(getKey(@"update_ready_to_install"), @"Update ready to install. Click to restart!");
|
public static LocalisableString UpdateReadyToInstall => new TranslatableString(getKey(@"update_ready_to_install"), @"Update ready to install. Click to restart!");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "This is not an official build of the game. Scores will not be submitted and other online systems may not work as intended."
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString NotOfficialBuild => new TranslatableString(getKey(@"not_official_build"), @"This is not an official build of the game. Scores will not be submitted and other online systems may not work as intended.");
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// "Downloading update..."
|
/// "Downloading update..."
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System.Reflection;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using osu.Framework;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
@ -11,6 +13,7 @@ using osu.Game.Graphics;
|
|||||||
using osu.Game.Localisation;
|
using osu.Game.Localisation;
|
||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
using osu.Game.Overlays.Notifications;
|
using osu.Game.Overlays.Notifications;
|
||||||
|
using osu.Game.Utils;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Updater
|
namespace osu.Game.Updater
|
||||||
@ -51,6 +54,9 @@ namespace osu.Game.Updater
|
|||||||
// only show a notification if we've previously saved a version to the config file (ie. not the first run).
|
// only show a notification if we've previously saved a version to the config file (ie. not the first run).
|
||||||
if (!string.IsNullOrEmpty(lastVersion))
|
if (!string.IsNullOrEmpty(lastVersion))
|
||||||
Notifications.Post(new UpdateCompleteNotification(version));
|
Notifications.Post(new UpdateCompleteNotification(version));
|
||||||
|
|
||||||
|
if (RuntimeInfo.EntryAssembly.GetCustomAttribute<OfficialBuildAttribute>() == null)
|
||||||
|
Notifications.Post(new SimpleNotification { Text = NotificationsStrings.NotOfficialBuild });
|
||||||
}
|
}
|
||||||
|
|
||||||
// debug / local compilations will reset to a non-release string.
|
// debug / local compilations will reset to a non-release string.
|
||||||
|
12
osu.Game/Utils/OfficialBuildAttribute.cs
Normal file
12
osu.Game/Utils/OfficialBuildAttribute.cs
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using JetBrains.Annotations;
|
||||||
|
|
||||||
|
namespace osu.Game.Utils
|
||||||
|
{
|
||||||
|
[UsedImplicitly]
|
||||||
|
[AttributeUsage(AttributeTargets.Assembly)]
|
||||||
|
public class OfficialBuildAttribute : Attribute;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user