Monorepo for Aesthetic.Computer
aesthetic.computer
1# Clean intermediate build files to fix file locking issues
2# Run as Administrator
3
4#Requires -RunAsAdministrator
5
6Write-Host "=========================================" -ForegroundColor Cyan
7Write-Host "Cleaning Intermediate Build Files" -ForegroundColor Cyan
8Write-Host "=========================================" -ForegroundColor Cyan
9Write-Host ""
10
11$ProjectRoot = "C:\Perforce\SpiderLily\SL_main"
12
13# Stop any UE5 processes that might be locking files
14Write-Host "Stopping Unreal Engine processes..." -ForegroundColor Yellow
15Get-Process | Where-Object {$_.ProcessName -like "*Unreal*"} | Stop-Process -Force -ErrorAction SilentlyContinue
16Get-Process | Where-Object {$_.ProcessName -like "*UE5*"} | Stop-Process -Force -ErrorAction SilentlyContinue
17Start-Sleep -Seconds 2
18
19# Clean intermediate directories
20$IntermediateDirs = @(
21 "$ProjectRoot\Intermediate",
22 "$ProjectRoot\Plugins\FMODStudio\Intermediate",
23 "$ProjectRoot\Plugins\FMODStudioNiagara\Intermediate"
24)
25
26foreach ($dir in $IntermediateDirs) {
27 if (Test-Path $dir) {
28 Write-Host "Deleting: $dir" -ForegroundColor Gray
29 Remove-Item -Path $dir -Recurse -Force -ErrorAction SilentlyContinue
30
31 if (Test-Path $dir) {
32 Write-Host "[WARNING] Could not fully delete: $dir" -ForegroundColor Yellow
33 } else {
34 Write-Host "[OK] Deleted: $dir" -ForegroundColor Green
35 }
36 }
37}
38
39Write-Host ""
40Write-Host "[OK] Clean complete!" -ForegroundColor Green
41Write-Host ""
42Write-Host "Next: Try building again" -ForegroundColor Cyan
43Write-Host " powershell.exe -ExecutionPolicy Bypass -File ""\\wsl.localhost\Ubuntu\home\me\aesthetic-computer\windows\build-false-work.ps1""" -ForegroundColor Gray
44Write-Host ""