enable trimming

This commit is contained in:
2025-11-18 06:53:23 +01:00
parent b87d896b8f
commit d44ccbaaab
8 changed files with 42 additions and 6 deletions

View File

@@ -189,7 +189,7 @@ public partial class MainForm : Window
{
lastUpdateCheckResult = await updater.Check(updateOptions);
}
catch (Exception)
catch
{
error();
if (Debugger.IsAttached)
@@ -275,7 +275,7 @@ public partial class MainForm : Window
private async void MainForm_Loaded(object? sender, RoutedEventArgs e)
{
var updates = new AppUpdates(Program.UpdateUrl, this);
updates.OnDownloadProgramUpdate += (o, args) => SetStatus(GeneralLangRes.DownloadProgramUpdate, AppGlobals.Symbols.GetImageSource(AppSymbols.software_installer));
updates.OnDownloadProgramUpdate += (o, _) => SetStatus(GeneralLangRes.DownloadProgramUpdate, AppGlobals.Symbols.GetImageSource(AppSymbols.software_installer));
await updates.UpdateApp();
ClearStatus();

View File

@@ -8,6 +8,13 @@
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
</PropertyGroup>
<ItemGroup>
<TrimmerRootAssembly Include="MinecraftModpackUpdater"/>
<TrimmerRootAssembly Include="ModpackUpdater.Manager"/>
<TrimmerRootAssembly Include="ModpackUpdater.Apps"/>
<TrimmerRootAssembly Include="ModpackUpdater"/>
</ItemGroup>
<ItemGroup>
<Compile Include="..\Version.cs" />
@@ -49,7 +56,7 @@
<LastGenOutput>MsgBoxLangRes.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia.BuildServices" Version="11.3.2">
<PrivateAssets>all</PrivateAssets>

View File

@@ -36,7 +36,7 @@ IconFiles = """
# DOTNET PUBLISH
DotnetProjectPath = ModpackUpdater.Apps.Client.Gui.csproj
DotnetPublishArgs = -p:Version=${APP_VERSION} --self-contained true -p:DebugType=None -p:DebugSymbols=false -p:PublishSingleFile=true -p:PublishTrimmed=false
DotnetPublishArgs = -p:Version=${APP_VERSION} --self-contained true -p:DebugType=None -p:DebugSymbols=false -p:PublishSingleFile=true -p:PublishTrimmed=true
DotnetPostPublish =
DotnetPostPublishOnWindows =