Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,17 @@ jobs:
New-Item "unigetui_bin" -ItemType Directory | Out-Null
Get-ChildItem $PublishDir | Move-Item -Destination "unigetui_bin" -Force

$MaxShippedPdbSizeBytes = 1MB
$PdbsToRemove = Get-ChildItem "unigetui_bin" -Filter "*.pdb" -File | Where-Object {
$_.Length -gt $MaxShippedPdbSizeBytes
}

if ($PdbsToRemove.Count -gt 0) {
$RemovedPdbBytes = ($PdbsToRemove | Measure-Object -Property Length -Sum).Sum
$PdbsToRemove | Remove-Item -Force
Write-Host ("Removed {0} oversized PDBs above {1:N2} MiB ({2:N2} MiB total)." -f $PdbsToRemove.Count, ($MaxShippedPdbSizeBytes / 1MB), ($RemovedPdbBytes / 1MB))
}

# Backward-compat alias
Copy-Item "unigetui_bin/UniGetUI.exe" "unigetui_bin/WingetUI.exe" -Force

Expand Down
13 changes: 13 additions & 0 deletions scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,19 @@ New-Item $BinDir -ItemType Directory | Out-Null
# Move published output into unigetui_bin
Get-ChildItem $PublishDir | Move-Item -Destination $BinDir -Force

# Keep smaller symbols for useful local crash source information, and prune oversized ones.
$MaxShippedPdbSizeBytes = 1MB

$PdbsToRemove = Get-ChildItem $BinDir -Filter "*.pdb" -File | Where-Object {
$_.Length -gt $MaxShippedPdbSizeBytes
}

if ($PdbsToRemove.Count -gt 0) {
$RemovedPdbBytes = ($PdbsToRemove | Measure-Object -Property Length -Sum).Sum
$PdbsToRemove | Remove-Item -Force
Write-Host ("Removed {0} oversized PDBs above {1:N2} MiB ({2:N2} MiB total)." -f $PdbsToRemove.Count, ($MaxShippedPdbSizeBytes / 1MB), ($RemovedPdbBytes / 1MB))
}

# WingetUI.exe alias for backward compat
Copy-Item (Join-Path $BinDir "UniGetUI.exe") (Join-Path $BinDir "WingetUI.exe") -Force

Expand Down
1 change: 1 addition & 0 deletions scripts/merge-publish-output.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ $sourceWinsConflicts = @{
'Microsoft.VisualBasic.dll' = $true
'Microsoft.Win32.SystemEvents.dll' = $true
'System.Diagnostics.EventLog.dll' = $true
'System.Diagnostics.EventLog.Messages.dll' = $true
'System.Drawing.Common.dll' = $true
'System.Drawing.dll' = $true
'System.Private.Windows.Core.dll' = $true
Expand Down
2 changes: 1 addition & 1 deletion src/UniGetUI/UniGetUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
<PackageReference Include="YamlDotNet" Version="17.0.1" />
<PackageReference Include="IdentityModel.OidcClient" Version="6.0.0" />
<PackageReference Include="Octokit" Version="14.0.0" />
<PackageReference Include="Devolutions.UniGetUI.Elevator" Version="2.6.1.3" GeneratePathProperty="true" ExcludeAssets="build;buildTransitive" />
<PackageReference Include="Devolutions.UniGetUI.Elevator" Version="2.6.1.3" GeneratePathProperty="true" ExcludeAssets="build;buildTransitive;native" />

<Manifest Include="$(ApplicationManifest)" />
</ItemGroup>
Expand Down
Loading