From fa9e893cbe8441e85f5ed4ecb8629a2eaf8c20de Mon Sep 17 00:00:00 2001 From: SadPencil Date: Tue, 5 Nov 2024 20:21:55 +0800 Subject: [PATCH] Add notice for non-release builds --- DXMainClient/DXGUI/GameClass.cs | 4 ++++ DXMainClient/PreStartup.cs | 4 ++++ Directory.Build.targets | 7 +++++++ GitVersion.yml | 6 +++--- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/DXMainClient/DXGUI/GameClass.cs b/DXMainClient/DXGUI/GameClass.cs index ee269228a..bb100d84a 100644 --- a/DXMainClient/DXGUI/GameClass.cs +++ b/DXMainClient/DXGUI/GameClass.cs @@ -69,6 +69,10 @@ protected override void Initialize() Window.Title = string.IsNullOrEmpty(windowTitle) ? string.Format("{0} Client", MainClientConstants.GAME_NAME_SHORT) : windowTitle; +#if DEVELOPMENT_BUILD + Window.Title += " (Development Build)"; +#endif + base.Initialize(); AssetLoader.Initialize(GraphicsDevice, content); diff --git a/DXMainClient/PreStartup.cs b/DXMainClient/PreStartup.cs index 955288586..54480338e 100644 --- a/DXMainClient/PreStartup.cs +++ b/DXMainClient/PreStartup.cs @@ -93,6 +93,10 @@ public static void Initialize(StartupParams parameters) Logger.Log("Client version: " + Assembly.GetAssembly(typeof(PreStartup)).GetName().Version); Logger.Log(FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).ProductVersion); +#if DEVELOPMENT_BUILD + Logger.Log("This is a development build. Stability and reliability may not be fully guaranteed."); +#endif + // Log information about given startup params if (parameters.NoAudio) { diff --git a/Directory.Build.targets b/Directory.Build.targets index d238c0322..01a992c05 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -3,6 +3,13 @@ + + + $(DefineConstants);DEVELOPMENT_BUILD + + + +