Prune Linux-only theme assets on Windows installs

install-windows.ps1 now removes everything under assets\ except
NexusOS.ico (the only file anything on Windows reads) right after the
desktop shortcut step - the GTK/KDE/XFWM4/Plymouth theme has nothing to
theme without a matching desktop environment under it.

Ported via bin/publish.sh from NexusOS-jon.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-22 22:18:35 -05:00
co-authored by Claude Sonnet 5
parent ec8f2e08f6
commit f8f193c56b
+25
View File
@@ -221,6 +221,31 @@ try {
Write-Warn "Could not create desktop shortcut - launch with: powershell -File launch_nexus.ps1" Write-Warn "Could not create desktop shortcut - launch with: powershell -File launch_nexus.ps1"
} }
# -- Prune Linux-only assets -----------------------------------------------------
# assets\ ships the Linux desktop theme (GTK/KDE/XFWM4, boot splash, XFCE panel
# icons) alongside NexusOS.ico, the one file Windows actually uses (the shortcut
# icon, just set above). None of the rest does anything without a GTK/KDE/XFWM4/
# Plymouth desktop under it to theme - dead weight in a Windows checkout, not a
# future-proofing keep.
Write-Step "Removing Linux-only theme assets"
try {
$AssetsDir = Join-Path $RepoRoot "assets"
$IcoPath = Join-Path $AssetsDir "NexusOS.ico"
$Freed = (Get-ChildItem $AssetsDir -Recurse -Force -File -ErrorAction SilentlyContinue |
Where-Object { $_.FullName -ne $IcoPath } |
Measure-Object -Property Length -Sum).Sum
Get-ChildItem $AssetsDir -Force -ErrorAction SilentlyContinue |
Where-Object { $_.Name -ne "NexusOS.ico" } |
Remove-Item -Recurse -Force
if ($Freed) {
Write-OK "Removed $([math]::Round($Freed / 1MB, 1)) MB (Linux desktop theme - not used on Windows)"
} else {
Write-OK "Nothing to remove"
}
} catch {
Write-Warn "Could not prune assets\ - harmless, just extra disk space"
}
# -- Pull models (best-effort, LAST on purpose) -------------------------------- # -- Pull models (best-effort, LAST on purpose) --------------------------------
# This is the only multi-GB step, and the only one a user is invited to Ctrl+C. # This is the only multi-GB step, and the only one a user is invited to Ctrl+C.
# Ctrl+C in PowerShell 5.1 terminates the whole SCRIPT, not just the running # Ctrl+C in PowerShell 5.1 terminates the whole SCRIPT, not just the running