From aae00548dbd66b4f143ae1ae019279ff539ff80f Mon Sep 17 00:00:00 2001 From: NicoVIII Date: Fri, 8 Mar 2024 18:43:50 +0100 Subject: [PATCH] Fix trimmed publishing --- run.fs | 15 +++++++-------- .../AvaloniaApp/Andromeda.AvaloniaApp.fsproj | 2 ++ src/Andromeda/AvaloniaApp/Program.fs | 4 +--- src/Andromeda/AvaloniaApp/Roots.xml | 11 +++++++++++ 4 files changed, 21 insertions(+), 11 deletions(-) create mode 100644 src/Andromeda/AvaloniaApp/Roots.xml diff --git a/run.fs b/run.fs index 2806f02..ef25f3b 100644 --- a/run.fs +++ b/run.fs @@ -40,12 +40,11 @@ module DotNet = "-o" outDir "--self-contained" - "/p:PublishSingleFile=true" - "/p:PublishTrimmed=true" - "/p:EnableCompressionInSingleFile=true" - "/p:IncludeNativeLibrariesForSelfExtract=true" - "/p:DebugType=None" - $"/p:Version=%s{version}" + "-p:PublishSingleFile=true" + "-p:EnableCompressionInSingleFile=true" + "-p:IncludeNativeLibrariesForSelfExtract=true" + "-p:DebugType=None" + $"-p:Version=%s{version}" project ] @@ -91,13 +90,13 @@ module Task = "-r" "linux-x64" "--self-contained" - "-p:PublishTrimmed=true" "-p:DebugType=None" - $"/p:Version=%s{version}" + $"-p:Version=%s{version}" Config.mainProject ] Shell.mkdir "AppDir/usr" + Shell.cleanDir "AppDir/usr" Shell.mv $"src/Andromeda/AvaloniaApp/bin/Release/{Config.framework}/linux-x64/publish" diff --git a/src/Andromeda/AvaloniaApp/Andromeda.AvaloniaApp.fsproj b/src/Andromeda/AvaloniaApp/Andromeda.AvaloniaApp.fsproj index ed4577b..616b38a 100644 --- a/src/Andromeda/AvaloniaApp/Andromeda.AvaloniaApp.fsproj +++ b/src/Andromeda/AvaloniaApp/Andromeda.AvaloniaApp.fsproj @@ -9,10 +9,12 @@ 0 + true + diff --git a/src/Andromeda/AvaloniaApp/Program.fs b/src/Andromeda/AvaloniaApp/Program.fs index ad6bc13..cc5479b 100644 --- a/src/Andromeda/AvaloniaApp/Program.fs +++ b/src/Andromeda/AvaloniaApp/Program.fs @@ -4,14 +4,12 @@ open Andromeda.Core open Elmish open GogApi -open System open Avalonia open Avalonia.Controls open Avalonia.Controls.ApplicationLifetimes open Avalonia.FuncUI open Avalonia.FuncUI.Hosts open Avalonia.FuncUI.Elmish -open Avalonia.Markup.Xaml.Styling open Avalonia.Themes.Simple open Andromeda.AvaloniaApp @@ -59,8 +57,8 @@ module Program = override this.Initialize() = this.Styles.Add(new SimpleTheme()) - this.Styles.Load "avares://Andromeda.AvaloniaApp/Styles.xaml" this.RequestedThemeVariant <- Styling.ThemeVariant.Dark + this.Styles.Load "avares://Andromeda.AvaloniaApp/Styles.xaml" override this.OnFrameworkInitializationCompleted() = match this.ApplicationLifetime with diff --git a/src/Andromeda/AvaloniaApp/Roots.xml b/src/Andromeda/AvaloniaApp/Roots.xml new file mode 100644 index 0000000..37afaa3 --- /dev/null +++ b/src/Andromeda/AvaloniaApp/Roots.xml @@ -0,0 +1,11 @@ + + + + + + + + + + +