mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 15:27:30 +08:00
Warn about not using an official "deployed" build
This commit is contained in:
parent
8ee391530f
commit
ac7fca10d6
@ -125,6 +125,11 @@ Click to see what's new!", version);
|
||||
/// </summary>
|
||||
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 and scores will not be submitted."
|
||||
/// </summary>
|
||||
public static LocalisableString NotOfficialBuild => new TranslatableString(getKey(@"not_official_build"), @"This is not an official build of the game and scores will not be submitted.");
|
||||
|
||||
/// <summary>
|
||||
/// "Downloading update..."
|
||||
/// </summary>
|
||||
|
@ -1,7 +1,9 @@
|
||||
// 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.Reflection;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
@ -11,6 +13,7 @@ using osu.Game.Graphics;
|
||||
using osu.Game.Localisation;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Overlays.Notifications;
|
||||
using osu.Game.Utils;
|
||||
using osuTK;
|
||||
|
||||
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).
|
||||
if (!string.IsNullOrEmpty(lastVersion))
|
||||
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.
|
||||
|
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