From 992208add11db73cb1ffb48c5ccedb0c883aafd0 Mon Sep 17 00:00:00 2001 From: Roy Date: Wed, 2 Nov 2022 04:49:10 +0200 Subject: PPC multi version support completed on PPC,FSE,MS,DB. --- .../PPC/Tango.PPC.UI/GetVersionTag.bat | 4 ++++ .../PPCApplication/DefaultPPCApplicationManager.cs | 22 ++++++++++++++++++++++ .../PPC/Tango.PPC.UI/Tango.PPC.UI.csproj | 13 +++++++++++-- .../ViewModels/ExternalBridgeViewVM.cs | 2 +- .../PPC/Tango.PPC.UI/Views/LayoutView.xaml | 2 +- .../PPC/Tango.PPC.UI/Views/LoadingView.xaml | 2 +- 6 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/GetVersionTag.bat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/GetVersionTag.bat b/Software/Visual_Studio/PPC/Tango.PPC.UI/GetVersionTag.bat new file mode 100644 index 000000000..8bcb5c5af --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/GetVersionTag.bat @@ -0,0 +1,4 @@ +@ECHO off +rc.exe "Tango.PPC.UI.exe" --get-version-string "Comments" +echo: +pause \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs index 83790a56f..9b57da988 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs @@ -36,6 +36,7 @@ using Tango.PPC.Common.Navigation; using Tango.PPC.Common.Synchronization; using Tango.Insights; using System.Threading; +using System.Reflection; namespace Tango.PPC.UI.PPCApplication { @@ -135,6 +136,27 @@ namespace Tango.PPC.UI.PPCApplication } } + /// + /// Gets the version tag. + /// + public String VersionTag + { + get + { + var str = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).Comments; + return str.IsNotNullOrEmpty() ? str : null; + + } + } + + /// + /// Gets the version and tag display. + /// + public String VersionAndTag + { + get { return Version.ToString(3) + $"{(VersionTag.IsNotNullOrEmpty() ? $" [{VersionTag}]" : String.Empty)}"; } + } + /// /// Gets the application startup date. /// diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj index 2d3d25cc3..6f93232ab 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj @@ -495,11 +495,18 @@ + + rc.exe + PreserveNewest + PreserveNewest + + PreserveNewest + SettingsSingleFileGenerator @@ -806,7 +813,9 @@ if $(ConfigurationName) == Release del *.xml if $(ConfigurationName) == Release del WebRtc.NET.pdb -if $(ConfigurationName) == Debug copy /Y "$(TargetDir)Packages" "$(TargetDir)" +if $(ConfigurationName) == Debug copy /Y "$(TargetDir)Packages" "$(TargetDir)" + +if $(ConfigurationName) == Debug "rc.exe" "$(TargetPath)" --set-version-string "Comments" "Coats" copy /Y "$(ProjectDir)Manifests\$(ConfigurationName).xml" "$(ProjectDir)app.manifest" @@ -814,7 +823,7 @@ if $(ConfigurationName) == Debug copy /Y "$(TargetDir)Packages" "$(TargetDir)" - + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/ExternalBridgeViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/ExternalBridgeViewVM.cs index f10e84d05..47376b7c7 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/ExternalBridgeViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/ExternalBridgeViewVM.cs @@ -142,7 +142,7 @@ namespace Tango.PPC.UI.ViewModels if (!e.Request.Intent.RequiresPassword() || e.Request.Password == Settings.ExternalBridgePassword) { - e.ApplicationInformation.Version = ApplicationManager.Version.ToString(); + e.ApplicationInformation.Version = ApplicationManager.VersionAndTag; e.ApplicationInformation.StartupDate = ApplicationManager.StartUpDate.ToUniversalTime().ToString(); Connection = e; diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml index 1417c79f3..3664e3997 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml @@ -45,7 +45,7 @@ | Version: - + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml index 555a45aea..146d4b50d 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml @@ -54,7 +54,7 @@ - v + v -- cgit v1.3.1