aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Publisher.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.Publisher.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.Publisher.UI')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Publisher.UI/MainWindow.xaml4
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Publisher.UI/MainWindowVM.cs20
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Publisher.UI/Tango.PPC.Publisher.UI.csproj6
3 files changed, 26 insertions, 4 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Publisher.UI/MainWindow.xaml b/Software/Visual_Studio/PPC/Tango.PPC.Publisher.UI/MainWindow.xaml
index a8532646f..5697f2027 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Publisher.UI/MainWindow.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Publisher.UI/MainWindow.xaml
@@ -10,7 +10,7 @@
xmlns:web="clr-namespace:Tango.Web;assembly=Tango.Web"
xmlns:local="clr-namespace:Tango.PPC.Publisher.UI"
mc:Ignorable="d"
- Title="Tango PPC Publisher" Height="1000" Width="500" d:DataContext="{d:DesignInstance Type=local:MainWindowVM, IsDesignTimeCreatable=False}" WindowStartupLocation="CenterScreen">
+ Title="Tango PPC Publisher" d:DesignHeight="1200" Height="800" Width="500" d:DataContext="{d:DesignInstance Type=local:MainWindowVM, IsDesignTimeCreatable=False}" WindowStartupLocation="CenterScreen">
<Window.Resources>
<converters:EnumToItemsSourceConverter x:Key="EnumToItemsSourceConverter" />
@@ -123,7 +123,7 @@
<StackPanel Margin="0 20 0 0">
<TextBlock>Tag</TextBlock>
- <ComboBox IsEditable="True" ItemsSource="{Binding Tags}" SelectedItem="{Binding Options.Tag}"></ComboBox>
+ <ComboBox IsEditable="True" ItemsSource="{Binding Tags}" Text="{Binding Options.Tag,Delay=1000,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></ComboBox>
</StackPanel>
<StackPanel Margin="0 20 0 0">
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Publisher.UI/MainWindowVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.Publisher.UI/MainWindowVM.cs
index c2eedff13..3138f2d69 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Publisher.UI/MainWindowVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Publisher.UI/MainWindowVM.cs
@@ -21,6 +21,7 @@ using Tango.BL.DTO;
using Tango.BL.Entities;
using Tango.Core;
using Tango.Core.Commands;
+using Tango.Core.Components;
using Tango.Core.Cryptography;
using Tango.Core.Helpers;
using Tango.Core.IO;
@@ -157,6 +158,7 @@ namespace Tango.PPC.Publisher.UI
Options.EnvironmentChanged += async (_, __) => await OnEnvironmentChanged();
Options.BuidConfigChanged += async (_, __) => await UpdateVersions();
Options.TfpPathChanged += async (_, __) => await UpdateVersions();
+ Options.TagChanged += async (_, __) => await UpdateVersions();
Init();
}
@@ -198,13 +200,13 @@ namespace Tango.PPC.Publisher.UI
DirectoryInfo di = new DirectoryInfo(Options.GetApplicationPath());
long totalSize = di.GetFiles("*", SearchOption.AllDirectories).Sum(x => x.Length);
- PackageSize = totalSize.FileSizeToString();
+ PackageSize = totalSize.FileSizeToString();
try
{
LocalFirmwareVersion = _publisher.GetLocalFirmwareVersion(Options.TfpPath);
}
- catch {}
+ catch { }
if (SelectedMachineVersion != null)
{
@@ -233,6 +235,20 @@ namespace Tango.PPC.Publisher.UI
{
IsFree = false;
SettingsManager.Default.Save();
+
+ if (String.IsNullOrWhiteSpace(Options.Tag))
+ {
+ Options.Tag = null;
+ }
+
+ CmdCommand cmdCommand = new CmdCommand("rc.exe", $"\"{_publisher.GetPPCExecutablePath()}\" --set-version-string \"Comments\" \"{Options.Tag}\"");
+ var result = await cmdCommand.Run();
+
+ if (result.ExitCode != 0)
+ {
+ throw new Exception("Error modifying version tag on output.");
+ }
+
await _publisher.Publish();
ShowInfo("Version published successfully.");
await UpdateVersions();
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Publisher.UI/Tango.PPC.Publisher.UI.csproj b/Software/Visual_Studio/PPC/Tango.PPC.Publisher.UI/Tango.PPC.Publisher.UI.csproj
index 332554ffc..778117469 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Publisher.UI/Tango.PPC.Publisher.UI.csproj
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Publisher.UI/Tango.PPC.Publisher.UI.csproj
@@ -189,6 +189,12 @@
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
+ <ItemGroup>
+ <None Include="..\rc.exe">
+ <Link>rc.exe</Link>
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>