Skip to content

Commit

Permalink
Add notice for non-release builds
Browse files Browse the repository at this point in the history
  • Loading branch information
SadPencil committed Nov 5, 2024
1 parent b7f6575 commit fa9e893
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
4 changes: 4 additions & 0 deletions DXMainClient/DXGUI/GameClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 4 additions & 0 deletions DXMainClient/PreStartup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
7 changes: 7 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
<Message Importance="high" Text="Engine: $(Engine); Game: $(Game); Platform: $(Platform); TargetFramework: $(TargetFramework); Configuration: $(Configuration)" />
</Target>

<Target Name="NonReleaseBuildWarning" AfterTargets="GetVersion" Condition="'$(MSBuildProjectName)' == 'DXMainClient' AND ($(GitVersion_PreReleaseLabel) != '' OR $(GitVersion_BranchName) != 'master')">
<PropertyGroup>
<DefineConstants>$(DefineConstants);DEVELOPMENT_BUILD</DefineConstants>
</PropertyGroup>
<Warning Text="This is a development build. Stability and reliability may not be fully guaranteed." Condition="'$(BuildingInsideVisualStudio)' != 'true'"></Warning>
</Target>

<Target Name="RestoreUpdater" AfterTargets="Restore" Condition="'$(PublishDir)' != '' AND '$(MSBuildProjectName)' == 'DXMainClient'">
<MSBuild
Projects="$(MSBuildThisFileDirectory)SecondStageUpdater\SecondStageUpdater.csproj"
Expand Down
6 changes: 3 additions & 3 deletions GitVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
# base tag of "2.8.0-beta.1" is also a beta.
#
# Latest tag is "2.8.0" -
# A new commit is added directly to master. The new version is "2.8.1".
# That increments th Patch, because it is treated as a "hotfix" directly on master.
# A new commit is added directly to master. The new version is "2.8.1-rc.1".
# That increments the Patch, because it is treated as a "hotfix" directly on master.
#
# Versioning Modes Quick View:
#
Expand All @@ -37,7 +37,7 @@ branches:
increment: Patch
is-mainline: true
source-branches: [ 'develop' ]
tag: ''
tag: rc

develop:
regex: ^develop$
Expand Down

0 comments on commit fa9e893

Please sign in to comment.