From 974b4cab96f407a007183644a3bb30853cde3608 Mon Sep 17 00:00:00 2001 From: miku-666 <74728189+NessieHax@users.noreply.github.com> Date: Thu, 27 Jun 2024 19:47:03 +0200 Subject: [PATCH] Fix displayed Version --- .gitignore | 3 +++ PCK-Studio/Forms/ContributorsForm.cs | 2 +- PCK-Studio/Internal/App/ApplicationScope.cs | 2 ++ PCK-Studio/MainForm.cs | 2 +- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 15baf62c..8e15384e 100644 --- a/.gitignore +++ b/.gitignore @@ -250,3 +250,6 @@ paket-files/ # JetBrains Rider .idea/ *.sln.iml + +# Deploy util +makeUpdate.py diff --git a/PCK-Studio/Forms/ContributorsForm.cs b/PCK-Studio/Forms/ContributorsForm.cs index 51906542..cd2a528e 100644 --- a/PCK-Studio/Forms/ContributorsForm.cs +++ b/PCK-Studio/Forms/ContributorsForm.cs @@ -27,7 +27,7 @@ namespace PckStudio.Forms #else buildConfig = "unknown"; #endif - buildLabel.Text = $"Verion: {Application.ProductVersion}\nBuild Config: {buildConfig}\nBranch: {CommitInfo.BranchName}@{CommitInfo.CommitHash}"; + buildLabel.Text = $"Verion: {ApplicationScope.CurrentVersion}\nBuild Config: {buildConfig}\nBranch: {CommitInfo.BranchName}@{CommitInfo.CommitHash}"; } protected override void OnLoad(EventArgs e) diff --git a/PCK-Studio/Internal/App/ApplicationScope.cs b/PCK-Studio/Internal/App/ApplicationScope.cs index d489938b..a9578fce 100644 --- a/PCK-Studio/Internal/App/ApplicationScope.cs +++ b/PCK-Studio/Internal/App/ApplicationScope.cs @@ -21,6 +21,8 @@ namespace PckStudio.Internal.App private static Image[] _entityImages; public static Image[] EntityImages => _entityImages; + public static Version CurrentVersion { get; } = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; + internal static void Initialize() { Profiler.Start(); diff --git a/PCK-Studio/MainForm.cs b/PCK-Studio/MainForm.cs index 75a68d6c..c420de93 100644 --- a/PCK-Studio/MainForm.cs +++ b/PCK-Studio/MainForm.cs @@ -91,7 +91,7 @@ namespace PckStudio Text = Application.ProductName; - labelVersion.Text = $"{Application.ProductName}: {Application.ProductVersion}"; + labelVersion.Text = $"{Application.ProductName}: {ApplicationScope.CurrentVersion}"; ChangelogRichTextBox.Text = Resources.CHANGELOG; pckFileTypeHandler = new Dictionary>(15)