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

@@ -5,6 +5,7 @@
<LangVersion>latest</LangVersion>
<ImplicitUsings>true</ImplicitUsings>
<Nullable>enable</Nullable>
<JsonSerializerIsReflectionEnabledByDefault>true</JsonSerializerIsReflectionEnabledByDefault>
</PropertyGroup>
<PropertyGroup>
@@ -19,5 +20,18 @@
<DebugSymbols>False</DebugSymbols>
<DebugType>None</DebugType>
</PropertyGroup>
<ItemGroup>
<TrimmerRootAssembly Include="Newtonsoft.Json"/>
<TrimmerRootAssembly Include="Pilz"/>
<TrimmerRootAssembly Include="Pilz.Updating"/>
<TrimmerRootAssembly Include="Pilz.Updating.Client"/>
<TrimmerRootAssembly Include="Pilz.Configuration"/>
<TrimmerRootAssembly Include="Yggdrasil.Engine"/>
<TrimmerRootAssembly Include="Octokit"/>
<TrimmerRootAssembly Include="Modrinth.Net"/>
<TrimmerRootAssembly Include="CurseForge.APIClient"/>
<TrimmerRootAssembly Include="ExCSS"/>
</ItemGroup>
</Project>

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 =

View File

@@ -6,6 +6,13 @@
<AssemblyName>MinecraftModpackUpdaterCli</AssemblyName>
</PropertyGroup>
<ItemGroup>
<TrimmerRootAssembly Include="MinecraftModpackUpdaterCli"/>
<TrimmerRootAssembly Include="ModpackUpdater.Manager"/>
<TrimmerRootAssembly Include="ModpackUpdater.Apps"/>
<TrimmerRootAssembly Include="ModpackUpdater"/>
</ItemGroup>
<ItemGroup>
<Compile Include="..\Version.cs" />
</ItemGroup>

View File

@@ -34,7 +34,7 @@ IconFiles = """
# DOTNET PUBLISH
DotnetProjectPath = ModpackUpdater.Apps.Client.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 =

View File

@@ -9,6 +9,14 @@
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
</PropertyGroup>
<ItemGroup>
<TrimmerRootAssembly Include="MinecraftModpackUpdateManager"/>
<TrimmerRootAssembly Include="ModpackUpdater.Manager"/>
<TrimmerRootAssembly Include="ModpackUpdater.Apps"/>
<TrimmerRootAssembly Include="ModpackUpdater"/>
<TrimmerRootAssembly Include="NGitLab"/>
</ItemGroup>
<ItemGroup>
<Compile Include="..\Version.cs" />
<Compile Update="LangRes\UpdateActionTypeLangRes.Designer.cs">

View File

@@ -36,7 +36,7 @@ IconFiles = """
# DOTNET PUBLISH
DotnetProjectPath = ModpackUpdater.Apps.Manager.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 =