Skip to content

Commit df20d94

Browse files
Reduce Windows release package size (#4733)
* Reduce Windows release package size Trim the bundled pinget single-file publish and disable ReadyToRun for that helper so it no longer embeds a large untrimmed runtime payload. Also remove oversized PDBs recursively from the staged Windows release package. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Keep ReadyToRun for bundled pinget Keep the bundled pinget helper trimmed, but allow Release ReadyToRun to remain enabled for startup performance. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent b1e4850 commit df20d94

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/build-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ jobs:
197197
Get-ChildItem $PublishDir | Move-Item -Destination "unigetui_bin" -Force
198198
199199
$MaxShippedPdbSizeBytes = 1MB
200-
$PdbsToRemove = Get-ChildItem "unigetui_bin" -Filter "*.pdb" -File | Where-Object {
200+
$PdbsToRemove = Get-ChildItem "unigetui_bin" -Filter "*.pdb" -File -Recurse | Where-Object {
201201
$_.Length -gt $MaxShippedPdbSizeBytes
202202
}
203203

src/UniGetUI.Avalonia/UniGetUI.Avalonia.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
<MSBuild
4646
Projects="$(PingetCliProject)"
4747
Targets="Restore;Publish"
48-
Properties="Configuration=$(Configuration);Platform=$(Platform);TargetFramework=net10.0;RuntimeIdentifier=$(PingetCliRuntimeIdentifier);SelfContained=true;PublishSingleFile=true;PublishTrimmed=false;PublishDir=$(PingetCliPublishDir);AppendRuntimeIdentifierToOutputPath=false"
48+
Properties="Configuration=$(Configuration);Platform=$(Platform);TargetFramework=net10.0;RuntimeIdentifier=$(PingetCliRuntimeIdentifier);SelfContained=true;PublishSingleFile=true;PublishTrimmed=true;TrimMode=partial;JsonSerializerIsReflectionEnabledByDefault=true;PublishDir=$(PingetCliPublishDir);AppendRuntimeIdentifierToOutputPath=false"
4949
/>
5050
<ItemGroup>
5151
<PingetCliOutputFiles Include="$(PingetCliExecutablePath)" Condition="Exists('$(PingetCliExecutablePath)')" />

src/UniGetUI/UniGetUI.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
<MSBuild
9494
Projects="$(PingetCliProject)"
9595
Targets="Restore;Publish"
96-
Properties="Configuration=$(Configuration);Platform=$(Platform);TargetFramework=net10.0;RuntimeIdentifier=$(PingetCliRuntimeIdentifier);SelfContained=true;PublishSingleFile=true;PublishTrimmed=false;PublishDir=$(PingetCliPublishDir);AppendRuntimeIdentifierToOutputPath=false"
96+
Properties="Configuration=$(Configuration);Platform=$(Platform);TargetFramework=net10.0;RuntimeIdentifier=$(PingetCliRuntimeIdentifier);SelfContained=true;PublishSingleFile=true;PublishTrimmed=true;TrimMode=partial;JsonSerializerIsReflectionEnabledByDefault=true;PublishDir=$(PingetCliPublishDir);AppendRuntimeIdentifierToOutputPath=false"
9797
/>
9898
<Copy
9999
SourceFiles="$(PingetCliExecutablePath)"

0 commit comments

Comments
 (0)