aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI
diff options
context:
space:
mode:
authorRoy <Roy.mail.net@gmail.com>2022-11-02 04:49:10 +0200
committerRoy <Roy.mail.net@gmail.com>2022-11-02 04:49:10 +0200
commit992208add11db73cb1ffb48c5ccedb0c883aafd0 (patch)
treee8b753bca8f341c105b8b1cb7761e2282a13881e /Software/Visual_Studio/PPC/Tango.PPC.UI
parent5ab455fb09c659e92ad4de41ec7472e2b8e48499 (diff)
downloadTango-992208add11db73cb1ffb48c5ccedb0c883aafd0.tar.gz
Tango-992208add11db73cb1ffb48c5ccedb0c883aafd0.zip
PPC multi version support completed on PPC,FSE,MS,DB.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/GetVersionTag.bat4
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs22
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj13
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/ExternalBridgeViewVM.cs2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml2
6 files changed, 40 insertions, 5 deletions
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
{
@@ -136,6 +137,27 @@ namespace Tango.PPC.UI.PPCApplication
}
/// <summary>
+ /// Gets the version tag.
+ /// </summary>
+ public String VersionTag
+ {
+ get
+ {
+ var str = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).Comments;
+ return str.IsNotNullOrEmpty() ? str : null;
+
+ }
+ }
+
+ /// <summary>
+ /// Gets the version and tag display.
+ /// </summary>
+ public String VersionAndTag
+ {
+ get { return Version.ToString(3) + $"{(VersionTag.IsNotNullOrEmpty() ? $" [{VersionTag}]" : String.Empty)}"; }
+ }
+
+ /// <summary>
/// Gets the application startup date.
/// </summary>
public DateTime StartUpDate { get; private set; }
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 @@
<Resource Include="Images\bit.png" />
<Resource Include="Images\bit_new.png" />
<Resource Include="Images\loading_anim2.gif" />
+ <None Include="..\rc.exe">
+ <Link>rc.exe</Link>
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
<Content Include="Manifests\release.xml" />
<Content Include="Manifests\debug.xml" />
<None Include="firmware_package.tfp">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
+ <None Include="GetVersionTag.bat">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
@@ -806,7 +813,9 @@ if $(ConfigurationName) == Release del *.xml
if $(ConfigurationName) == Release del WebRtc.NET.pdb
-if $(ConfigurationName) == Debug copy /Y "$(TargetDir)Packages" "$(TargetDir)"</PostBuildEvent>
+if $(ConfigurationName) == Debug copy /Y "$(TargetDir)Packages" "$(TargetDir)"
+
+if $(ConfigurationName) == Debug "rc.exe" "$(TargetPath)" --set-version-string "Comments" "Coats"</PostBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PreBuildEvent>copy /Y "$(ProjectDir)Manifests\$(ConfigurationName).xml" "$(ProjectDir)app.manifest"
@@ -814,7 +823,7 @@ if $(ConfigurationName) == Debug copy /Y "$(TargetDir)Packages" "$(TargetDir)"</
</PropertyGroup>
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
+ <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
</VisualStudio>
</ProjectExtensions>
</Project> \ 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 @@
<Run FontStyle="Italic" Text="{Binding MachineProvider.Machine.SerialNumber,Mode=OneWay,IsAsync=True,FallbackValue='0000'}"></Run>
<Run>|</Run>
<Run>Version:</Run>
- <Run FontStyle="Italic" Text="{Binding ApplicationManager.Version,FallbackValue='1.0.0.0',Mode=OneWay,IsAsync=True}"></Run>
+ <Run FontStyle="Italic" Text="{Binding ApplicationManager.VersionAndTag,FallbackValue='1.0.0.0',Mode=OneWay,IsAsync=True}"></Run>
</TextBlock>
<TextBlock Margin="5 0 0 0" Foreground="{StaticResource TangoGrayTextBrush}" FontSize="{StaticResource TangoSmallFontSize}">
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 @@
</Grid>
<TextBlock Margin="0 40 0 0" HorizontalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}" Foreground="{StaticResource TangoGrayTextBrush}">
- <Run>v</Run><Run Text="{Binding ApplicationManager.Version,Mode=OneWay}"></Run>
+ <Run>v</Run><Run Text="{Binding ApplicationManager.VersionAndTag,Mode=OneWay}"></Run>
</TextBlock>
<TextBlock FontSize="{StaticResource TangoHeaderFontSize}" Margin="0 100 0 0" HorizontalAlignment="Center" Width="150">
<TextBlock.Style>