Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960# Aggressively clean all generated files to fix corruption# Run as Administrator
#Requires -RunAsAdministrator
Write-Host "=========================================" -ForegroundColor CyanWrite-Host "Deep Clean - All Generated Files" -ForegroundColor CyanWrite-Host "=========================================" -ForegroundColor CyanWrite-Host ""
$ProjectRoot = "C:\Perforce\SpiderLily\SL_main"
# Stop ALL processesWrite-Host "Stopping all Unreal/FMOD processes..." -ForegroundColor YellowGet-Process | Where-Object {$_.ProcessName -match "Unreal|UE5|UE_|FMOD|dotnet"} | Stop-Process -Force -ErrorAction SilentlyContinueStart-Sleep -Seconds 3
# Delete ALL intermediate and generated files$DirsToDelete = @( "$ProjectRoot\Intermediate", "$ProjectRoot\Binaries", "$ProjectRoot\Saved", "$ProjectRoot\Plugins\FMODStudio\Intermediate", "$ProjectRoot\Plugins\FMODStudio\Binaries", "$ProjectRoot\Plugins\FMODStudioNiagara\Intermediate", "$ProjectRoot\Plugins\FMODStudioNiagara\Binaries")
foreach ($dir in $DirsToDelete) { if (Test-Path $dir) { Write-Host "Deleting: $dir" -ForegroundColor Gray # Try normal delete first Remove-Item -Path $dir -Recurse -Force -ErrorAction SilentlyContinue # If still exists, try robocopy method (faster for large dirs) if (Test-Path $dir) { Write-Host " Using robocopy method..." -ForegroundColor DarkGray $emptyDir = "$env:TEMP\empty_$(Get-Random)" New-Item -ItemType Directory -Path $emptyDir -Force | Out-Null robocopy $emptyDir $dir /MIR /R:0 /W:0 /NP /NDL /NFL | Out-Null Remove-Item -Path $dir -Recurse -Force -ErrorAction SilentlyContinue Remove-Item -Path $emptyDir -Force -ErrorAction SilentlyContinue } if (Test-Path $dir) { Write-Host "[WARNING] Could not fully delete: $dir" -ForegroundColor Yellow } else { Write-Host "[OK] Deleted" -ForegroundColor Green } }}
Write-Host ""Write-Host "[OK] Deep clean complete!" -ForegroundColor GreenWrite-Host ""Write-Host "Next: Rebuild from scratch" -ForegroundColor CyanWrite-Host " powershell.exe -ExecutionPolicy Bypass -File ""\\wsl.localhost\Ubuntu\home\me\aesthetic-computer\windows\build-false-work.ps1""" -ForegroundColor GrayWrite-Host ""