Skip to content

Commit

Permalink
Make it alot smaller with trimming. (78MB)
Browse files Browse the repository at this point in the history
  • Loading branch information
CarbonNeuron committed Nov 18, 2020
1 parent 63767a5 commit 9e7ac6b
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 9 deletions.
35 changes: 33 additions & 2 deletions AUCapture-WPF/AUCapture-WPF.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,62 @@
<TargetFramework>net5.0-windows</TargetFramework>
<RootNamespace>AUCapture_WPF</RootNamespace>
<UseWPF>true</UseWPF>
<UseWinForms>false</UseWinForms>
<StartupObject>AUCapture_WPF.App</StartupObject>
<Platforms>AnyCPU;x86;x64</Platforms>
<AssemblyVersion>2.4.4.0</AssemblyVersion>
<FileVersion>2.4.4.0</FileVersion>
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
<PublishTrimmed>true</PublishTrimmed>
<TrimmerRemoveSymbols>true</TrimmerRemoveSymbols>
<UseSystemResourceKeys>true</UseSystemResourceKeys>
<HttpActivityPropagationSupport>false</HttpActivityPropagationSupport>
<EventSourceSupport>false</EventSourceSupport>
<EnableUnsafeUTF7Encoding>false</EnableUnsafeUTF7Encoding>
<EnableUnsafeBinaryFormatterSerialization>false</EnableUnsafeBinaryFormatterSerialization>
<DebuggerSupport>false</DebuggerSupport>
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
<SuppressTrimAnalysisWarnings>false</SuppressTrimAnalysisWarnings>
<TrimMode>link</TrimMode>
<NoWin32Manifest>true</NoWin32Manifest>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DebugType>embedded</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DebugType>none</DebugType>
</PropertyGroup>

<ItemGroup>
<TrimmerRootAssembly Include="System.Runtime" />
<TrimmerRootAssembly Include="System.Runtime.Extensions" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Config.Net" Version="4.15.0" />
<PackageReference Include="Config.Net.Json" Version="4.15.0" />
<PackageReference Include="MahApps.Metro" Version="2.2.0" />
<PackageReference Include="MahApps.Metro.IconPacks" Version="4.5.0" />
<PackageReference Include="MahApps.Metro.IconPacks.Modern" Version="4.8.0" />
<PackageReference Include="MahApps.Metro.IconPacks.Unicons" Version="4.8.0" />
<PackageReference Include="Octokit" Version="0.48.0" />
<PackageReference Include="SharedMemory" Version="2.2.3" />
</ItemGroup>

<Target Name="ConfigureTrimming" BeforeTargets="PrepareForILLink">
<ItemGroup>
<ManagedAssemblyToLink Condition="'%(Filename)' == 'System.Windows.Forms'">
<IsTrimmable>true</IsTrimmable>
</ManagedAssemblyToLink>
<ManagedAssemblyToLink Condition="'%(Filename)' == 'System.Windows.Forms.Design'">
<IsTrimmable>true</IsTrimmable>
</ManagedAssemblyToLink>
</ItemGroup>
</Target>

<ItemGroup>
<ProjectReference Include="..\AmongUsCapture\AmongUsCapture.csproj" />
</ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions AUCapture-WPF/Properties/PublishProfiles/FolderProfile.pubxml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<PublishDir>bin\Release\netcoreapp3.1\publish\</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<TargetFramework>net5.0-windows</TargetFramework>
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>True</PublishSingleFile>
<PublishReadyToRun>True</PublishReadyToRun>
<PublishTrimmed>False</PublishTrimmed>
<IncludeNativeLibrariesInSingleFile>True</IncludeNativeLibrariesInSingleFile>
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
<PublishSingleFile>True</PublishSingleFile>
<PublishReadyToRun>False</PublishReadyToRun>
<PublishTrimmed>True</PublishTrimmed>
</PropertyGroup>
</Project>
2 changes: 2 additions & 0 deletions AmongUsCapture/AmongUsCapture.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<UseWindowsForms>false</UseWindowsForms>
<UseWPF>false</UseWPF>
<ApplicationManifest>app.manifest</ApplicationManifest>
<PublishSingleFile>true</PublishSingleFile>
<IsTrimmable>true</IsTrimmable>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<Platform>Any CPU</Platform>
<PublishDir>bin\publish\32Bit\</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishSingleFile>True</PublishSingleFile>
<PublishReadyToRun>True</PublishReadyToRun>
<PublishSingleFile>False</PublishSingleFile>
<PublishReadyToRun>False</PublishReadyToRun>
<PublishTrimmed>True</PublishTrimmed>
</PropertyGroup>
</Project>

0 comments on commit 9e7ac6b

Please sign in to comment.