1 Commits

Author SHA1 Message Date
79e3ec2f0d compressed executable files 2023-08-10 22:02:02 +02:00
2 changed files with 28 additions and 9 deletions

View File

@@ -161,7 +161,7 @@
<DataGridTemplateColumn.CellTemplate> <DataGridTemplateColumn.CellTemplate>
<DataTemplate DataType="models:FileInformation"> <DataTemplate DataType="models:FileInformation">
<Border Background="Transparent"> <Border Background="Transparent">
<TextBlock Text="{Binding Size}" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 8 0"/> <TextBlock Text="{Binding Size}" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 10 0"/>
<Interaction.Behaviors> <Interaction.Behaviors>
<EventTriggerBehavior EventName="DoubleTapped"> <EventTriggerBehavior EventName="DoubleTapped">
<InvokeCommandAction Command="{Binding ((vm:MainWindowViewModel)DataContext).OpenCommand, RelativeSource={RelativeSource AncestorType=Window }}" /> <InvokeCommandAction Command="{Binding ((vm:MainWindowViewModel)DataContext).OpenCommand, RelativeSource={RelativeSource AncestorType=Window }}" />
@@ -175,7 +175,7 @@
<DataGridTemplateColumn.CellTemplate> <DataGridTemplateColumn.CellTemplate>
<DataTemplate DataType="models:FileInformation"> <DataTemplate DataType="models:FileInformation">
<Border Background="Transparent"> <Border Background="Transparent">
<TextBlock Text="{Binding DateTimeOffsetString}" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 8 0"/> <TextBlock Text="{Binding DateTimeOffsetString}" VerticalAlignment="Center" Margin="10 0 8 0"/>
<Interaction.Behaviors> <Interaction.Behaviors>
<EventTriggerBehavior EventName="DoubleTapped"> <EventTriggerBehavior EventName="DoubleTapped">
<InvokeCommandAction Command="{Binding ((vm:MainWindowViewModel)DataContext).OpenCommand, RelativeSource={RelativeSource AncestorType=Window}}" /> <InvokeCommandAction Command="{Binding ((vm:MainWindowViewModel)DataContext).OpenCommand, RelativeSource={RelativeSource AncestorType=Window}}" />

View File

@@ -1,32 +1,40 @@
using System.IO;
using System.IO.Compression;
using Nuke.Common; using Nuke.Common;
using Nuke.Common.IO; using Nuke.Common.IO;
using Nuke.Common.ProjectModel;
using Nuke.Common.Tooling; using Nuke.Common.Tooling;
using Nuke.Common.Tools.DotNet; using Nuke.Common.Tools.DotNet;
using static Nuke.Common.Tools.DotNet.DotNetTasks; using static Nuke.Common.Tools.DotNet.DotNetTasks;
class Build : NukeBuild class Build : NukeBuild
{ {
AbsolutePath SourceDirectory => RootDirectory / "K8sFileBrowser";
AbsolutePath OutputDirectory => RootDirectory / "output";
AbsolutePath WinOutputDirectory => OutputDirectory / "win";
AbsolutePath LinuxOutputDirectory => OutputDirectory / "linux";
AbsolutePath ProjectFile => SourceDirectory / "K8sFileBrowser.csproj";
public static int Main () => Execute<Build>(x => x.Publish);
[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")] [Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")]
readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release; readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release;
[Parameter] readonly string Version = "1.0.0"; [Parameter] readonly string Version = "1.0.0";
AbsolutePath SourceDirectory => RootDirectory / "K8sFileBrowser";
AbsolutePath OutputDirectory => RootDirectory / "output";
AbsolutePath WinOutputDirectory => OutputDirectory / "win";
AbsolutePath LinuxOutputDirectory => OutputDirectory / "linux";
AbsolutePath WinZip => OutputDirectory / $"K8sFileBrowser_{Version}.zip";
AbsolutePath LinuxGz => OutputDirectory / $"K8sFileBrowser_{Version}.tgz";
AbsolutePath ProjectFile => SourceDirectory / "K8sFileBrowser.csproj";
readonly string ExcludedExtensions = "pdb";
public static int Main () => Execute<Build>(x => x.Publish);
Target Clean => _ => _ Target Clean => _ => _
.Before(Restore) .Before(Restore)
.Executes(() => .Executes(() =>
{ {
DotNetClean(s => s OutputDirectory.DeleteDirectory();
.SetOutput(OutputDirectory));
}); });
Target Restore => _ => _ Target Restore => _ => _
@@ -56,6 +64,12 @@ class Build : NukeBuild
.SetProcessArgumentConfigurator(_ => _ .SetProcessArgumentConfigurator(_ => _
.Add("-p:IncludeNativeLibrariesForSelfExtract=true")) .Add("-p:IncludeNativeLibrariesForSelfExtract=true"))
.EnableNoRestore()); .EnableNoRestore());
WinOutputDirectory.ZipTo(
WinZip,
filter: x => !x.HasExtension(ExcludedExtensions),
compressionLevel: CompressionLevel.SmallestSize,
fileMode: FileMode.CreateNew);
}); });
Target PublishLinux => _ => _ Target PublishLinux => _ => _
@@ -77,6 +91,11 @@ class Build : NukeBuild
.SetProcessArgumentConfigurator(_ => _ .SetProcessArgumentConfigurator(_ => _
.Add("-p:IncludeNativeLibrariesForSelfExtract=true")) .Add("-p:IncludeNativeLibrariesForSelfExtract=true"))
.EnableNoRestore()); .EnableNoRestore());
LinuxOutputDirectory.TarGZipTo(
LinuxGz,
filter: x => !x.HasExtension(ExcludedExtensions),
fileMode: FileMode.CreateNew);
}); });
Target Publish => _ => _ Target Publish => _ => _